上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 30 下一页
摘要: Problem Description输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。你的任务是:对这些分割得到的整数,依从小到大的顺序排... 阅读全文
posted @ 2015-08-09 14:54 Vmetrio 阅读(260) 评论(0) 推荐(0)
摘要: acm本文由swellspirit贡献ACM• I can accept failure. but I can't accept not trying. Life is often compared to a marathon, but I think it is more like being a... 阅读全文
posted @ 2015-08-09 14:04 Vmetrio 阅读(217) 评论(0) 推荐(0)
摘要: Problem Description定义:一个词组中每个单词的首字母的大写组合称为该词组的缩写。比如,C语言里常用的EOF就是end of file的缩写。Input输入的第一行是一个整数T,表示一共有T组测试数据;接下来有T行,每组测试数据占一行,每行有一个词组,每个词组由一个或多个单词组成;每... 阅读全文
posted @ 2015-08-09 12:57 Vmetrio 阅读(2055) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 char a[10010]; 7 int main() 8 { 9 int i,sum,t;10 while(gets(a)){11 ... 阅读全文
posted @ 2015-08-07 17:59 Vmetrio 阅读(269) 评论(0) 推荐(0)
摘要: Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbe... 阅读全文
posted @ 2015-08-07 17:08 Vmetrio 阅读(234) 评论(0) 推荐(0)
摘要: 来自:http://www.acmerblog.com/ubiquitous-binary-search-5345.html我们都知道二分查找算法,实际上二分查找以及其扩展应用是很广泛的。这里收集了一些和二分查找有关的有趣问题。强烈建议大家看完问题后最小化浏览器,先尝试自己去解决,然后再看代码,问题... 阅读全文
posted @ 2015-08-07 16:39 Vmetrio 阅读(255) 评论(0) 推荐(0)
摘要: 有关数论方面的题要仔细阅读,分析公式。Problem DescriptionIgnatius is poor at math,he falls across a puzzle problem,so he has no choice but to appeal to Eddy. this proble... 阅读全文
posted @ 2015-08-07 15:21 Vmetrio 阅读(245) 评论(0) 推荐(0)
摘要: 拓扑排序:http://www.jiuzhang.com/problem/66/无视我的扎姐:http://www.chochi.xyz/archives/372http://59.69.128.201/topcoder/http://www.matrix67.com/blog/archives/6... 阅读全文
posted @ 2015-08-07 11:40 Vmetrio 阅读(116) 评论(0) 推荐(0)
摘要: sort与stable_sort 需包含头文件:#include 因为它是库函数这两个函数的原理都是快速排序,时间复杂度在所有排序中最低,为O(nlog2n) ;sort的应用;1、可以传入两个参数; sort(a,a+N) ,其中a是数组,a+N表示对a[0]至a[N-1]的N个数进行排序(默认... 阅读全文
posted @ 2015-08-07 11:26 Vmetrio 阅读(204) 评论(0) 推荐(0)
摘要: 描述游戏积分的排行榜出来了,小z想看看得某个积分的人是谁。但是由于人数很多,他自己找很浪费时间,所以他想请你帮忙写一个程序,能快速的帮他找到他想要找的人输入多组测试数据,第一行有一个数T,表示有T组测试数据(T 2 #include 3 #include 4 #include 5 #inclu... 阅读全文
posted @ 2015-08-07 11:13 Vmetrio 阅读(229) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 30 下一页