上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页
摘要: #include<iostream> using namespace std; int const maxn=1000; int n,W; int w[maxn],v[maxn]; int rec(int i,int j){ int res; if(i==n){ res=0; }else if(j< 阅读全文
posted @ 2019-03-23 21:42 Hello_World2020 阅读(107) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int a[1000000]; int f(int x)//判断是否为素数 { for(int i = 2; i < x; i++) { if(x%i == 0) { return 0; } } return 1; } 阅读全文
posted @ 2019-03-23 14:13 Hello_World2020 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 注意一下::::A Z 65--90 a z 97 122 #include<iostream> using namespace std; int main() { string str; int len,flag,i; while(getline(cin,str)){ // cout<<str<< 阅读全文
posted @ 2019-03-21 22:02 Hello_World2020 阅读(286) 评论(0) 推荐(0) 编辑
摘要: //三角形的选择 #include<iostream> using namespace std; int a[101]; int i,j,k,nmm,ans,n; void solve(){ for(i=0;i<n-2;i++){ for(j=i+1;j<n-1;j++){ for(k=j+1;k< 阅读全文
posted @ 2019-03-21 11:40 Hello_World2020 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 二分法,这一题有点小难度。。。 首先,任意找一个数字运用二分法, #include<iostream> using namespace std; typedef long long ll; const ll inf = 0x3f3f3f3f; const int maxn = 1e5 + 10; i 阅读全文
posted @ 2019-03-21 10:26 Hello_World2020 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 感觉没思路的题目应该就是动态规划 #include<iostream> #include<vector> using namespace std; bool IsPalindRome(string str){//回文判断 int end=str.length()-1; int start=0; wh 阅读全文
posted @ 2019-03-20 17:06 Hello_World2020 阅读(386) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; int main() { int n,i; while(cin>>n){ printf("%d=",n); for(i=2;i<=n;i++) while(n!=i) { if(n%i==0) { printf("%d* 阅读全文
posted @ 2019-03-19 21:46 Hello_World2020 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 数组求和 //求和库函数 #include<iostream> #include<numeric> #include<vector> using namespace std; int main() { int arr[]={1,2,3,4,5}; vector<int> v(arr,arr+5); 阅读全文
posted @ 2019-03-19 21:21 Hello_World2020 阅读(156) 评论(0) 推荐(0) 编辑
摘要: f(x)=4*f(x-1)+1 1=<x<=100 十位数字后溢出 有效9.63位 19位数字后溢出 有效18 (9.63*2) 分析:得使用大数处理,与大整数乘法类似 //计算 N! 30 #include<iostream> #include<cstring> using namespace s 阅读全文
posted @ 2019-03-19 15:32 Hello_World2020 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 第一个代码:(正确%50) //不计算简单做标记 #include<iostream> #include<cstring> using namespace std; const int maxn=1000010; int book[maxn]; int m,n; void gcd(int x){ i 阅读全文
posted @ 2019-03-19 11:13 Hello_World2020 阅读(192) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 22 下一页