摘要: 牛客寒假集训营一 Easy A-DFS搜索 #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 10; #define int long long void solve() { int n ; cin >> n; str 阅读全文
posted @ 2024-02-12 21:28 不过是过客 阅读(3) 评论(0) 推荐(0) 编辑
摘要: SCOI2015 省选] 国旗计划 手搓 模拟的数据 这题做重要的 首先是 有化圆为链的思想,讲给的区间 化为链式,也就是说讲 l > r的地方的r + m ,相当于 多走了一圈,所以需要 将环复制一遍 ,在加倍身长为 一条链; #include <bits/stdc++.h> using name 阅读全文
posted @ 2024-01-27 20:26 不过是过客 阅读(9) 评论(0) 推荐(0) 编辑
摘要: Problem - A - Codeforces 暴力枚举 就可以; #include <bits/stdc++.h> #define int long long using namespace std; vector<int>a; int n; signed main() { int _; cin 阅读全文
posted @ 2024-01-24 21:55 不过是过客 阅读(17) 评论(0) 推荐(0) 编辑
摘要: Problem - A - Codeforces 思维题,判断c字符串的每一位是否都能在相对应的a字符串或者b字符串里面 找到; 如果都能找到的话就输出 NO;否则输出YES; #include <bits/stdc++.h> using namespace std; int main() { st 阅读全文
posted @ 2024-01-19 14:59 不过是过客 阅读(9) 评论(0) 推荐(0) 编辑
摘要: Problem - A - Codeforces 没什么问题,几个if else语句,判断一下条件; #include <bits/stdc++.h> using namespace std; typedef long long LL; int main() { int k; cin >> k; w 阅读全文
posted @ 2024-01-19 14:57 不过是过客 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 栈 3302. 表达式求值 - AcWing题库 这是一道中缀表达式;有括号提高了这题的难度(个人认为),模拟我感觉不是特别好做; #include <bits/stdc++.h> using namespace std; stack<int>stk; stack<char>op; unordere 阅读全文
posted @ 2024-01-17 15:07 不过是过客 阅读(8) 评论(0) 推荐(0) 编辑
摘要: Codeforces 918(div4) Problem - A - Codeforces #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int a[N]; int main() { long long n; 阅读全文
posted @ 2024-01-01 16:13 不过是过客 阅读(38) 评论(0) 推荐(0) 编辑
摘要: A.数列倒序 #include <bits/stdc++.h> using namespace std; const int N = 10010; int a[N]; int main() { for(int i = 1; i <= 10 ; i ++) cin >> a[i]; for(int i 阅读全文
posted @ 2023-12-23 22:52 不过是过客 阅读(40) 评论(0) 推荐(0) 编辑
摘要: A.Buy Lottery Tickets 根据题意直接进行暴力dfs,因为一个return 错了四次 ; #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 10; int a[N], ans[N]; bool st[ 阅读全文
posted @ 2023-12-23 22:20 不过是过客 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round 916(div3) [Problem - A - Codeforces]:Problemsolving Log A.题 直接看样例进行分析,发现每一次出现的字符代表着用了1分钟来看这道题,每道题都有固定的解题时间,只要达到了这个解题时间,就可以将这题解出来 , 答案 阅读全文
posted @ 2023-12-20 14:40 不过是过客 阅读(59) 评论(0) 推荐(0) 编辑