摘要:
A - Doors in the Center 签到题,直接构造即可。 点击查看代码 #include<bits/stdc++.h> using namespace std; #define int long long const int N = 1e6 + 10; signed main() { 阅读全文
摘要:
A. New World, New Me, New Array 贪心的想每次都赋值一个 \(p\) 如果正好和为 \(k\) 则答案就是 \(k/p\) ,否则是 \(k/p+1\)。 #include<bits/stdc++.h> using namespace std; #define int 阅读全文
摘要:
A - 123233 遍历字符串统计出现次数即可。 #include<bits/stdc++.h> using namespace std; #define int long long const int N = 1e6 + 10; int n, m, k; int a[N]; signed mai 阅读全文
摘要:
AtCoder Beginner Contest 377 A - Rearranging ABC 字符串有ABC三个字母即可。 #include<bits/stdc++.h> using namespace std; #define int long long signed main() { str 阅读全文
摘要:
何为单调栈?顾名思义,单调栈即满足单调性的栈结构。与单调队列相比,其只在一端进行进出 栈 队列 P5788 【模板】单调栈 #include<bits/stdc++.h> using namespace std; const int N = 3e6 + 10; int n; int a[N]; st 阅读全文
摘要:
P2024 [NOI2001] 食物链 AcWing 240. 食物链(带扩展域 和 带边权 并查集 两种做法) 带拓展域的并查集 #include<bits/stdc++.h> using namespace std; #define int long long const int N = 5e4 阅读全文
摘要:
2024/7/18 电路维修 双端队列BFS #include<bits/stdc++.h> using namespace std; #define int long long #define haha puts("") #define ye puts("Yes") #define no puts 阅读全文
摘要:
A 很明显找落下来会碰到地的钉子有多少即可 #include <bits/stdc++.h> using namespace std; #define int long long #define haha cout<<"\n" #define ye cout<<"Yes\n" #define no 阅读全文