07 2023 档案
摘要:(AtCoder Beginner Contest 312) A - Chord #include<bits/stdc++.h> using namespace std; #define int long long //#define int __int128 typedef pair<int,in
阅读全文
摘要:Educational Codeforces Round 76 (Rated for Div. 2) A - Two Rival Students 思路:最多可加x个距离,且最后的距离不能超过n-1 #include<bits/stdc++.h> using namespace std; #defi
阅读全文
摘要:互不侵犯KING 思路:dp[i][j][k]表示前i行,且已经用了j个国王,且第i行的摆放状态为k(二进制); dp[i][j][k]=dp[i-1][ j-num[now]][pre],now表示第i行的状态,pre表示上一行的状态,num[i]维护一行的状态为i的国王数量,且需保证now和pr
阅读全文
摘要:23暑假友谊赛No.2 雨 #include<bits/stdc++.h> using namespace std; #define int long long //#define int __int128 typedef pair<int,int>PII; typedef pair<string,
阅读全文
摘要:Codeforces Round 888 (Div. 3) A - Escalator Conversations 思路:求出每个人与Vlad的身高差d,若的能被k整除,且d/k<m则YES #include<bits/stdc++.h> using namespace std; #define i
阅读全文
摘要:AtCoder Beginner Contest 311 First ABC 思路:找到第一个a,b,c都出现的位置 #include<bits/stdc++.h> using namespace std; #define int long long //#define int __int128 t
阅读全文
摘要:Educational Codeforces Round 71 (Rated for Div. 2) A - There Are Two Types Of Burgers 思路:价格高的优先取 #include<bits/stdc++.h> using namespace std; #define
阅读全文
摘要:Codeforces Round 886 (Div. 4) A - To My Critics 思路:最大的两个数的和大于等于10则YES #include<bits/stdc++.h> using namespace std; #define int long long typedef pair<
阅读全文
摘要:Codeforces Round 501 (Div. 3) A - Points in Segments 思路:记录每个区间 #include<bits/stdc++.h> using namespace std; #define int long long //#define int __int1
阅读全文
摘要:23暑假友谊赛 马猴烧酒 思路:枚举对行的所有可能操作,判断列需要的操作次数是否满足条件; #include<bits/stdc++.h> using namespace std; #define int long long typedef pair<int,int>PII; typedef pai
阅读全文
摘要:Codeforces Round 885 (Div. 2) A - Vika and Her Friends 思路:移动后再判断,所以距离为奇数时朋友永远抓不到她 #include<bits/stdc++.h> using namespace std; #define int long long t
阅读全文
摘要:SMU Summer 2023 Contest Round 4 A - Telephone Number 思路:满足有8,且8后有大于等于11个数 #include<bits/stdc++.h> using namespace std; #define int long long typedef p
阅读全文
摘要:(AtCoder Beginner Contest 310) A - Order Something Else 思路:比较下打折和不打折的情况 #include<bits/stdc++.h> using namespace std; #define int long long typedef pai
阅读全文
摘要:Codeforces Round 875 (Div. 2) A - Twin Permutations 思路:让序列全相等为n+1即可 #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; typedef pai
阅读全文
摘要:Codeforces Round 884 (Div. 1 + Div. 2) A - Subtraction Game 思路:显而易见为a+b #include<bits/stdc++.h> using namespace std; #define int long long typedef pai
阅读全文
摘要:SMU Summer 2023 Contest Round 2 A - Treasure Hunt 思路:判断 Δx 和 Δy 能否分别整除 x 和 y ,求出需要的步数,两者的步数须同奇或同偶 #include<bits/stdc++.h> using namespace std; //#defi
阅读全文
摘要:SMU Summer 2023 Contest Round 1 A - The Contest 思路:求出最短解决问题总时间,在所有区间找出大于等于总时间的最短时刻。 #include<bits/stdc++.h> using namespace std; #define int long long
阅读全文
摘要:SMU Summer 2023 Contest Round 3 A - Curriculum Vitae 思路:要求0后不能有1,当某个数都不删时,值为前面所有的0的个数加后面所有1的个数,求出最大即可 #include<bits/stdc++.h> using namespace std; #de
阅读全文