
ACM - 其他
文章平均质量分 75
Freenm
这个作者很懒,什么都没留下…
展开
-
Codeforces 665C - Simple Strings
zscoder loves simple strings! A string t is called simple if every pair of adjacent characters are distinct. For example ab, aba, zscoder are simple whereas aa, add are not simple. zscoder is given原创 2017-03-10 22:10:25 · 344 阅读 · 0 评论 -
codeforces 798B - Mike and strings
感觉自己好咸鱼呀……B题写了这么久,虽然可以算作1A(忽略一次少include一个头文件的CE)…… 思想很简单,每次选定一个字符串作为目标字符串,然后把其他所有字符串都当做测试字符串,计算出总共需要的步数,再在这些计算出的步数中找到最小的那个就是答案。 #include #include #include using namespace std; char str[53][105]; int原创 2017-04-22 00:13:12 · 1049 阅读 · 0 评论 -
HDU 1002 - A + B Problem II (大数相加)
Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the input contains an integer T(1 OutputFor each t原创 2017-02-20 19:38:52 · 357 阅读 · 0 评论 -
HDU 1222 - Wolf and Rabbit & HDU 1108 - 最小公倍数
水题,只是想借此记一下gcd函数的模板 #include int gcd(int m,int n){return n==0 ? m : gcd(n,m%n);} int main() { int n,m,t; scanf("%d",&t); while(t--){ scanf("%d%d",&m,&n); if(gcd(n,m)==1) p原创 2017-04-17 13:35:58 · 377 阅读 · 0 评论 -
POJ 1004 - Financial Management
Description Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfo原创 2017-02-08 13:53:10 · 311 阅读 · 0 评论 -
POJ 1488 - TEX Quotes
Description TEX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a beautiful document. Beautiful docum原创 2017-02-19 23:34:30 · 333 阅读 · 0 评论 -
POJ 2027 - No Brainer
DescriptionZombies love to eat brains. Yum.InputThe first line contains a single integer n indicating the number of data sets. The following n lines each represent a data set. Each data set will be fo原创 2017-02-20 19:38:32 · 529 阅读 · 0 评论 -
POJ 3030 - Nasty Hacks
DescriptionYou are the CEO of Nasty Hacks Inc., a company that creates small pieces of malicious software which teenagers may use to fool their friends. The company has just finished their first produ原创 2017-02-20 19:38:35 · 363 阅读 · 0 评论 -
POJ 1063 - Flip and Shift
DescriptionThis puzzle consists of a random sequence of m black disks and n white disks on an oval-shaped track, with a turnstile capable of flipping (i.e., reversing) three consecutive disks. In Figu原创 2017-02-20 19:38:38 · 430 阅读 · 0 评论 -
POJ 1102 - LC-Display
DescriptionA friend of you has just bought a new computer. Until now, the most powerful computer he ever used has been a pocket calculator. Now, looking at his new computer, he is a bit disappointed,原创 2017-02-20 19:38:55 · 355 阅读 · 0 评论 -
HDU 2095 - find your present (2)
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 23060 Accepted Submission(s): 9172 Problem Description In the new year party, e原创 2017-02-26 20:32:44 · 369 阅读 · 0 评论 -
Codeforces 349C - Mafia
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output One day n friends gathered together to play "Mafia". During each原创 2017-03-03 23:39:59 · 476 阅读 · 0 评论 -
HDU 1058 - Humble Numbers
#include int min(const int a,const int b,const int c,const int d) { int m=a; if(m>b) m=b; if(m>c) m=c; if(m>d) m=d; return m; } int num[5845]={0,1}; int main() { int c2=1,c3=1,c5=1,c7=1; for(i原创 2017-03-06 21:55:32 · 261 阅读 · 0 评论 -
HDU 6008 - Worried School
Worried School Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 112 Accepted Submission(s): 34 Problem Description You may alread原创 2017-04-22 20:52:37 · 1380 阅读 · 0 评论