摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=36310MS:View Code 1 #include<stdio.h> 2 #include<algorithm> 3 using namespace std ; 4 int a[31] ; 5 int n, m, ans ; 6 void dfs(int i, int v) 7 { 8 if(ans==m) 9 return ;10 if(v>m)11 return ;12 if(i<1)13 {14 ... 阅读全文
摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3622View Code 1 #include<iostream> 2 using namespace std ; 3 long long f[55] = {1,2,5,10,20,25,50,100,125,200,250,500,1000,1250,2000,2500, 4 5000,10000,12500,20000,25000,50000,100000,125000,200000,250000,500000,1000000, 5 1250000,200 阅读全文
摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3625View Code 1 #include <stdio.h> 2 #include <math.h> 3 #define E 0.57721566490153286060651209 4 int main() 5 { 6 double a,x; 7 while (scanf("%lf",&a) != EOF) 8 { 9 10 x = E;11 x *= pow(2,a) - 1;12 pri... 阅读全文
摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2855View Code #include<stdio.h>#include<string.h>#include<math.h>double PI = acos(-1) ;double N = log(tan(PI/4 + (85*PI/180)/2)) ;double S = log(tan(PI/4 + (-85*PI/180)/2)) ;double W = -PI ;double E = PI ;double n, s, w, 阅读全文
摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2857View Code #include<stdio.h>int main(){ int n, m ; int i, j, count=1, t ; int a[110][110] ; while(scanf("%d%d",&n, &m)!=EOF) { if(n==0&&m==0) break ; for(i=0; i<n; i++) for(j=0; j<m; j++) ... 阅读全文
摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2851View Code #include<stdio.h>#include<string.h>int main(){ char s[1000] ; int len ; int tab, space ; int n, i ; scanf("%d", &n) ; getchar() ; while(n--) { space = 0, tab = 0 ; while(gets(s)) {... 阅读全文
摘要:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2850View Code #include<stdio.h>int main(){ int n, m ; int i, j ; int map[12][12] ; while(scanf("%d%d",&n,&m)!=EOF) { if(n==0&&m==0) break ; for(i=0; i<12; i++) for(j=0; j<12; j++) { ... 阅读全文