http://codeforces.com/problemset/problem/807/C C. Success Rate time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are an experienced Codeforces user. Today you found out that during your…
题目链接:http://codeforces.com/contest/807/problem/C 题意:记 AC 率为当前 AC 提交的数量 x / 总提交量 y .已知最喜欢的 AC 率为 p/q (pq∈[0,1]) . 求最少在提交多少题(AC or NOT)能恰好达到 AC 率为 p/q 题解:当然可以用数学的方法来求解,我的解法并不是用什么数学方法,直接二分暴力就行. 由于(x+s)/(y+s+us)=(p/q)(s表示ac的,us表示没ac的)所以不妨设 x+s=k*p,y+s+us…
You are an experienced Codeforces user. Today you found out that during your activity on Codeforces you have made y submissions, out of which x have been successful. Thus, your current success rate on Codeforces is equal to x / y. Your favorite ratio…
C. Success Rate time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are an experienced Codeforces user. Today you found out that during your activity on Codeforces you have made ysubmissio…
C. Success Rate time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are an experienced Codeforces user. Today you found out that during your activity on Codeforces you have made y submissi…
C - Preparing for the Contest Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 377B Description Soon there will be held the world's largest programming contest, but the testing system sti…
题目链接:Codeforces 484B Maximum Value 题目大意:给定一个序列,找到连个数ai和aj,ai%aj尽量大,而且ai≥aj 解题思路:类似于素数筛选法的方式,每次枚举aj,然后枚举k,每次用二分找到小于k∗aj而且最大的ai,维护答案,过程中加了一些剪枝. #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn =…
You are given two strings s and t consisting of small Latin letters, string s can also contain '?' characters. Suitability of string s is calculated by following metric: Any two letters can be swapped positions, these operations can be performed arbi…
D. Leaving Auction time limit per test: 2 seconds memory limit per test:256 megabytes input:standard input output:standard output There are n people taking part in auction today. The rules of auction are classical. There were n bids made, though it's…
B. T-Shirt Hunt http://codeforces.com/problemset/problem/807/B time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Not so long ago the Codecraft-17 contest was held on Codeforces. The top 25 p…
http://codeforces.com/problemset/problem/807/A A. Is it rated? time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Is it rated? Here it is. The Ultimate Question of C…
D. Robin Hood time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, a…
题目链接: http://codeforces.com/problemset/problem/653/D 题意: x个熊拿着相同重量的物品,从1号结点沿着路走到N号结点,结点之间有边相连,保证可以从1号走到N号. The total weight that travels across a particular edge must not exceed the weight capacity of that edge. 所有经过这条边的熊,他们所拿的重量之和不能大于这条边的容量. 求所有熊所能拿…