尝试stl

This commit is contained in:
James 2020-04-23 21:58:35 +08:00
parent bd2fdb699e
commit 1663be60f3
23 changed files with 116 additions and 8 deletions

View File

@ -21,7 +21,10 @@
"typeinfo": "cpp",
"deque": "cpp",
"string": "cpp",
"vector": "cpp"
"vector": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"string_view": "cpp"
},
"terminal.integrated.automationShell.windows": "cmd.exe",
"files.encoding": "gb18030",

3
1658_alllike/Readme.md Normal file
View File

@ -0,0 +1,3 @@
# 标题
* 内容

View File

@ -0,0 +1,3 @@
# 标题
* 内容

7
1658_alllike/main.cpp Normal file
View File

@ -0,0 +1,7 @@
#include <algorithm>
#include <iostream>
using namespace std;
int main()
{
}

BIN
1658_alllike/main.exe Normal file

Binary file not shown.

0
1658_alllike/test/in.txt Normal file
View File

View File

View File

View File

@ -0,0 +1,7 @@
## z:\Chao\src\Template\test\in.txt
2020/03/14 ÖÜÁù 11:41:28.68
Hello Easy C++ project!
-----------------------------------------------
Process exited after 200 ms with return value 0

BIN
3053_longdui/main copy.exe Normal file

Binary file not shown.

23
3053_longdui/new.cpp Normal file
View File

@ -0,0 +1,23 @@
#include <iostream>
#include<set>
using namespace std;
set<int> cun;
int main()
{
int n,now=1;
for(int i=0;now<=1000000000;i++){
now+=i;
cun.insert(now);
}
cin>>n;
for(int i=1;i<=n;i++){
int u;
cin>>u;
if(cun.find(u)==cun.end()){
cout<<"0"<<endl;
}else{
cout<<"1"<<endl;
}
}
}

BIN
3053_longdui/now.exe Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
## z:\Chao\src\3053_longdui\test\in.txt
2020/04/18 ÖÜÁù 9:50:13.40
## z:\Chao\src\3053_longdui\test\in0.txt
2020/04/22 ÖÜÈý 19:07:51.69
0
0
0
@ -102,10 +102,10 @@
0
-----------------------------------------------
Process exited after 430 ms with return value 0
Process exited after 210 ms with return value 0
## z:\Chao\src\3053_longdui\test\in2.txt
2020/04/18 ÖÜÁù 9:50:13.40
2020/04/22 ÖÜÈý 19:07:51.69
0
0
0
@ -1108,10 +1108,10 @@ Process exited after 430 ms with return value 0
0
-----------------------------------------------
Process exited after 220 ms with return value 0
Process exited after 130 ms with return value 0
## z:\Chao\src\3053_longdui\test\in3.txt
2020/04/18 ÖÜÁù 9:50:13.40
2020/04/22 ÖÜÈý 19:07:51.69
0
0
0
@ -2114,5 +2114,5 @@ Process exited after 220 ms with return value 0
0
-----------------------------------------------
Process exited after 220 ms with return value 0
Process exited after 130 ms with return value 0

View File

@ -0,0 +1,3 @@
# 标题
* 内容

View File

@ -0,0 +1,3 @@
# 标题
* 内容

Binary file not shown.

View File

@ -0,0 +1,36 @@
#include <iostream>
#include <vector>
using namespace std;
vector<int> su;
bool pan(int n)
{
if(n==1){
return 1;
}
for (int i = 0; i < su.size(); i++) {
if (n % su[i] == 0 || su[i] * su[i] > n) {
return 0;
}
}
su.push_back(n);
return 1;
}
int main()
{
int begn, ends;
cin >> begn >> ends;
int bgnum=1,ednum=1;
/*if(pan(begn)==1){
bgnum--;
}*/
for (int i = 2; i * i <= ends; i++) {
if (pan(i) == 1) {
if (i * i <= begn) {
bgnum+=begn/i+i-2;
}
ednum+=ends/i+i-2;
}
}
cout<<ends-ednum-begn+bgnum;
}

BIN
3069_includesushu/main.exe Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
2 11

View File

@ -0,0 +1 @@
2000000 2000999

View File

View File

@ -0,0 +1,18 @@
## z:\Chao\src\3069_includesushu\test\in.txt
2020/04/19 ÖÜÈÕ 11:36:55.94
4
-----------------------------------------------
Process exited after 220 ms with return value 0
## z:\Chao\src\3069_includesushu\test\in2.txt
2020/04/19 ÖÜÈÕ 11:36:55.94
262
-----------------------------------------------
Process exited after 90 ms with return value 0
## z:\Chao\src\3069_includesushu\test\in3.txt
2020/04/19 ÖÜÈÕ 11:36:55.94
-7083472
-----------------------------------------------
Process exited after 70 ms with return value 0