上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 99 下一页

2011年7月28日

stl map

摘要: #include <stdio.h>#include <map>#include <iostream>using namespace std;int main( ){ map<int, string>stu; int a, b, i, j; char str[20]; while (scanf("%d",&a) != EOF ) { for (i = 0; i < a; i++) { scanf("%d%s",&b,str); //stu[b] = str; stu.insert(ma 阅读全文

posted @ 2011-07-28 20:13 more think, more gains 阅读(139) 评论(0) 推荐(0) 编辑

SORT AGAIN 看错题意啦。wa了好几次。。5555555

摘要: 一个组合数为第K大是指有K-1个不同的组合数小于它。#include <stdio.h>#include <string.h>#include <algorithm>#include <math.h>int A[5100];int B[10100];int main( ){ int T, N, k, max , t, num, i, j; scanf("%d",&T); while(T--) { num = 0; max = 0; memset(B, 0, sizeof(B)); scanf("%d%d&qu 阅读全文

posted @ 2011-07-28 15:58 more think, more gains 阅读(144) 评论(0) 推荐(0) 编辑

排列2 pe了好几次。。悲剧

摘要: #include <stdio.h>#include <string.h>#include <stdlib.h>#include <algorithm>using namespace std;int main( ){ char str[10], ch[10]; int len, flag, a[10], i, flag1, k = 0; while (1) { flag1 = 0; for ( i = 0; i < 4; i++) scanf("%d",&a[i]), str[i] = a[i] + '0 阅读全文

posted @ 2011-07-28 10:09 more think, more gains 阅读(167) 评论(0) 推荐(0) 编辑

AC

摘要: A CTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1741Accepted Submission(s): 1089Problem DescriptionAre you excited when you see the title "AC" ? If the answer is YES , AC it ;You must learn these two combination formulas in the school 阅读全文

posted @ 2011-07-28 09:16 more think, more gains 阅读(169) 评论(0) 推荐(0) 编辑

2011年7月27日

SHLQSH数

摘要: 刚开始时用了算约数个数公式,果断超时。。#include <stdio.h>#include <string.h>#include <math.h>#include <stdlib.h>char prime[5000010]={0};int dp[700000];const int inf = 3500;int k, a, b, l;struct node {int v;int n;}val[1000];void fun( ){ int i, j; for ( i = 3; i <= inf; i += 2) if ( prime[i / 阅读全文

posted @ 2011-07-27 22:11 more think, more gains 阅读(216) 评论(0) 推荐(0) 编辑

上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 99 下一页

导航