摘要: 思路: 题目标签是记忆化搜索,但是这种题我用的拓扑排序 首先建好图,将多余的边删掉,再从A点开始拓扑到B点,如果可以推到其他无出边的点,则不是逻辑自洽。路上记录边数即可求出A到B的条数。 Tip: 拓扑排序注意拓扑到B点就立刻停止,如果WA了测试点4极有可能是这种情况。 #include <bits 阅读全文
posted @ 2020-11-29 15:46 Whiteying 阅读(539) 评论(1) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 200 + 5; const int INF = 0x7FFFFFFF; int mp[maxn 阅读全文
posted @ 2020-11-29 15:45 Whiteying 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 满二叉树和完全二叉树的性质 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1000 + 5; struct point { int num; po 阅读全文
posted @ 2020-11-29 15:43 Whiteying 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 思路: 首先建一个全局vector存有相关症状的人,再建一个局部vector存每一天的申请信息,排序后进行筛选。 Tip: 操作顺序: 检查身份证合法性 对于有相关症状的人员进行记录 排序 按照规则发放口罩 任何一步顺序都不能调换和丢失,否则本题无法通过。 #include <bits/stdc++ 阅读全文
posted @ 2020-11-29 15:41 Whiteying 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; typedef long long ll; stack<int> s1; stack<char> s2; int main() { int n; cin >> n; for 阅读全文
posted @ 2020-11-29 15:40 Whiteying 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 这题没想到很多人都错了,这里有两个容易错的点需要注意: (0 表示的是这个位置上的数字初始时就能看见了,而不是彩票上的数字为 0。)这句话特意标黑了,意思是1-9这九个数都出现仅出现一次,如果1-8出现了,那么这个0的位置代表9这个数字 翻开不翻开数字是不会变化的!我队 阅读全文
posted @ 2020-11-29 15:39 Whiteying 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n, m; cin >> n >> m; ll len = pow(2, n); string 阅读全文
posted @ 2020-11-29 15:38 Whiteying 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 这题我看好多人用的暴力,这里推荐一下string里的find函数,很方便 #include <bits/stdc++.h> using namespace std; int main() { string s; int n = 0; int num = 0; int i 阅读全文
posted @ 2020-11-29 15:37 Whiteying 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; int a[5]; int di, yu, maxx; int indexx; int main() { bool flag1 = false; bool flag2 = f 阅读全文
posted @ 2020-11-29 15:36 Whiteying 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 注意for循环中不要cin读入double数组,队友亲自实验读入数组会WA测试点2 #include <bits/stdc++.h> using namespace std; int main() { double n; double ans = 0; cin >> n 阅读全文
posted @ 2020-11-29 15:35 Whiteying 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; int main() { double a, b, c; cin >> a >> b >> c; if (b == 0) { a *= 2.455; printf("%.2l 阅读全文
posted @ 2020-11-29 15:34 Whiteying 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << a * b * c << endl; return 0; } 阅读全文
posted @ 2020-11-29 15:33 Whiteying 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; int main() { cout << "Talk is cheap. Show me the code." << endl; return 0; } 阅读全文
posted @ 2020-11-29 15:31 Whiteying 阅读(189) 评论(0) 推荐(0) 编辑
摘要: L1-1 嫑废话上代码 (5分)L1-2 猫是液体 (5分)L1-3 洛希极限 (10分)L1-4 调和平均 (10分) L1-5 胎压监测 (15分)L1-6 吃火锅 (15分)L1-7 前世档案 (20分)L1-8 刮刮彩票 (20分) L2-1 简单计算器 (25分)L2-2 口罩发放 (25 阅读全文
posted @ 2020-11-29 15:30 Whiteying 阅读(784) 评论(0) 推荐(0) 编辑