水题~。 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
1.小写输出 _str_t Val("AFSDFSasdfsdf"); cout<< Val.toLowerCase().data()<<endl; 2.中文输出 _str_t Val("中国人"); cout<< Val.data()<<endl; ...
分类:
其他好文 时间:
2021-02-16 12:29:18
阅读次数:
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
#include<iostream> #include<thread> using namespace std; void func() { cout << "子线程开始了" << endl; cout << "......" << endl; cout << "子线程结束了" << endl; } ...
分类:
编程语言 时间:
2021-02-16 12:12:15
阅读次数:
0
为了提高工作效率,需要一个可以自动生成多份相关联的word文档免去繁琐复制粘贴工作的软件。最后选定使用QT C++做界面和主要逻辑程序设计,对word的操作使用python写好对应的函数,然后在QT中调用自己写好的python函数完成相应的功能。由于这是第一次使用python 也是第一次将pytho ...
分类:
编程语言 时间:
2021-02-16 11:55:27
阅读次数:
0
给定一个数组,每次操作可以把任意一个元素 +1 或者 -1。求使得递增的最小操作次数。 n<=3000 ...
分类:
其他好文 时间:
2021-02-16 11:54:21
阅读次数:
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
模拟题。 const int N=55; string mp[]={"S","H","C","D","J"}; string s[N]; string t[N]; int p[N]; int n; int cnt; void init() { for(int i=0;i<4;i++) for(int ...
分类:
系统相关 时间:
2021-02-15 12:40:01
阅读次数:
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