也可以pop_back(b)来判断 cpp #include<bits/stdc++.h>usingnamespacestd;intmain(){string a, b; cin>>a>>b;for(chari='a'; i<='z'; i++){if(a+i==b){puts("Yes");return0;}}puts("No");return0;} B 似乎和标程一致hh
2. Re: AtCoder Beginner Contest 167 能够破碎的人,必定真正活过。林黛玉的破碎,在于她有刻骨铭心的爱情;三毛的破碎,源于她历经沧桑后一刹那的明彻与超脱;凡高的破碎,是太阳用黄金的刀子让他在光明中不断剧痛,贝多芬的破碎,则是灵性至极的黑白键... --前方一片光明 3. Re: AtCoder Beginner Contest 167...
核心思想:贪心 我把用l记录左括号的个数, 用r记录右括号的个数, 要是有左括号l++, 如果l不是0, 遇到右括号l--,如果这个字符串合法, 那么l 与 r 一定都等于0, 且这个字符串的所有前缀, l都大于或等于0 且r 等于0. 有了上面的知识就可以贪心构造了。 合法的字符串所有前缀l都大于等于0且r等于0, ...
AtCoder Beginner Contest 167 (A~F,DEF Good) https://atcoder.jp/contests/abc167/tasks AB水题, C - Skill Up 题意: 初始时 \(m\) 个算法的能力均为 \(0\),\(n\) 次中每次可以花费 \(c_i\) 元提升 \(m\) 个算法的能力(提升程度可能不等),问 \(m\) 个算法能力都提升到...
We will hold AtCoder Beginner Contest 167. Contest URL: https://atcoder.jp/contests/abc167 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20200510T2100&p1=248 Duration: 100 minutes Number of Tasks: 6 Writer: gazelle, kort0n, kyopro_friends, potetisensei, she...
·AtCoder Beginner Contest (ABC) 这是最频繁且最简单的入门赛,通常情况下每月至少举行2次。2019年4月27日(含)之前,每场比赛共4题,时长100分钟,满分1000分且Rating超过1199的选手不计Rating值。自2019年5月19日起改版升级为6道题目,时长不变,满分2100分且Rating值超过1999的选手不计Rating值。改版之后比赛质量...
We will hold AtCoder Beginner Contest 166. Contest URL: https://atcoder.jp/contests/abc166 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20200503T2100&p1=248 Duration: 100 minutes Number of Tasks: 6 Writer: gazelle, kort0n, kyopro_friends, sheyasutaka, ynym...
AtCoder Beginner Contest 166 (A~E)比赛链接:Here AB水题 C - Peaks 题意: 给出(n) 个观察台的高度,以及 (m) 条边,定义“好观察台”:比所有直接相连的观测台都高 思路: 因为道路是双向的,互相判断一下即可 a &= bool 这个写法学习了 int main() { cin.tie(nullptr)->sync_with_stdio(false);...
AtCoder Beginner Contest 287-E题(字典树/Trie https://zhuanlan.zhihu.com/p/603720615 AtCoder Beginner Contest 287 D 和 E https://zhuanlan.zhihu.com/p/602258994 AtCoder Beginner Contest 287 DEF EX https://zhuanlan.zhihu.com/p/613355266 ...
AtCoder Beginner Contest 402 A-F 简易题解,如果题解中有什么问题可以找我反馈,谢谢! A.CBC直接枚举整个字符串,只输出大写字母即可。 int main(){ string s; cin >> s; for(int i = 0 ; i < s.size(); i++){… 枫落发表于Atcod... AtCoder Beginner Contest 402(A-F详细题解)...