ACM题目
文章平均质量分 80
吹石柳生
这个作者很懒,什么都没留下…
展开
-
COJ 1449: A+B and C
Description给出三个整数A,B,C,判断A+B与C的大小关系。Input输入的第一行包含一个整数T (T > 0),表示一共有T组测试数据。对于每组测试数据,只有一行,包含三个整数A,B,C(-2^632^63),数字之间用空格分开。由于输入量很大,请不要使用cin而使用scanf来避免超时。Output对于每组测试数据,若A+B>C,原创 2014-07-25 20:56:53 · 787 阅读 · 0 评论 -
Codeforces 81A Plug-in
DescriptionPolycarp thinks about the meaning of life very often. He does this constantly, even when typing in the editor. Every time he starts brooding he can no longer fully concentrate and repea原创 2014-08-09 23:24:31 · 845 阅读 · 0 评论 -
UVa 1329 Corporative Network
A very big corporation is developing its corporative network. In the beginning each of the Nenterprises of the corporation, numerated from 1 to N, organized its own computing andtelecommunication cent原创 2014-09-06 22:50:49 · 441 阅读 · 0 评论 -
AIZU 0024 Physical Experiments
#include #include using namespace std; int main() { double y,t,mv; while(cin>>mv) { t=mv/9.8; y=t*t*4.9; double n=(y+5)/5; cout<<ceil(n)原创 2014-08-09 23:50:54 · 412 阅读 · 0 评论 -
POJ 1151 Atlantis
首先,我得吐个槽。陶叔果然原创 2014-08-09 22:18:56 · 483 阅读 · 0 评论 -
SPOJ 5295 Adjacent Bit Counts
DescriptionFor a string of n bits x1,x2,x3,...,Xn the adjacent bit count of the string (AdjBC(x)) is given byX1*X2 + X2*X3 + X3*X4 + ... + Xn-1 * Xnwhich counts the number of times a 1 bit原创 2014-08-11 12:35:53 · 803 阅读 · 0 评论 -
SPOJ 18937 Touch of Venom
DescriptionSometimes you have to try fighting even though you know that your enemy is very powerful than you. Your hero with initial health H is about to fight against a venomous enemy who has a p原创 2014-08-11 12:39:19 · 877 阅读 · 0 评论 -
SPOJ QUEST5 Nail Them
DescriptionTo get to the treasure, Jones must complete one more task. He comes across a table, where there are a number of wooden planks lying along the length of the table. He notices that the wi原创 2014-08-11 12:21:43 · 607 阅读 · 0 评论 -
SPOJ 1026 Favorite Dice
DescriptionBuggyD loves to carry his favorite die around. Perhaps you wonder why it's his favorite? Well, his die is magical and can be transformed into an N-sided unbiased die with the push of a原创 2014-08-11 12:25:17 · 934 阅读 · 0 评论 -
zoj 3019 Puzzle
给你两串数A,B,让你随意排列这些数使它们的最长公共子序列最长。 开始还以为是DP,后来觉得,这个真没必要呀。 因为可以按任何安排,那么只要知道这两个序列中有多少个数是相同的就OK了,那一定是最长的。 直接排序,两个都排序,然后按顺序查找就OK了。转载 2014-08-12 18:11:02 · 442 阅读 · 0 评论 -
SPOJ 1881 Instruction Decoder
DescriptionMathews uses a brand new 16-bit instruction processor. (Yeah i am being sarcastic!). It has one register (say R) and it supports two instructions:ADD X; Impact: R = (R + X) mod原创 2014-08-12 18:21:29 · 534 阅读 · 0 评论 -
SPOJ 3410 Feynman
DescriptionRichard Phillips Feynman was a well known American physicist and a recipient of the Nobel Prize in Physics. He worked in theoretical physics and also pioneered the field of quantum comp原创 2014-08-12 18:18:42 · 412 阅读 · 0 评论 -
codeforces 20C Dijkstra?
DescriptionYou are given a weighted undirected graph. The vertices are enumerated from 1 ton. Your task is to find the shortest path between the vertex1 and the vertex n.InputThe f原创 2014-08-03 10:20:51 · 1865 阅读 · 0 评论 -
codeforces 295B Greg and Graph
DescriptionGreg has a weighed directed graph, consisting of n vertices. In this graph any pair of distinct vertices has an edge between them in both directions. Greg loves playing with the graph a原创 2014-08-03 10:16:58 · 622 阅读 · 0 评论 -
SPOJ 7299 Multiples of 3
DescriptionThere are N numbers a[0],a[1]..a[N - 1]. Initally all are 0. You have to perform two types of operations :1) Increase the numbers between indices A and B (inclusive) by 1. This is r原创 2014-08-03 10:09:13 · 662 阅读 · 0 评论 -
COJ 1163: 寒衣调
Description男从戎,女守家。一夜,狼烟四起,男战死沙场。从此一道黄泉,两地离别。最后,女终于在等待中老去逝去。逝去的最后是换尽一生等到的相逢和团圆。某日两人至奈何桥前,服下孟婆汤。每滴孟婆汤都有强度不一的药效,设一碗孟婆汤共N滴(0<N<100000),其中第i滴(0≤i<N)用b[i]表示。孟婆汤的药效与原料有关,设熬制前同样有N滴原料,第i滴原料用a[i]表示,0原创 2014-07-25 21:06:00 · 802 阅读 · 0 评论 -
Codeforces 237C
You've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has exactly two distinct positive integer divisors.Consider po原创 2014-07-27 15:21:33 · 572 阅读 · 0 评论 -
Codeforces 451B
Being a programmer, you like arrays a lot. For your birthday, your friends have given you an arraya consisting of ndistinct integers.Unfortunately, the size of a is too small. You want a bigger原创 2014-07-27 15:30:52 · 572 阅读 · 0 评论 -
SPOJ 154 Sweet and Sour Rock
DescriptionA manufacturer of sweets has started production of a new type of sweet called rock. Rock comes in sticks composed of one-centimetre-long segments, some of which are sweet, and the res原创 2014-08-02 15:53:43 · 1413 阅读 · 0 评论 -
codeforces 4c Registration system
DescriptionA new e-mail service "Berlandesk" is going to be opened in Berland in the near future. The site administration wants to launch their project as soon as possible, that's why they ask you原创 2014-08-02 16:07:05 · 594 阅读 · 0 评论 -
UVA 10608 Friends
DescriptionYou've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has exactly two distinct positive integer divisors.原创 2014-07-27 15:47:32 · 483 阅读 · 0 评论 -
Codeforces 451A
After winning gold and silver in IOI 2014, Akshat and Malvika want to have some fun. Now they are playing a game on a grid made ofn horizontal and m vertical sticks.An intersection point is any po原创 2014-07-27 15:28:01 · 417 阅读 · 0 评论 -
FZU Problem 1901 Period II
Problem DescriptionFor each prefix with length P of a given string S,ifS[i]=S[i+P] for i in [0..SIZE(S)-p-1],then the prefix is a “period” of S. We want to all the periodic prefixs.InputIn原创 2014-07-27 15:34:07 · 680 阅读 · 0 评论 -
SPOJ NITK06 16121 MODIFY SEQUENCE
Suppose we have a sequence of non-negative integers, Namely a1, a2, ... ,an. At each time we can choose one term ai with 0 i and ai+1. We wonder whether we can get a sequence of all zeros after seve原创 2014-08-02 15:45:28 · 1226 阅读 · 0 评论 -
HDU1166 敌兵布阵
暑假留校参加了ACM的集训,原创 2014-07-30 17:20:54 · 667 阅读 · 0 评论 -
POJ 2002 Square
DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about its centre by 90 degrees gives the same原创 2014-08-07 10:49:19 · 382 阅读 · 0 评论 -
CSU 1424 Qz’s Maximum All One Square
Description YH gave Qz an odd matrix consists of one or zero. He asked Qz to find a square that has the largest area. The problem is not so easy, that means the square you find must not contai原创 2014-08-12 17:05:52 · 595 阅读 · 0 评论