好多oj都崩掉了,于是打了cf.. 开始开的最后一题...尼玛题好长终于看完了...神题不会.... I过了好多人..看了下,一眼题...随便敲了下,1A ]; int main(){ int n, k; cin >> n >> k; int tmp; ; i <= n; ++i) { cin >> tmp; a[tmp]++; } ; ; i <=k; ++i) { if (a[i] > n/k) ans += a[i] - n/k; } cout…
问题 J: Palindromic Password 时间限制: 3 Sec 内存限制: 128 MB提交: 217 解决: 62[提交][状态][讨论版][命题人:admin] 题目描述 The IT department at your school decided to change their password policy. Each password will have to consist of N 6-digit numbers separated by dashes, wh…
问题 C: Frosh Week 时间限制: 4 Sec 内存限制: 128 MB提交: 145 解决: 63[提交][状态][讨论版][命题人:admin] 题目描述 Professor Zac is trying to finish a collection of tasks during the first week at the start of the term. He knows precisely how long each task will take, down to th…
A - Second-price Auction Do you know second-price auction? It's very simple but famous. In a second-price auction, each potential buyer privately submits, perhaps in a sealed envelope or over a secure connection, his (or her) bid for the object to th…
A - Accurately Say "CocaCola"! In a party held by CocaCola company, several students stand in a circle and play a game. One of them is selected as the first, and should say the number 1. Then they continue to count number from 1 one by one (cloc…
A - Pretty Matrix DreamGrid's birthday is coming. As his best friend, BaoBao is going to prepare a gift for him. As we all know, BaoBao has a lot of matrices. This time he picks an integer matrix with rows and columns from his collection, but he th…
Xzz is playing a MMORPG "human life". In this game, there are N different skills. Some skills may base on another skill. Learning skill will cost Xzz some money. And there are M different jobs. If Xzz's skills satisfy the job's requirement, then…
Mr. Frog learned a basic data structure recently, which is called stack.There are some basic operations of stack: ∙∙ PUSH x: put x on the top of the stack, x must be 0 or 1. ∙∙ POP: throw the element which is on the top of the stack. Since it is too…
Gaby is a little baby who loves playing with numbers. Recently she has learned how to add 2 numbers using the standard addition algorithm which we summarize in 3 steps: Line up the numbers vertically matching digits places. Add together the numbers t…