上一页 1 ··· 14 15 16 17 18
set的经典应用 刚开始用map标记一个测试点超时了 ┭┮﹏┭┮; 用set的find 减少了循环提高了效率 #include <bits/stdc++.h>using namespace std;int main(){ int n,m,zhi; set<int> se[55]; scanf("%d Read More
posted @ 2019-03-06 13:56 厂长在线养猪 Views(91) Comments(0) Diggs(0) Edit
set的经典应用 刚开始用map标记一个测试点超时了 ┭┮﹏┭┮; 用set的find 减少了循环提高了效率 #include <bits/stdc++.h>using namespace std;int main(){ int n,m,zhi; set<int> se[55]; scanf("%d Read More
posted @ 2019-03-06 13:53 厂长在线养猪 Views(123) Comments(0) Diggs(0) Edit
水题 按照题目意思来就行了 #include <bits/stdc++.h>using namespace std;int main(){ int n,b[17]={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2}; char a[11]={'1','0','X','9',' Read More
posted @ 2019-03-06 13:48 厂长在线养猪 Views(259) Comments(0) Diggs(0) Edit
水题 四舍五入+0.5 #include <bits/stdc++.h>using namespace std;int main(){ int n,m; char s; cin >> n >> s; m=(int)(n*0.5+0.5); for(int i=1;i<=m;i++) { for(in Read More
posted @ 2019-03-06 13:44 厂长在线养猪 Views(289) Comments(0) Diggs(0) Edit
水题 #include <bits/stdc++.h>using namespace std;int gdc(int n){ int sum=1; for(int i=1;i<=n;i++) { sum=sum*i; } return sum;} int main(){ int n,num=0; c Read More
posted @ 2019-03-05 16:38 厂长在线养猪 Views(156) Comments(0) Diggs(0) Edit
水题 #include <bits/stdc++.h>using namespace std;int main(){ int n,sum=1; cin>>n; for(int i=1;i<=n;i++) { sum=sum*2; } cout << "2^" << n << " = " <<sum Read More
posted @ 2019-03-05 16:36 厂长在线养猪 Views(167) Comments(0) Diggs(0) Edit
//对指针还是很不熟悉 得强化 #include <stdio.h>#include <stdlib.h>#include <string.h>typedef struct Node{ int data; struct Node *next;}Node; Node* CreateLinkList(i Read More
posted @ 2019-03-04 21:07 厂长在线养猪 Views(342) Comments(0) Diggs(0) Edit
#include <bits/stdc++.h>using namespace std; //筛选法处理素数int arr[1000005]={0}; //运用了预处理的方法int gdc(){ arr[0]=arr[1]=1; //初始化0和1不是素数不要赋值为0 int p=1000005/2; Read More
posted @ 2019-03-03 21:48 厂长在线养猪 Views(110) Comments(0) Diggs(0) Edit
上一页 1 ··· 14 15 16 17 18