A. Love Triangle time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output As you could know there are no male planes nor female planes. However, each plane on Earth likes some other plane. There are…
题目链接:http://codeforces.com/contest/939/problem/E E. Maximize! time limit per test3 seconds memory limit per test256 megabytes Problem Description You are given a multiset S consisting of positive integers (initially empty). There are two kind of quer…
A. Love Triangle time limit per test1 second memory limit per test256 megabytes Problem Description As you could know there are no male planes nor female planes. However, each plane on Earth likes some other plane. There are n planes on Earth, number…
A. Love Triangle time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output As you could know there are no male planes nor female planes. However, each plane on Earth likes some other plane. There…
D. Love Rescue time limit per test2 seconds memory limit per test256 megabytes Problem Description Valya and Tolya are an ideal pair, but they quarrel sometimes. Recently, Valya took offense at her boyfriend because he came to her in t-shirt with let…
C. Convenient For Everybody time limit per test2 seconds memory limit per test256 megabytes Problem Description In distant future on Earth day lasts for n hours and that's why there are n timezones. Local times in adjacent timezones differ by one hou…
B. Hamster Farm time limit per test2 seconds memory limit per test256 megabytes Problem Description Dima has a hamsters farm. Soon N hamsters will grow up on it and Dima will sell them in a city nearby. Hamsters should be transported in boxes. If som…
B. Hamster Farm time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Dima has a hamsters farm. Soon N hamsters will grow up on it and Dima will sell them in a city nearby. Hamsters should be tr…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 最后的直角三角形可以通过平移,将直角顶点移动到坐标原点. 然后我们只要枚举另外两个点其中一个点的坐标就好了. x坐标的范围是[1..a) 因为再长的话,这条边肯定就超过边长a了. 然后用一些相似三角形的规律就能知道另外一个点的坐标了. 看看这两个点的y坐标是不是一样就好. [代码] #include <bits/stdc++.h> using namespace std; int a,b; int main(){ #ifdef…
Valya and Tolya are an ideal pair, but they quarrel sometimes. Recently, Valya took offense at her boyfriend because he came to her in t-shirt with lettering that differs from lettering on her pullover. Now she doesn't want to see him and Tolya is se…