
Codeforces题解
文章平均质量分 54
(ˉ▽ ̄~)
_zpf
这个作者很懒,什么都没留下…
展开
-
codeforces round 820 A~F
。原创 2022-10-01 12:09:54 · 486 阅读 · 0 评论 -
codeforces educational round 132(ABCDE没有F)
cf edu 132原创 2022-08-27 16:16:33 · 215 阅读 · 0 评论 -
codeforces educational round 131 ABCDEF
codeforces educational round 131 ABCDEF全部题解原创 2022-07-18 23:18:32 · 311 阅读 · 0 评论 -
codeforces round #797 ABCDEFG
codeforces round #797 ABCDEFG题解及代码原创 2022-07-14 17:32:05 · 181 阅读 · 0 评论 -
codeforces round #805 ABCDEFG
codeforces round#805 div3 ABCDEFG 的题解原创 2022-07-14 16:22:57 · 345 阅读 · 0 评论 -
codeforces round 771
cf771原创 2022-05-11 12:45:57 · 413 阅读 · 0 评论 -
atcoder beginner contest 247 ABCDEF
文章目录ABCDEF原创 2022-05-05 10:38:52 · 234 阅读 · 0 评论 -
2015-2016 Northwestern European Regional Contest (NWERC 2015)
AE题,剩下还没写原创 2022-05-05 10:36:09 · 222 阅读 · 0 评论 -
Codeforces Round 770全部
文章目录ABCDEFA执行一次操作后字符串会编程镜像串,因此,答案只有1和2两种,分类讨论即可。#include<bits/stdc++.h>using namespace std;typedef long long ll;#define endl '\n'const int mod=998244353;const int N=200100;int solve(){ int n,k; cin>>n>>k; string a,b;原创 2022-02-19 11:23:09 · 511 阅读 · 0 评论 -
codeforces round #769 ABCD
文章目录ABCDA对于一个字符串,如果长度大于等于3,那么必然存在回文子串。如果长度是2,如果两个字母相同,就存在回文子串。#include<bits/stdc++.h>using namespace std;typedef long long ll;#define endl '\n'const int mod=998244353;const int N= 500100;void solve(){ string s; int n; cin>>n&原创 2022-02-06 13:55:37 · 661 阅读 · 0 评论 -
Codeforces round #764 ABCDG
文章目录ABCDGA最大值减最小值#include<bits/stdc++.h>using namespace std;int main(){ int t; cin>>t; while(t--){ int minn=0x3f3f3f3f,maxn=0; int n; cin>>n; for( int i=1;i<=n;i++){ int x;原创 2022-01-15 17:29:06 · 436 阅读 · 0 评论 -
Codeforces Round #762 (Div. 3) 全部题解
文章目录A. Square String?B. Squares and CubesC. Wrong AdditionD. New Year's ProblemE. MEX and IncrementsF. Let's Play the Hat?H. Permutation and QueriesA. Square String?#include<bits/stdc++.h>using namespace std;int main(){ int t; cin>>原创 2021-12-28 20:01:29 · 590 阅读 · 0 评论 -
Codeforces Round #760 (Div. 3)ABCDEFG
文章目录A.Polycarp and Sums of SubsequencesB.Missing BigramC. Paint the ArrayD. Array and OperationsE. Singers' TourF. ReverseG. Trader ProblemA.Polycarp and Sums of Subsequences最大值一定是三个数的和,次大值一定是最大的两个数的和,次次大值一定是最大值和次大值的和。#include<bits/stdc++.h>using原创 2021-12-24 18:22:12 · 919 阅读 · 0 评论 -
Codeforces Round #759 (Div. 2, based on Technocup 2022 Elimination Round 3)ABCDE
文章目录A. Life of a FlowerB. Array EversionC. Minimize DistanceD. Yet Another Sorting ProblemA. Life of a Flower#include<bits/stdc++.h>using namespace std;typedef unsigned long long ull;const int N=110;int w[N];int main(){ int t; cin>>t;原创 2021-12-27 20:55:07 · 354 阅读 · 0 评论 -
codeforces round #743
文章目录A. CountdownB. SwapsC. BookA. Countdown#include<bits/stdc++.h>using namespace std;typedef long long ll;#define N 200100int main(){ int t; cin>>t; while(t--){ int n; string s; cin>>n>>s; ll ans=0; for( int i=n-原创 2021-09-20 14:41:06 · 188 阅读 · 0 评论 -
codeforces round#740
A. Simply Strange Sort数据规模不大,可以直接模拟#include<bits/stdc++.h>using namespace std;#define N 6010int a[1010];int n;typedef long long ll;const ll mol=1e9+7;int check(){ for( int i=1;i<=n;i++){ if(a[i]!=i) return 0; } return 1;}int main(){原创 2021-08-25 18:02:51 · 212 阅读 · 0 评论 -
codeforces round#739
A. Dislike of Threes#include<bits/stdc++.h>using namespace std;typedef long long ll;int main(){ int t; cin>>t; while(t--){ int k; cin>>k; int cnt=1; int now=1; for( int cnt=1;cnt<k;){ now++; if(now%3==0||now%10==原创 2021-08-24 17:46:48 · 135 阅读 · 0 评论 -
codeforces round #738
A. Mocha and Math题目大意:给一个数组,可以取任意一个子区间,对区间内的所有数做按位与运算,求最后整个数组的最小值。解析:贪心算法,直接求所有数的按位与。#include<bits/stdc++.h>using namespace std;typedef long long ll;int t;int main(){ cin>>t; while(t--){ int n; cin>>n; int ans=0; cin>原创 2021-08-16 16:20:42 · 106 阅读 · 0 评论 -
codeforces round #704题解
codeforces round #704题解A. three swimmers题目大意:有三个人游泳,他们到达岸边的时间分别是a,b,c的倍数,同时,你会在第p秒到达岸边,请问你到达岸边后最少过多长时间会遇到某个游泳的人?解析:分两种情况,如果q可以被a,b,c整除,结果是0,如果不能整除,计算边界情况,语言无法表达。。。。。看代码#include<bits/stdc++.h>using namespace std;int main(){ int t; cin>>t原创 2021-02-27 12:27:05 · 150 阅读 · 2 评论 -
codeforces round #702题解
A. Dense Array题目大意:给定一个数组,插入任意数字,要使数组的所有相邻两项满足,那么最多需要进行多少次插入操作?解析:贪心算法#include<bits/stdc++.h>using namespace std;int a[100];int main(){ int t; cin>>t; while(t--){ int n; scanf("%d",&n); for( int i=1;i<=n;i++){ scanf(原创 2021-02-20 22:59:00 · 218 阅读 · 0 评论 -
Codeforces Good Bye 2021: 2022 is NEAR ABCDE
文章目录A. Integer DiversityB. Mirror in the StringC. Representative EdgesD. Keep the Average HighE. Lexicographically Small EnoughA. Integer Diversity#include<bits/stdc++.h>using namespace std;typedef long long ll;const int inf=0x3f3f3f3f;const in原创 2022-01-03 09:56:21 · 611 阅读 · 0 评论 -
Educational Codeforces Round 122 (Rated for Div. 2)
文章目录ABCDA个位从0到9进行枚举,直到能被7整除#include<bits/stdc++.h>using namespace std;typedef long long ll;#define endl '\n'const int N=100100;int solve(){ int n; cin>>n; if(n%7==0){ return n; } else { n=n/10*10; for( i原创 2022-02-06 13:54:47 · 259 阅读 · 0 评论 -
Educational Codeforces Round 119 ABCDE
文章目录A. Equal or Not EqualB. Triangles on a RectangleD. Exact ChangeE. Replace the NumbersA. Equal or Not Equal#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=100100;int w[N],vis[N];int main(){ int t; cin>>t;原创 2021-12-27 17:39:51 · 271 阅读 · 0 评论 -
Educational Codeforces Round 118 (Rated for Div. 2)ABCDEF
文章目录A. Long ComparisonB. Absent RemainderC. Poisoned DaggerD. MEX SequencesE. Crazy RobotA. Long Comparison先将两个数的数字部分补充成相同的长度,在比较两个数的长度,如果长度相同,就比较数字部分的大小。#include<bits/stdc++.h>using namespace std; typedef long long ll;int main(){ int t;原创 2021-12-02 20:06:03 · 767 阅读 · 0 评论 -
Codeforces Deltix Round, Summer 2021题解
文章目录A. A Variety of OperationsTake Your Places!C. Compressed Bracket SequenceD. Take a GuessA. A Variety of Operations如果两个数相差是奇数,就输出-1。如果相差是偶数,就输出2相等就输出0#include <bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; for(原创 2021-09-19 17:02:06 · 348 阅读 · 0 评论 -
Codeforces Deltix Round, Autumn 2021 (open for everyone, rated, Div. 1 + Div. 2)(还差4个题)
文章目录A. Divide and MultiplyB. William the VigilantC. Complex Market AnalysisD. Social NetworkA. Divide and Multiply#include<bits/stdc++.h>using namespace std;long long w[20];int main(){ int t; cin>>t; while (t--) { int n;原创 2021-12-06 19:53:32 · 827 阅读 · 0 评论