上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: #include #include using namespace std; int a[101]; int main() { int n; while(scanf("%d",&n)!=EOF) { int i; for(i=0;i<n;i++) scanf("%d",&a[i]); sort(a,a+... 阅读全文
posted @ 2017-03-15 11:04 贱人郭 阅读(180) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; struct Node { int c0; int c1; int m; }com[1001]; bool cmp(Node a,Node b) { if (a.m!=b.m) return a.m>b.m;//是大于号和小于号 else return a... 阅读全文
posted @ 2017-03-15 10:32 贱人郭 阅读(426) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int a[1001]; int main() { int N; while(scanf("%d",&N)!=EOF) { int i; for(i=0;i<N;i++) scanf("%d",&a[i]); sort(a,a+... 阅读全文
posted @ 2017-03-14 20:12 贱人郭 阅读(126) 评论(0) 推荐(0) 编辑
摘要: sort ()的反序需要sort(a,a+n,cmp)重写; AC: 阅读全文
posted @ 2017-03-14 19:57 贱人郭 阅读(135) 评论(0) 推荐(0) 编辑
摘要: #include #include #include int queue[100001]; int N,M; int front,tail; void init() { front=0; tail=0; } int empty() { if (front==tail) return 1; else return 0; } int full() { if... 阅读全文
posted @ 2017-03-14 19:06 贱人郭 阅读(263) 评论(0) 推荐(0) 编辑
摘要: #include int main() { char str[1000000]; while(scanf("%s",str)!=EOF) { int temp=0,ans=0; for(int i = 0; str[i]; i++) { if(str[i] == '(')... 阅读全文
posted @ 2017-03-14 16:46 贱人郭 阅读(104) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int a[201]; int main() { int n; while(cin>>n) { int i,t; int max=0,f_max=-1,f_min=-1,min=201; for(i=0;i>a[i]; for(i=0;ia[i]) ... 阅读全文
posted @ 2017-03-14 15:16 贱人郭 阅读(190) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int a[100001]; char c[100]; int main() { int N; while(cin>>N) { int i,j,k; for(i=0;i>c; if(strlen(c)=1 && k<=N... 阅读全文
posted @ 2017-03-14 14:33 贱人郭 阅读(169) 评论(0) 推荐(0) 编辑
摘要: #include int a[16]; int main() { int n; while(scanf("%d",&n)!=EOF) { int i,j; int m,p; for(i=0;i=3) { for(int k=3;k=2 && i!=k) ... 阅读全文
posted @ 2017-03-14 11:54 贱人郭 阅读(142) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页