- 博客(28)
- 收藏
- 关注
原创 18th I Wanna Be the Guy
a.题目链接Problem - 469A - Codeforces (Unofficial mirror site, accelerated for Chinese users)b题解#include <bits/stdc++.h>using namespace std;int main(){ int n; cin >> n; int m; cin >> m; vector<int>a(m); for(auto &i :
2022-05-31 16:33:26
73
原创 17th I_love_%username%
a.题目链接Problem - 155A - Codeforcesb.题解#include <bits/stdc++.h>using namespace std;int main(){ int n; cin >> n; vector<int>a(n,0); for(auto&i:a)cin >> i; int max_1 = a[0]; int min_1 = a[0]; int cnt = 0; for(
2022-05-30 18:30:07
284
原创 16th pangram
a.题目链接https://codeforces.com/problemset/problem/520/Ab.题解#include <bits/stdc++.h>using namespace std;int main(){ int n; cin >> n; string s; cin >> s; int ret; for(char a = 'A'; a<='Z'; a++){ ret = 0; for(int
2022-05-29 20:02:46
84
原创 14th 斯德哥尔摩的火车
a.题目链接PTA | 程序设计类实验辅助教学平台b.题解#include <bits/stdc++.h>using namespace std;int main(){ string s_1,s_2; string a_1, a_2; cin >> a_1 >> a_2; for(int i = 1; i < a_1.length(); i++){ if(a_1[i]%2 == a_1[i-1]
2022-05-27 22:27:24
91
原创 13th Choosing Team
a.题目链接Problem - 432A - Codeforcesb. 题解#include <bits/stdc++.h>using namespace std;int main(){ int n, k; cin >> n >> k; int cnt = 0; vector<int>a(n,0); for(auto &i:a)cin >> i; for(int i = 0; i<n; i++){
2022-05-27 21:43:41
70
原创 12 th Dog walking
a.题目链接Problem - D - Codeforceshttps://codeforces.com/contest/1680/problem/Db.这道题太难了,题解看了三天也没做出来。
2022-05-25 18:05:08
83
原创 11th Equal Candies
a.题目链接Problem - B - Codeforcesb.题解#include <iostream>#include <cstdlib>using namespace std;int main(){ int t; cin >> t; while(t--){ int a; cin >> a; int b = a; int *array = (int *)malloc(sizeof(int)*a);
2022-05-20 19:51:41
129
原创 11th AvtoBus
a.题目链接Problem - A - Codeforceshttps://codeforces.com/contest/1679/problem/Ab.题解#include <iostream>using namespace std;int main(){ int t; cin >> t; while(t--){ long long n; cin >> n; if(n%4!=2&&n%4!=0 || n&l
2022-05-20 19:43:20
141
原创 10th Binary String
a.题目Problem - 1680C - Codeforcesb.题解#include <bits/stdc++.h>using namespace std;int main(){ int t; for(cin >> t; t--; ){ int pre[200007]; string s; cin >>s; int n = s.length(); s = "?" + s; for(int i = 1; i<=n;
2022-05-18 21:21:54
171
原创 9th Robot
a.题目链接Problem - 1680B - Codeforceshttps://codeforces.com/problemset/problem/1680/Bb.题解#include <bits/stdc++.h>using namespace std;int main(){ int s[5][5]; int t; for(cin >> t; t--;){ int r,l; cin >&g
2022-05-18 21:15:28
76
原创 8th Minimums and Maximums
a.题目链接:Problem - A - Codeforces (Unofficial mirror site, accelerated for Chinese users)https://codeforces.ml/contest/1680/problem/Ab.我的做法#include <iostream>using namespace std;int main(){ int t; cin >> t; while(t--){ int l1,r1,l
2022-05-16 23:19:44
197
原创 8th Vanya and Fence
a.题目链接Problem - 677A - Codeforceshttps://codeforces.com/problemset/problem/677/Ab.我的做法:#include <iostream>using namespace std;int main(){ int t, f, n, h;//这种情况就不需要用到数组,直接用一个值来代替输入 cin >> t >> f; n = 0; while(t--){//这里不需要用到f
2022-05-13 10:53:57
106
原创 7th Word
a.题目链接Problem - 59A - Codeforceshttps://codeforces.com/problemset/problem/59/Ab.做法#include <iostream>#include <string>using namespace std;int main(){ string s; cin >> s; int set = 0; int ret = 0; for(int i=0; i<s.length()
2022-05-13 10:36:47
92
原创 6th In Search of an Easy Problem
a.题目链接Problem - 1030A - Codeforceshttps://codeforces.com/problemset/problem/1030/Ab.我的做法#include <cstdio>#include <iostream>using namespace std;int main(){ int t; cin >> t; int n; int set = 0; while(t--){ cin >> n;
2022-05-12 22:19:00
138
原创 5th Helpful Math
a. 题目链接Problem - 339A - Codeforces (Unofficial mirror site, accelerated for Chinese users)https://codeforces.ml/problemset/problem/339/Ab.我的做法:#include <cstdio>#include <iostream>#include <cstring>using namespace std;int mai
2022-05-11 19:11:18
74
原创 4-th A Watermelon
a.题目链接https://codeforces.com/problemset/problem/4/Ahttps://codeforces.com/problemset/problem/4/Ab.我的做法#include <stdio.h> int main(){ int weigh; scanf("%d", &weigh); if(weigh%2 == 0 && weigh != 2){ printf("Yes")
2022-05-09 20:57:21
74
原创 3rd A-B数对
a.题目链接A-B 数对 - 洛谷https://www.luogu.com.cn/problem/P1102b.我的做法:#include <stdio.h>#include <iostream>// 第一行输入两个整数 -- 第一个是那串处理的数字的个数 , 第二个是要求的结果,题目保证了c是一个// 正整数, 输入数据绝对值小于2 的30次 也就是说输入的每个数据用int类型来存储。而且呢,说明输入量小于2e10,//也就是可以用2e10+1大小的数组来
2022-05-07 18:22:19
269
原创 2nd 二分查找法基础练习
a.题目链接:【深基13.例1】查找 - 洛谷https://www.luogu.com.cn/problem/P2249b.我的解法:#include <stdio.h>#include <stdlib.h>int main(){ int length; int times; scanf("%d %d", &length, ×); int* array_value = (int*)malloc(sizeof(int) *
2022-05-07 18:07:20
407
1
原创 1st 个位数统计
ltPTA | 程序设计类实验辅助教学平台千名教师建设,万道高质量题目,百万用户拼题的程序设计实验辅助教学平台https://pintia.cn/problem-sets/994805046380707840/problems/994805143738892288 以上为题目链接。#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ char ac[1001]; char
2022-05-05 22:14:52
273
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人