摘要:
link #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll>PLL; typedef pair<int, int 阅读全文
摘要:
link #思路: 由于It is guaranteed that the total length of all given segments doesn't exceed \(10^{5}\).所以暴力的标记每个能够通过的点跑bfs就好了。 注意标记的时候借助$pair和map$,如果映射到一维 阅读全文
摘要:
A 汽水瓶 思路: 模拟,其实也可以考虑贡献,每次都相当于少了两个汽水瓶,所以$res=n/2$ ##代码: int main(){ int n; while(cin>>n){ if(!n) break; int res=0; while(n>=2){ if(n==2){ res++;break; 阅读全文
摘要:
传送门 视频讲解 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll>PLL; typedef pair<int, 阅读全文