上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页
摘要: A 发现长度为 $2$ 的一定是最好的。 #pragma GCC optimize("O3") #include<bits/stdc++.h> using namespace std; #define endl '\n' #define debug(x) cerr << #x << ": " << 阅读全文
posted @ 2021-07-30 11:39 HinanawiTenshi 阅读(62) 评论(0) 推荐(0)
摘要: 这题细节还挺多的。 分析 拿到题目先拿样例找一下性质。 对于最初的局面,发现如果有一个位置出现 X ,那么它的左边两个或者右边两个位置只要存在 X ,那么先手必然胜利。 如果不存在上面的情况,我们就可以枚举一下先手决策的位置,看看所得到的状态能不能让后手必输。 这时候我们想到用 sg 函数来刻画这一 阅读全文
posted @ 2021-07-28 20:52 HinanawiTenshi 阅读(54) 评论(0) 推荐(0)
摘要: C 签到题,看看最多加多少条边这个图还是树。 int main(){ int a, b; cin>>a>>b; int res=a*b; if(res&1) puts("NO"); else puts("YES"); return 0; } D 签到题 模拟 int main(){ int T; c 阅读全文
posted @ 2021-07-23 22:03 HinanawiTenshi 阅读(57) 评论(0) 推荐(0)
摘要: 补一波牛客多校的题解~ A 这题我的想法是记忆化搜索,如果当前状态能够转移到必败态,那么当前状态就是必胜态。 直接枚举的话复杂度是 \(O(N^3logN)\) ,所以我打了个表,将所有必败态存了下来。 下面是 generator ,因为打表程序已经被我丢掉了所以就贴截图了(悲 然后这是 AC 代码 阅读全文
posted @ 2021-07-23 21:50 HinanawiTenshi 阅读(772) 评论(0) 推荐(0)
摘要: 传送门:https://atcoder.jp/contests/abc171/submissions/me A #include<bits/stdc++.h> using namespace std; int main(){ char t; cin>>t; putchar(islower(t)? ' 阅读全文
posted @ 2021-07-19 21:33 HinanawiTenshi 阅读(75) 评论(0) 推荐(0)
摘要: 我怎么又是这个点写题解 这套题还是挺简单的(确信 传送门:https://atcoder.jp/contests/abc170 A #include<bits/stdc++.h> using namespace std; int main(){ int res; for(int i=1; i<=5; 阅读全文
posted @ 2021-07-19 00:11 HinanawiTenshi 阅读(79) 评论(0) 推荐(0)
摘要: A #include<bits/stdc++.h> using namespace std; int main(){ int a, b; cin>>a>>b; cout<<a*b<<endl; return 0; } B 为了避免溢出就用 py 写了 import sys n=int(input() 阅读全文
posted @ 2021-07-16 21:38 HinanawiTenshi 阅读(56) 评论(0) 推荐(0)
摘要: 传送门:https://atcoder.jp/contests/abc168/tasks A #include<bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int t=a%10; if(t==2 || t==4 || 阅读全文
posted @ 2021-07-15 22:21 HinanawiTenshi 阅读(49) 评论(0) 推荐(0)
摘要: 半夜写的的题解(www A 也可以 pop_back(b) 来判断 #include<bits/stdc++.h> using namespace std; int main(){ string a, b; cin>>a>>b; for(char i='a'; i<='z'; i++){ if(a+ 阅读全文
posted @ 2021-07-14 00:24 HinanawiTenshi 阅读(47) 评论(0) 推荐(0)
摘要: 传送门:https://atcoder.jp/contests/abc165/tasks A #include<bits/stdc++.h> using namespace std; int main(){ int k, a, b; cin>>k>>a>>b; for(int i=a; i<=b; 阅读全文
posted @ 2021-07-12 22:56 HinanawiTenshi 阅读(61) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页