
codeforces
DrumWashingMachine
菜鸡选手
展开
-
Educational Codeforces Round 93 (Rated for Div. 2)题解
Educational Codeforces Round 93 (Rated for Div. 2) 题解 A. Bad Triangle 排序之后只用看第一个 第二个 和最后一个元素是否满足条件即可 #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef long long ll; typedef unsigned long long ull; typedef long double ld;原创 2020-08-15 01:33:54 · 820 阅读 · 0 评论 -
Codeforces Round #662 (Div. 2) 题解.
Codeforces Round #662 (Div. 2) 题解 A. Rainbow Dash, Fluttershy and Chess Coloring 阅读题,题意比较难理解,但是读懂题多画几个例子之后就能发现答案其实就是 ans=n/2+1; #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int t,n; int main() {原创 2020-08-08 02:22:39 · 244 阅读 · 0 评论 -
Codeforces Round #661 (Div. 3) 题解
Codeforces Round #661 (Div. 3) A. Remove Smallest #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef long long ll; typedef unsigned long long ull; typedef long double ld; const int N=100; int t,n,a[N]; int main() {原创 2020-08-06 22:22:07 · 391 阅读 · 0 评论 -
cf-474D题解
CF-474D 很多人说是个dp,但其实更多的应该和数学递推关系更大,其实和紫书上的fibonacci数列的递推方法一样 我们先假设k=2,len=5时: 5=1+1+1+1+1(RRRRR) 5=2+1+1+1(WWRRR) 5=1+2+1+1(RWWRRR) 5=1+1+2+1(RRWWR) 5=1+1+1+2(RRRWWW) 5=2+2+1(WWWWR) 5=2+1+2(WWRWW) 5=1+2+2(RWWWW) 其中有5种方法第一次先选了R,有3种方法第一次先选了W。 假设f(n)为长原创 2020-07-11 20:56:00 · 423 阅读 · 0 评论 -
Codeforces Round #653 (Div. 3)题解
A.Required Remainder 传送门 #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef long long ll; typedef unsigned long long ull; typedef long double ld; int t,x,y,n; int main() { ios::sync_with_stdio(false); cin>>原创 2020-06-29 16:45:11 · 294 阅读 · 0 评论 -
Educational Codeforces Round 90 (Rated for Div. 2)题解
A. Donut Shops 题目传送门 水题,就用a * b和c比一下大小就行了,要求买第一种饼干便宜的情况就假设只买一块,比较a和c的大小,求买第二种便宜就比较 a * b和c比大小就行了 #include<bits/stdc++.h> using namespace std; #pragma GCC optimize(2) typedef long long ll; typedef unsigned long long ull; typedef long double ld; ll t原创 2020-06-26 04:09:47 · 376 阅读 · 0 评论 -
Codeforces Round #651 (Div. 2)
A. Maximum GCD 题目链接 水题,n/2向下取整一定能得到最大的gcd,在此就不证明了(太菜了,不怎么会证,太菜了太菜了。 #include<bits/stdc++.h> using namespace std; const int maxn = 1e5+10; int t, n; int main() { ios::sync_with_stdio(false); cin >> t; while(t--) { cin >原创 2020-06-22 00:57:08 · 174 阅读 · 0 评论 -
Codeforces Global Round 8
A. C+= 题目链接 水题,就每一次用小的加大的,保留大的就行了 具体看代码叭 #include<bits/stdc++.h> using namespace std; int t,a,b,n; int main() { ios::sync_with_stdio(false); cin>>t; while(t--){ cin>>a>>b>>n; if(b>a) swap(a,b);原创 2020-06-20 00:00:49 · 132 阅读 · 0 评论