B题又耽误时间了...人太挫了.... C. Hamburgers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarpus loves hamburgers very much. He especially adores the hamburgers he makes with his own hands. Pol…
Codeforces 371C : Hamburgers #include<bits/stdc++.h> using namespace std; char B='B',S='S',C='C'; string t; int nb,ns,nc,pb,ps,pc,len; long long r1; map<char,int> m; bool check(long long m1) { ; if(m1*m[B]>nb) need+=(m1*m[B]-nb)*pb; if(m1*m…
C. Hamburgers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarpus loves hamburgers very much. He especially adores the hamburgers he makes with his own hands. Polycarpus thinks that…
Hamburgers http://codeforces.com/problemset/problem/371/C time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarpus loves hamburgers very much. He especially adores the hamburgers he makes…
Polycarpus loves hamburgers very much. He especially adores the hamburgers he makes with his own hands. Polycarpus thinks that there are only three decent ingredients to make hamburgers from: a bread, sausage and cheese. He writes down the recipe of…