04 2019 档案

摘要:#include#include#include#includeusing namespace std;char code[1000][100];bool solve(int p){ for(int i = 1; i < p; i++) {... 阅读全文
posted @ 2019-04-30 22:04 DIY-Z 阅读(117) 评论(0) 推荐(0)
摘要:题意分析: 将字符串倒着存入int数组中,每次加完后再取余除去大于10的部分关键:倒着存入,这样会明显缩短代码量。#include#include#includeusing namespace std;const int maxn = 100 + 10... 阅读全文
posted @ 2019-04-29 21:06 DIY-Z 阅读(95) 评论(0) 推荐(0)
摘要:#includeusing namespace std;int solve(int &W) /*这里一定要用引用,为了赋给它值*/{ int wl, dl, wr, dr; cin >> wl >> dl >> wr >> dr... 阅读全文
posted @ 2019-04-29 20:09 DIY-Z 阅读(93) 评论(0) 推荐(0)
摘要:刚开始把题意理解错了,结果样例没过,后来发现每天只处理最大和最小的,其余的不管,也就是说昨天的元素会影响今天的最大值和最小值,如果模拟的话明显会超时,故用multiset,另外发现rbegin()的功能,收获蛮多的。 ps:关于rbegin()的介绍:https://blog.csdn.net/kj 阅读全文
posted @ 2019-04-27 21:55 DIY-Z 阅读(166) 评论(0) 推荐(0)
摘要:错了好多遍,不知道为啥出错,如果有大神发现,请求指点!!!附错误代码(错的不知道怎么回事): #include#include#includeusing namespace std;const int maxn = 32 + 5;int hblock[... 阅读全文
posted @ 2019-04-25 15:48 DIY-Z 阅读(120) 评论(0) 推荐(0)
摘要:#include #include #include #include #include using namespace std; struct Point { int x_, y_; int route; }; int dic[8][2] = {-1,2 ,1,2 ,2,1 ,2,-1 ,1,-2 ,-1,-2 ,-2,-1 ,-2,1}; int vis[10][10]; ... 阅读全文
posted @ 2019-04-25 00:32 DIY-Z 阅读(141) 评论(0) 推荐(0)