Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049 Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
Flow Layout Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 3091 Accepted: 2148 Description A flow layout manager takes rectangular objects and places them in a rectangular window from left to right. If there isn't enough room in one r…
排列2 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 9583 Accepted Submission(s): 3485 Problem Description Ray又对数字的列产生了兴趣: 现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数. Input 每组数据占一行,代表四张卡片上…
题目链接:http://poj.org/problem?id=2864 题意:参照题目 哈哈哈,这个题discuss有翻译哦.水到我不想交了. #include <cstdio> #include <cstdlib> #include <cstring> ][]; int main(void) { int r, c; int i, j; int flag; || r != ) { memset(arr, , sizeof(arr)); ; i < r; i++)…
Codeforces 1082B Vova and Trophies https://vjudge.net/problem/CodeForces-1082B 题目: Vova has won nn trophies in different competitions. Each trophy is either golden or silver. The trophies are arranged in a row. The beauty of the arrangement is the le…
Mishka started participating in a programming contest. There are nn problems in the contest. Mishka's problem-solving skill is equal to kk. Mishka arranges all problems from the contest into a list. Because of his weird principles, Mishka only solves…
题目链接:http://poj.org/problem?id=2459 题目大意:有C头牛,下面有C行,每头牛放进草地的时间,每天吃一个草,总共有F1个草,想要在第D的时候,草地只剩下F2个草. 解题思路:模拟啊,就像砍树一样的问题,把每天失去的草计算出来,从最后一天往前推. #include <cstdio> #include <cstring> int C,F1,F2,D; ]; int main() { while (scanf("%d%d%d%d",&a…
题意: 模拟模拟~~ 代码: #include<iostream> using namespace std; const int maxn = 1005; int a[maxn], b[maxn], fa[maxn], fb[maxn]; int main (void) { int n;cin>>n; for(int i = 1; i <= n; i++){ cin>>a[i]; if(i==1) fa[i] = a[i]; else fa[i] = fa[i-1…
Elevator Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 56481 Accepted Submission(s): 30942 Problem Description The highest building in our city has only one elevator. A request list is made…
Mike and Cellphone 题目链接: http://acm.hust.edu.cn/vjudge/contest/121333#problem/E Description While swimming at the beach, Mike has accidentally dropped his cellphone into the water. There was no worry as he bought a cheap replacement phone with an old…
你的一系列得分 先降序排列 再按0.95^(i-1)*ai 这个公式计算你的每一个得分 最后求和 Sample Input12530 478Sample Output984.1000000000 # include <iostream> # include <cstdio> # include <algorithm> # include <map> # include <cmath> # define LL long long using nam…
A string ss of length nn can be encrypted(加密) by the following algorithm: iterate(迭代) over all divisors(除数) of nn in decreasing order (i.e. from nn to 11), for each divisor dd, reverse the substring s[1…d]s[1…d] (i.e. the substring which starts at po…
You are given a string ss consisting of nn lowercase Latin letters. Polycarp wants to remove exactly kk characters (k≤nk≤n) from the string ss. Polycarp uses the following algorithm kk times: if there is at least one letter 'a', remove the leftmost o…
描述 http://train.usaco.org/usacoprob2?a=y0SKxY0Kc2q&S=gift1 给出不超过$10$个人,每个人拿出一定数量的钱平分给特定的人,求最后每个人的财产变化. Task 'gift1': Greedy Gift Givers A group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends m…
Problem Description The Chinese Zodiac, known as Sheng Xiao, is based on a twelve-year cycle, each year in the cycle related to an animal sign. These signs are the rat, ox, tiger, rabbit, dragon, snake, horse, sheep, monkey, rooster, dog and pig.Vict…
悼念512汶川大地震遇难同胞--一定要记住我爱你 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 9453 Accepted Submission(s): 5736 Problem Description 当抢救人员发现她的时候,她已经死了,是被垮塌下来的房子压死的,透过那一堆废墟的的间隙可以看到她死亡的姿势,双膝跪着,整个…
Inna and Choose Options Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Description There always is something to choose from! And now, instead of "Noughts and Cros…