随笔分类 - 水题
摘要: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 ...
        阅读全文
                
摘要:给出最多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, ...
        阅读全文
                
                    
                
浙公网安备 33010602011771号