代码 #include<bits/stdc++.h> using namespace std; void solve() { string s; cin >> s; int num = 0; for (int i = 3; i <= 5; i++) { num = num * 10 + s[i] - '0'; } if (num >= 350 || num <= 1 || num == 316) { cout << "No" << endl; } else { co...
KYOCERA Programming Contest 2021(AtCoder Beginner Contest 200) 题目链接https://atcoder.jp/contests/abc200 A - Century 简单的abs(n-1)/100+1即可 B - 200th ABC-200 按题意写代码点击查看代码 void solve(){ int n,k;cin>>n>>k; for(int i=1;i<=k;i++) { if(n%200==0)n/=200;...
代码: #include <bits/stdc++.h> using namespace std; const int N = 2e5 + 5; #define ls p << 1 #define rs p << 1 | 1 int q; int a[N]; struct Node { map<int, int> val; } t[N << 2]; void build(int p, int l, int r) { if (l == r) { t[p].val[a[l]...
}intmain(){ ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);intt=1;//cin>>t;for(inti=1;i<=t;i++)solve();return0; } B - Tetrahedral Number #include<bits/stdc++.h>usingnamespacestd;voidsolve(){intn; cin>>n;for(inti=0;i<=n;i++){for(intj=0;i+j<=n;j++){for(...
AtCoder Beginner Contest 163(D,E(区间dp),F(树上路径问题)),题目链接今天的题都很不错D-SumofLargeNumbers题意:求至少选k个数和的种类数。做法:刚开始感觉很难,涉及大数和、方案数。考虑k=2由于n+1个数是连续的,那我选最小的k个数求和:mi和最大的k个数求和:mx
AtCoder Beginner Contest 180 个人题解(快乐DP场) Here A - box 输出\(N - A + B\) B - Various distances 按题意输出 3 种距离即可 #include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(false), cin.tie(0);...
AtCoder Beginner Contest 342 A-G 讲解比赛地址:https://atcoder.jp/contests/abc342比赛时间: 2024-02-24(Sat) 20:00 - 2024-02-24(Sat) 21:40 (当地时间) (100 minutes)A Yay!:水题B Which is ahead?:水题C Many Replacement:模拟D S, 视频播放量 1861、弹幕量 2、
A - Wrong Answer 签到题 数据随便填 B - Adjacency Matrix 签到题只要记录一下每行为1的下标 C - 343 这题判断是否为立方数...
atcoder beginner contest 后缀数组例题atcoder beginner contest后缀数组例题 AtCoder Beginner Contest - Suffix Array Example Introduction: Suffix arrays are important data structures in string manipulation and analysis. They provide a way to efficiently sort all the suffixes of a given string or array. ...