Squats Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Submit Status Description Pasha has many hamsters and he makes them work out. Today, n hamsters (n is even) came to work out. The hamsters lined up and each hamster e…
http://codeforces.com/problemset/problem/916/C 好尬的题啊... #include<cstdio> #include<algorithm> #include<cstring> #include<vector> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back typed…
(点击此处查看原题) 题意分析 已知 n , p , w, d ,求x , y, z的值 ,他们的关系为: x + y + z = n x * w + y * d = p 思维法 当 y < w 的时候,我们最多通过1e5次枚举确定答案 而当 y >= w 的时候,平局所得分为:y * d = (y-w)*d + w*d ,可以看作平局的局数为 y - w ,多出的w*d贡献给 (w*d)/w = d 局胜局,所以胜局为 x + d ,说明此时用x+y局胜局和平局得到的分数可以由 x + d…
Crash Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Submit Status Description During the "Russian Code Cup" programming competition, the testing system stores all sent solutions for each participant. We know th…
Elimination Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Submit Status Description The finalists of the "Russian Code Cup" competition in 2214 will be the participants who win in one of the elimination rounds.…