07 2015 档案
摘要:之前学过learn programming everybody,感觉水水的。。这门课看起来复杂一点。python真是一门神奇的语言,喜欢总体而言没什么难度,跟着他的提示走分分钟就可以搞定。。。用模运算来判断胜负很机智。突然想到当初北大校赛还是哪里的那道五行题。。。被自己蠢哭> <注意一下range的...
阅读全文
摘要:A. Currency System in GeraldionA magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several values. But the...
阅读全文
摘要:Longest Prefix给定一堆小字符串,问最长可以组成给定的大字符串的多少位前缀。类似于DP的思想,标记出结束位置。看最远结束在哪里。#include using namespace std;const int N = 1205;const int M = 200004;string ch...
阅读全文
摘要:Preface Numbering罗马数字的处理,问从1-N,各个IVX...什么的出现了多少次。我们可以用IVX表示出1-9XLC表示出10-90CDM表示出100-900统计出怎么出现的。接下来从高位往下减来表示就好了。#include using namespace std;char dir[...
阅读全文
摘要:TEXT里简单介绍了一下图论和Flood Fill Algorithms,感觉还是很有意义的,可以看看,http://www.wzoi.org/usaco/也是比较正常的翻译了,看起来不是机翻The Castlehttp://www.wzoi.org/usaco/12%5C105.asp大致就是给你...
阅读全文
摘要:Number Triangles经典DP。自控老师曾经用了一节课讲这道题。。我以为我早就懂了,居然听不懂那一堆奇怪的公式。果然自控是天书。#include using namespace std;const int N = 1004;int f[N][N], dp[N][N];int main(){...
阅读全文
摘要:同路径下生成要求的名字.cpp 和.in,可以把数据存进去。改下XXX YYY就能用了patpat只是因为太懒,望天#include using namespace std;string op;int main(){ cin >> op; freopen((op+".cpp").c_st...
阅读全文
摘要:Arithmetic Progressionshttp://www.wzoi.org/usaco/14%5C110.asp并没有看出哪里像搜索。。大概是我蠢,暴力过去了处理出所有的p^2+p^2的值,标记处有的值vis[i]在其中枚举a,以1-a+(n-1)*busing namespace std...
阅读全文
摘要:Mixing Milkhttp://www.wzoi.org/usaco/11%5C302.asp水贪心,肯定优先选单价小的#include using namespace std;const int N = 5005;typedef long long ll;struct point{ i...
阅读全文
摘要:http://www.wzoi.org/usaco/11%5C302.asppat没太水了没什么好说的。然而感觉如果不计代价的话,先把string reverse再比较是否相同来判断回文,好方便pat#include using namespace std;bool gao(int base, in...
阅读全文
摘要:http://www.wzoi.org/usaco/12%5C501.asppatpat 学习了一个新的stl函数eg. string poi = "poi"; reverse(poi.begin(), poi.end());就把poi变成了"iop"#include using namespa...
阅读全文
摘要:题意:http://www.wzoi.org/usaco/11%5C206.asp解法: 貌似解法是多种多样的 我的方法是,将字典里所有字母转为数字,然后检查是不是和输入相同 patpat#include using namespace std;typedef long long ll;ll ...
阅读全文
摘要:发现神站一枚http://www.wzoi.org/usaco/usaco的翻译。= =想到学姐之前吐槽CP让她们翻译usaco,再看看这名字= =卧槽果然是我们学校搞的。真是羡慕中学就能搞信息学之类的同学啊(这里:考不上竞赛班的蒟蒻一枚)http://www.wzoi.org/usaco/13%5...
阅读全文
摘要:给出最多13个数,从中选出6个数(升序)给出所有方案(升序输出)DFS水题#include #include #include using namespace std;const int N = 10;const int M = 16;int ans[N];int a[M];int n;void d...
阅读全文
摘要:有中文意思。注意HOLLY法月份和天数是一起滚动的= =要输出总组数,坑哭#include #include #include #include #include #includeusing namespace std;mapf;const int N = 22;char str[N][10] = ...
阅读全文
摘要:按逆序数从小到大排序。需要稳定排序。然而依然可以快排#include #include #include using namespace std;const int N = 55;const int M = 104;char str[M][N];struct point{ int num, ...
阅读全文
摘要:比赛的时候就出了5题,赛后发现其实很多题可以写,不知道为啥赛时这么逗比加坑队友,过两天做个总结5236Article29.45%(134/455)5237Base6441.67%(175/420)5238Calculator43.85%(82/187)5239Doom23.67%(138/583)5...
阅读全文
摘要:考试月结束,刷水题恢复一下手感,明天开始正式写。题意中文可见注意: 1.输出3-4格式,0补齐 2.不知道Q Z怎么处理 ,视为0了 3.输入时str开大,20的时候WA了 傻叉错: 循环完有还有一个没处理#include #include #include #include using ...
阅读全文

浙公网安备 33010602011771号