上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要: 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... 阅读全文
posted @ 2013-03-31 20:33 yelan@yelan 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 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, 阅读全文
posted @ 2013-03-31 19:25 yelan@yelan 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 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++) ... 阅读全文
posted @ 2013-03-31 19:13 yelan@yelan 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 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)) {... 阅读全文
posted @ 2013-03-31 19:06 yelan@yelan 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 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++) { ... 阅读全文
posted @ 2013-03-31 19:02 yelan@yelan 阅读(157) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1702View Code 1 #include<iostream> 2 #include<cstring> 3 #include<stack> 4 #include<queue> 5 using namespace std ; 6 int main() 7 { 8 int t, n, x ; 9 string str1, str ;10 cin>>t ;11 while(t--)12 {13 stack<int>s ;14 queue&l 阅读全文
posted @ 2013-03-24 23:29 yelan@yelan 阅读(173) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1022View Code 1 #include<iostream> 2 #include<stack> 3 #include<cstring> 4 using namespace std ; 5 int main() 6 { 7 int n, i, j, k, d[18] ; 8 string a, b ; 9 while(cin>>n>>a>>b)10 {11 i = j = k = 0 ;12 stack<int>s ;1 阅读全文
posted @ 2013-03-24 23:26 yelan@yelan 阅读(130) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1870栈模拟:15MSView Code 1 #include<iostream> 2 #include<stack> 3 #include<cstring> 4 using namespace std ; 5 char a[1005] ; 6 stack<char>s ; 7 int main() 8 { 9 while(cin>>a)10 {11 while(!s.empty())12 s.pop() ;13 int len = strle... 阅读全文
posted @ 2013-03-24 23:24 yelan@yelan 阅读(117) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1363View Code 1 #include<iostream> 2 #include<stack> 3 using namespace std ; 4 int main() 5 { 6 int a[1005] ; 7 int n ; 8 while(cin>>n,n!=0) 9 {10 while(cin>>a[0],a[0])11 {12 for(int i=1; i<n; i++)13 cin>>a[i] ;14 ... 阅读全文
posted @ 2013-03-24 23:19 yelan@yelan 阅读(118) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3032View Code 1 #include<iostream> 2 #include<queue> 3 using namespace std ; 4 int main() 5 { 6 int a[14] ; 7 int n, t ; 8 cin>>t; 9 queue<int>q ;10 while(t--)11 {12 cin>>n ;13 q.push(n) ;14 for(int i=n-1; i>=1; i--)15 ... 阅读全文
posted @ 2013-03-24 23:16 yelan@yelan 阅读(169) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页