随笔分类 -  acm日常

摘要:H - Problem H HDU - 2504有三个正整数a,b,c(0using namespace std;// 迭代法(递推法):欧几里得算法,计算最大公约数 int gcd(int m, int n){ while (m>0)//注意:这里是默认n... 阅读全文
posted @ 2019-01-31 22:29 gidear 阅读(335) 评论(0) 推荐(0)
摘要:C - Problem C HDU - 2032HDU - 2032 还记得中学时候学过的杨辉三角吗?具体的定义这里不再描述,你可以参考以下的图形:11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 1Input输入数据包含多个测试实例... 阅读全文
posted @ 2019-01-31 21:56 gidear 阅读(109) 评论(0) 推荐(0)
摘要:B - Problem B CodeForces - 25ABob is preparing to pass IQ test. The most frequent task in this test is to find out which one of t... 阅读全文
posted @ 2019-01-31 16:47 gidear 阅读(132) 评论(0) 推荐(0)
摘要:A - Problem A CodeForces - 1ATheatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On... 阅读全文
posted @ 2019-01-31 13:23 gidear 阅读(128) 评论(0) 推荐(0)
摘要:J - Problem J HDU - 2005第几天?给定一个日期,输出这个日期是该年的第几天。Input输入数据有多组,每组占一行,数据格式为YYYY/MM/DD组成,具体参见sample input ,另外,可以向你确保所有的输入数据是合法的。Outp... 阅读全文
posted @ 2019-01-31 11:41 gidear 阅读(94) 评论(0) 推荐(0)
摘要:赛题分析(←链接)Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 1520 Accepted Su... 阅读全文
posted @ 2019-01-30 23:40 gidear 阅读(114) 评论(0) 推荐(0)
摘要:赛题分析著名出题人小Q每次比赛后都会写一份《赛题分析》,包含比赛概况、每题的参考算法以及一些统计数值。对于一道题来说,小Q会统计最短的验题人代码长度(Shortest judge solution)以及赛内参赛队伍最短的AC代码长度(Shortest tea... 阅读全文
posted @ 2019-01-30 23:32 gidear 阅读(130) 评论(0) 推荐(0)
摘要:D - Problem D HDU - 2039给定三条边,请你判断一下能不能组成一个三角形。Input输入数据第一行包含一个数M,接下有M行,每行一个实例,包含三个正数A,B,C。其中A,B,C using namespace std;int main()... 阅读全文
posted @ 2019-01-30 22:45 gidear 阅读(118) 评论(0) 推荐(0)
摘要:G - Problem G HDU - 2045HDU - 2045人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即"可乐"),经过多方打探,某资深Cole终于知道了原因,原来,LELE最近研究起了著名... 阅读全文
posted @ 2019-01-30 10:51 gidear 阅读(184) 评论(0) 推荐(0)
摘要:F - Problem F HDU - 2050我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。Input输入数据的第一... 阅读全文
posted @ 2019-01-30 10:42 gidear 阅读(97) 评论(0) 推荐(0)
摘要:CodeForces - 318ABeing a nonconformist, Volodya is displeased with the current state of things, particularly with the order of na... 阅读全文
posted @ 2019-01-21 21:15 gidear 阅读(137) 评论(0) 推荐(0)
摘要:CodeForces - 460AVasya是个土豪Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he go... 阅读全文
posted @ 2019-01-21 21:08 gidear 阅读(172) 评论(0) 推荐(0)
摘要:hdu1001Problem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculat... 阅读全文
posted @ 2018-12-29 00:02 gidear 阅读(108) 评论(0) 推荐(0)
摘要:B - Problem B原题链接Vanya got n cubes. He decided to build a pyramid fromthem. Vanya wants to build the pyramid as follows: the top ... 阅读全文
posted @ 2018-12-25 16:58 gidear 阅读(106) 评论(0) 推荐(0)
摘要:A - Problem A问题原址Devu is a renowned classical singer. He is invited to many bigfunctions/festivals. Recently he was invited to “A... 阅读全文
posted @ 2018-12-24 21:57 gidear 阅读(129) 评论(0) 推荐(0)
摘要:汉诺塔IV> > Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K(Java/Others) Total Submission(s): 10905 Accepte... 阅读全文
posted @ 2018-12-22 12:21 gidear 阅读(127) 评论(0) 推荐(0)
摘要:I - Problem I HDU - 2027hdu2027.ac代码,顺便提提getchar()的用法,重要的是格式输入,如何合理输入,空格与回车的区分。getchar()是到缓冲区读取第一个字符首先,从键盘输入许多字符,最后回车后,所有字符包括回车放到... 阅读全文
posted @ 2018-12-15 11:37 gidear 阅读(110) 评论(0) 推荐(0)
摘要:HDU-2055问题链接// A code block#includeusing namespace std;int main(){ int n = 0; cin >> n; for (int i = 0,x=0; i > word >> num; if ... 阅读全文
posted @ 2018-12-12 21:26 gidear 阅读(86) 评论(0) 推荐(0)
摘要:Nearly Lucky Number题目:Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal represent... 阅读全文
posted @ 2018-12-12 19:53 gidear 阅读(170) 评论(0) 推荐(0)
摘要:#ASCII码排序Time limit1000 msMemory limit:32768kB问题链接ASCII码排序。输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。Input输入数据有多组,每组占一行,有三个字符组成,之间无空格。Out... 阅读全文
posted @ 2018-12-08 00:02 gidear 阅读(162) 评论(0) 推荐(0)