上一页 1 2 3 4 5 6 7 8 9 10 ··· 31 下一页
摘要: A. Special Permutation #include<bits/stdc++.h> using namespace std; #define int long long //#define int __int128 #define double long double typedef pa 阅读全文
posted @ 2023-11-25 22:56 PHarr 阅读(3) 评论(0) 推荐(0) 编辑
摘要: A. Odd Divisor #include<bits/stdc++.h> using namespace std; #define int long long //#define int __int128 #define double long double typedef pair<int,i 阅读全文
posted @ 2023-11-22 21:42 PHarr 阅读(5) 评论(0) 推荐(0) 编辑
摘要: A - 营救普雷赛斯 #include <bits/stdc++.h> using namespace std; #define int long long using i32 = int32_t; using vi = vector<int>; using pii = pair<int, int> 阅读全文
posted @ 2023-11-20 13:24 PHarr 阅读(10) 评论(0) 推荐(0) 编辑
摘要: A - Takahashi san #include <bits/stdc++.h> using namespace std; #define ll long long using vi = vector<int>; int main(){ ios::sync_with_stdio(false); 阅读全文
posted @ 2023-11-14 22:11 PHarr 阅读(11) 评论(0) 推荐(0) 编辑
摘要: A - Weak Beats #include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using vi = vector<int>; int main() { ios::sync_with_stdio(fal 阅读全文
posted @ 2023-11-13 21:20 PHarr 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 2899. 上一个遍历的整数 感觉读题比较困难 class Solution { public: vector<int> lastVisitedIntegers(vector<string>& words) { vector<int> res , a ; for( int i = 0 , cnt = 阅读全文
posted @ 2023-11-12 23:04 PHarr 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 外校打星队伍,排名22/450,还算凑合吧。 A. A+B问题 直接枚举进制 #include <bits/stdc++.h> using namespace std; using vi = vector<int>; void solve() { string str; vi a, b, s; ci 阅读全文
posted @ 2023-11-10 18:24 PHarr 阅读(78) 评论(0) 推荐(1) 编辑
摘要: A - ab #include<bits/stdc++.h> using namespace std; #define mp make_pair #define int long long using vi = vector<int>; using pii = pair<int, int>; con 阅读全文
posted @ 2023-11-08 16:25 PHarr 阅读(33) 评论(0) 推荐(0) 编辑
摘要: A. Treasure Chest 分类讨论一下,只有两种情况。 走到钥匙处,然后走到箱子处 走到箱子处,移动箱子,走到钥匙处,走回箱子处 对于第二种情况可以直接枚举箱子被移动到的位置 #include <bits/stdc++.h> using namespace std; #define int 阅读全文
posted @ 2023-11-04 15:29 PHarr 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 二分图 定义 给一张无向图,可以把点分成两个不相交的非空集合,并且在同一集合的点之间没有边相连,那么称这张无向图为一个二分图。 二分图的判定 一张无向图是二分图,当且仅当图中不存在奇环。 vector<vector<int>> e; vector<int> v; // 会把所有的点染成 1 2 两种 阅读全文
posted @ 2023-10-19 14:00 PHarr 阅读(19) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 31 下一页