sicily
程序与算法
我不聪明但很努力
展开
-
sicily 1001. Alphacode
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode their messages: Alice: "Let's just u原创 2013-08-19 23:21:47 · 875 阅读 · 0 评论 -
sicily1784. Road Toll
ConstraintsTime Limit: 1 secs, Memory Limit: 64 MBDescriptionThere are N cities, identified from 1 to N. There is one and only one road between every two cities. When somebody goes throu原创 2013-09-17 12:08:30 · 455 阅读 · 0 评论 -
sicily1166. Computer Transformat
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionA sequence consisting of one digit, the number 1 is initially written into a computer. At each successive time step, the原创 2013-08-31 22:11:56 · 499 阅读 · 0 评论 -
sicily8034. F7 Championship
DescriptionThe fictional World Championship of Formula 7 Drivers 2013 was characterized by exciting races and frequent shifts of driver positions on the leaderboard. Antun has missed most of it原创 2013-08-18 14:42:50 · 598 阅读 · 0 评论 -
sicily1137. 河床
//这道题目有点水,读懂题目,一次搜索,然后//然后,标记好每一个位置的最大连续长度即可。。#include #include #include using namespace std;int main(){ int n, k; int a[30009]; cin >> n >> k;原创 2013-08-18 14:41:48 · 648 阅读 · 0 评论 -
sicily1134.积木分发
#include using namespace std;class child{public: child(){} int have; int need;};int main(){ int num, sum; while (true) { cin >> num >> sum; if (num == 0) {原创 2013-08-18 14:43:01 · 536 阅读 · 0 评论 -
sicily1190. Reduced ID Numbers
这道题目,个人认为比较水。只要利用合适的数据结构就可以很快的通过。个人算法能力不是很好,通过的时间为0.83s,题目要求的时间上限为2s。可以看出,我的以下这个算法并不是很好。代码仅供参考。若有更好的算法,欢迎私信我。共同学习,共同进步。。#include #include #include using namespace std;int main(){ int t;原创 2013-08-18 14:43:11 · 581 阅读 · 0 评论 -
sicily4086. 韩信点兵
水题一道,直接暴力解决就行啦。#include using namespace std;int main(){ int t; cin >> t; int a, b, c; while (t --) { cin >> a >> b >> c; int tem = -99; for (int原创 2013-08-18 14:42:17 · 590 阅读 · 0 评论 -
sicily1687. Permutation
1687. PermutationConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionPermutation plays a very important role in Combinatorics. For example, 1 2 3 4 5 and 1 3 5 4 2 are both 5-perm原创 2013-08-28 19:41:11 · 700 阅读 · 0 评论 -
sicily1034. Forest
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionIn the field of computer science, forest is important and deeply researched , it is a model for many data structures . Now it’s you原创 2013-08-28 19:03:33 · 579 阅读 · 0 评论 -
sicily9457. Typo
Description Bessie has just purchased a new laptop computer, but she unfortunately finds herself unable to type well, given the size of her large hooves relative to the small keyboard. Bessie has原创 2013-11-26 22:01:08 · 886 阅读 · 0 评论