上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页
摘要: #include #include using namespace std; struct race { double p,h,c,flag; }; race r[101]; bool cmp(race a,race b) { //if() return a.flag... 阅读全文
posted @ 2014-12-11 17:51 __夜风 阅读(279) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; struct p { int endd,start; }; p p1[1000]; bool cmp(p p1,p p2) { return p1.endd>t&&t) { ... 阅读全文
posted @ 2014-12-11 17:50 __夜风 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 选择排序、快速排序、希尔排序、堆排序不是稳定的排序算法, 冒泡排序、插入排序、归并排序和基数排序是稳定的排序算法。 冒泡法: 这是最原始,也是众所周知的最慢的算法了。他的名字的由来因为它的工作看来象是冒泡: 复杂度为O(n*n)。当数据为正序,将不会有交换。复杂度为O(0)。 直接插入... 阅读全文
posted @ 2014-12-11 17:48 __夜风 阅读(129) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { double a,b,c,d,e,f,t; while(cin>>t){ if(t==0) break; else { while... 阅读全文
posted @ 2014-12-11 17:45 __夜风 阅读(161) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main() { int i,t,n; int a[101]; cin>>t; while(t--) { cin>>n; if(n==1) cout<<... 阅读全文
posted @ 2014-12-11 17:44 __夜风 阅读(95) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int cmp(int a,int b) { return a>b; } int main() { int i,t,a[10010]; cin>>t; for(i... 阅读全文
posted @ 2014-12-11 17:41 __夜风 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #include #define N 10010 using namespace std; int a[N],b[N]; int prime(int a) { int i; for(i=2;i*i>t>>x){ h=t;g=x; int ... 阅读全文
posted @ 2014-12-11 17:40 __夜风 阅读(202) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define LL __int64 using namespace std; bool ss(LL a) { LL i; for(i=2;i*i>m; s=(LL)sqrt(m+0.5); ... 阅读全文
posted @ 2014-12-11 17:40 __夜风 阅读(82) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int prime(int a) { int i; for(i=2;i*i>t&&t){ m=n=t; if(prime(t)==0) cout<<"0"<<endl; ... 阅读全文
posted @ 2014-12-11 17:38 __夜风 阅读(81) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; char a[10001]; int main() { int i,t,flag,n; cin>>t; getchar(); stack s;... 阅读全文
posted @ 2014-12-11 17:37 __夜风 阅读(106) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页