一眼二分。 注意点: 在读入n之后要使用getchar接收后面的换行符,否则会使for循环内的getline读入这个换行符,导致第一个字符串读取错误。 最后输出答案前要先check一遍 const int N=110; string a[N]; string suffix; int n; bool ...
分类:
其他好文 时间:
2021-02-17 14:18:36
阅读次数:
0
未完待续……(只是给自己存个板子) 快速傅里叶变换 #include <bits/stdc++.h> using namespace std; const int maxn = 2e6 + 1e2; struct Cp { double x, y; inline Cp operator +(cons ...
分类:
其他好文 时间:
2021-02-17 14:03:19
阅读次数:
0
A - Favorite Sound #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int main(){ int a, b, c; cin >> a >> b >> ...
分类:
其他好文 时间:
2021-02-16 12:44:42
阅读次数:
0
水题~。 int n; int main() { cin>>n; string res; int t=n/100; for(int i=0;i<t;i++) res+='B'; t=n%100/10; for(int i=0;i<t;i++) res+='S'; t=n%100%10; for(in ...
分类:
其他好文 时间:
2021-02-16 12:32:36
阅读次数:
0
考虑到不知道第$104$个素数有多大,可以先用程序测试下第$104$个素数是多少。 const int N=2e5+10; int primes[N],cnt; bool vis[N]; void init(int n) { for(int i=2;i<=n;i++) if(!vis[i]) { p ...
分类:
其他好文 时间:
2021-02-16 12:14:01
阅读次数:
0
如果求导之后没有任何非零项,需要输出0 0。 int main() { string line; getline(cin,line); stringstream ss(line); int a,b; bool first=true; while(ss>>a>>b) { a*=b; b--; if(b ...
分类:
其他好文 时间:
2021-02-16 11:53:11
阅读次数:
0
水题~,就简单转换下时间。 int a,b; int main() { cin>>a>>b; int tim=round((b-a)/100.0); int hh=tim/3600,mm=tim%3600/60,ss=tim%3600%60; printf("%02d:%02d:%02d\n",hh ...
分类:
其他好文 时间:
2021-02-15 12:25:04
阅读次数:
0
注意不满$4$位的话要补成$4$位。 string s; set<int> S; int main() { cin>>s; while(s.size()<4) s='0'+s; while(true) { sort(s.begin(),s.end(),greater<char>()); string ...
分类:
其他好文 时间:
2021-02-15 12:21:49
阅读次数:
0
https://codeforces.com/contest/1473/problem/E vector存图: 1 #define bug(x) cout<<#x<<" is "<<x<<endl 2 #define IO std::ios::sync_with_stdio(0),cin.tie(0 ...
分类:
其他好文 时间:
2021-02-15 12:17:20
阅读次数:
0
https://www.acwing.com/problem/content/1139/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-15 11:53:52
阅读次数:
0