sicily
文章平均质量分 90
u010819672
这个作者很懒,什么都没留下…
展开
-
sicily1134. 积木分发
#include <iostream>using namespace std;class child{public: child(){} int have; int need;};int main(){ int num, sum; while (true) { cin >> num ...2013-05-26 10:20:04 · 143 阅读 · 0 评论 -
sicily1625. Binary Clock
1625. Binary Clock ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription A binary clock is a clock which displays traditional sexagesimal time (military format) in a binary fo...原创 2013-06-06 20:17:06 · 99 阅读 · 0 评论 -
sicily1155. Can I Post the lette
1155. Can I Post the lette ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription I am a traveler. I want to post a letter to Merlin. But because there are so many roads I can ...原创 2013-05-30 21:55:28 · 139 阅读 · 0 评论 -
sicily1198. Substring
1198. Substring ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription Dr lee cuts a string S into N pieces,s[1],…,s[N]. Now, Dr lee gives you these N sub-strings: s[1],…s[...原创 2013-05-30 21:55:03 · 77 阅读 · 0 评论 -
sicily1007. To and Fro
1007. To and FroConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionMo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns an...2013-05-28 13:51:45 · 102 阅读 · 0 评论 -
sicily1122. Prerequisites?
1122. Prerequisites?ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription Freddie the frosh has chosen to take k courses. To meet the degree requirements, he must take courses f...2013-05-28 13:46:34 · 134 阅读 · 0 评论 -
sicily1703. Obstacle Course
一道很典型的最短路径的题目。 算法的思想来自于Dijkstra(迪杰斯特拉)算法,大家在这里对这个算法就不介绍了。 可以在学完最短经的算法后,用这道题目当做练手。。我的算法还需要优化一下,代码也需要优化,因为我的代码确实有点乱。。下面的代码仅供参考。。 题目的链接:http://soj.me/1703 #includ...原创 2013-05-28 13:40:59 · 74 阅读 · 0 评论 -
sicily1825. Nickname
其实,这道题目的意思简单的。 大概的意思就是,把找到每一个字符串出现的次数,然后,按照字典顺序把字符串和出现的次数依次输出来。。 题目的链接: http://soj.me/1825 下面是我的代码,还有优化的需要,通过的时间为2.3S,题目限定的时间为3S #include <iostream>...原创 2013-05-28 13:40:29 · 82 阅读 · 0 评论 -
sicily1321. Robot
1321. RobotConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionKarell Incorporated has designed a new exploration robot that has the ability to explore new terrains, this new rob...原创 2013-05-27 08:44:24 · 121 阅读 · 0 评论 -
sicily1940. Ordering Tasks
1940. Ordering TasksConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is onl...原创 2013-05-27 08:43:47 · 102 阅读 · 0 评论 -
sicily6135. Blackjack
鉴于这道题目的数据量并不大,所以,暴力解决就可以啦。。所谓暴力,也就说,三重循环。。题目的链接: http://soj.me/6135 #include <iostream>#include <stdio.h>using namespace std;int main(){ int n, m; int count = 1...原创 2013-05-26 13:43:25 · 148 阅读 · 0 评论 -
sicily7911. Windows
这道题目,其实不用怎么想,数据有大,不过一次遍历搜索就可以完成。 首先读入数据,储存在数组中,然后从数组的尾部向前面搜索判断,就可以了。。 #include <iostream>#include <stdio.h>using namespace std;int main(){ int t; int n, ...2013-05-26 11:49:36 · 72 阅读 · 0 评论 -
sicily1010. Zipper
1010. ZipperConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionGiven three strings, you are to determine whether the third string can be formed by combining the characters in th...2013-08-18 08:57:52 · 93 阅读 · 0 评论