摘要: P2440 木材加工 真不是我想水题目,只是单纯我真的很水 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N = 100010; vector<int>l(N); int n, k; bool check(int x) { 阅读全文
posted @ 2025-05-19 09:23 Chuan81 阅读(50) 评论(0) 推荐(0)
摘要: P1100 高低位交换 单片机玩多了就会秒了owo 点击查看代码 #include<bits/stdc++.h> using namespace std; using ll = long long; using uint = unsigned int; int main() { uint a; ci 阅读全文
posted @ 2025-05-19 03:46 Chuan81 阅读(11) 评论(0) 推荐(0)
摘要: P1469 找筷子 亏我是电子信息大类的,异或想半天没想到 点击查看代码 #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); int n 阅读全文
posted @ 2025-05-19 03:41 Chuan81 阅读(8) 评论(0) 推荐(0)
摘要: P1143 进制转换 水一下 点击查看代码 #include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s; cin >> s; int m; cin >> m; reverse(s.begin( 阅读全文
posted @ 2025-05-19 02:47 Chuan81 阅读(8) 评论(0) 推荐(0)
摘要: P1331 海战 学太多东西反而容易想得太多做不出来 检测是否合法只需先搜索出以当前位置向右向下连续'#'的长度和深度, 在以这两个参数为长宽的矩阵中搜索是否存在'.', 存在就不合法,不存在就看一下这个矩阵周边半径一格位置是否有'#'(即其他船) 有其他船就不合法,否则就将这艘合法船所占空间全部标 阅读全文
posted @ 2025-05-19 02:31 Chuan81 阅读(11) 评论(0) 推荐(0)
摘要: P1083 [NOIP 2012 提高组] 借教室 这也太多二分题了 点击查看代码 #include<bits/stdc++.h> using namespace std; using ll = long long; const int N = 1e6+10; ll r[N]; ll d[N], s 阅读全文
posted @ 2025-05-18 20:22 Chuan81 阅读(12) 评论(0) 推荐(0)
摘要: P3406 海底高铁 这题就写我在写题遇到的两个坑 一、是从\(P_1\)出发,不是从点1出发。。。 二、times、a、b、c数组没开long long导致WA 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N = 1e 阅读全文
posted @ 2025-05-18 19:53 Chuan81 阅读(11) 评论(0) 推荐(0)
摘要: P3017 [USACO11MAR] Brownie Slicing G 为什么会塞蓝题啊我真的想不通啊 点击查看代码 #include<bits/stdc++.h> using namespace std; const int L = 510; int w[L][L], s[L][L]; int 阅读全文
posted @ 2025-05-18 19:02 Chuan81 阅读(13) 评论(0) 推荐(0)
摘要: P3916 图的遍历 水题也不会写啊我赣,这题要反向建图 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 10; vector<int> G[N]; vector<int> ans(N); vector< 阅读全文
posted @ 2025-05-18 16:40 Chuan81 阅读(9) 评论(0) 推荐(0)
摘要: P5318 【深基18.例3】查找文献 心态不好,得多做点水题 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 10; priority_queue<int, vector<int>, greater<i 阅读全文
posted @ 2025-05-18 16:13 Chuan81 阅读(5) 评论(0) 推荐(0)