随笔分类 -  Atcoder

摘要:#A - Good morning ##代码 #include<bits/stdc++.h> #include <iostream> #include <ctime> using namespace std; // const int N = 2e5+5; typedef long long ll; 阅读全文
posted @ 2022-03-27 21:02 行舟C 阅读(95) 评论(0) 推荐(1)
摘要:#A - Last Letter ###思路 输出字符串的最后一个字符 ###代码 #include<bits/stdc++.h> #include <iostream> #include <ctime> using namespace std; // const int maxn = 1e5+5; 阅读全文
posted @ 2022-03-21 11:26 行舟C 阅读(206) 评论(0) 推荐(0)
摘要:#A - Floor, Ceil - Decomposition #题意 给出一个数x,这个数可以分解为x/2上取整,和x/2下取整,然后可以继续分解,求分解完后能组成的最大值 #思路 对于一个x,范围是1 ~ 1e18,如果一直分解肯定会超时。因为每次都是缩小,所以可以将每次分解后的数记录下来,然 阅读全文
posted @ 2022-03-04 11:37 行舟C 阅读(97) 评论(0) 推荐(0)
摘要:#A - Erase by Value ##题意 给出一个序列A,选择一个数x,将这个序列里的x都移除,求操作完后字典序最小的序列 ##思路 找到第一次出现后一个数字小于前一个数字的位置,这样删除后必定是字典序最小的 ##代码 #include<bits/stdc++.h> using namesp 阅读全文
posted @ 2022-03-04 11:08 行舟C 阅读(48) 评论(0) 推荐(0)
摘要:#A - A ↔ BB ##题意 给出一串由A,B,C组成的字符串,遇到以下两种情况时 当出现A时,将A替换为BB 当出现BB时,将BB替换为A ##思路 直接用stack来模拟 ##代码 #include<bits/stdc++.h> using namespace std; const int 阅读全文
posted @ 2022-02-28 11:26 行舟C 阅读(143) 评论(0) 推荐(0)
摘要:#A-Distinct Strings ##代码 #include<bits/stdc++.h> using namespace std; int main(){ string str; cin >> str; if(str[0] == str[1] && str[1] == str[2]) cou 阅读全文
posted @ 2021-11-01 22:09 行舟C 阅读(398) 评论(0) 推荐(0)