2015年2月26日

UVa-11809 - Floating-Point Numbers

摘要: 参考了http://blog.csdn.net/xyqcl/article/details/40011009#include#include#includeusing namespace std;int main(){ double aa[15][35]={}; int bb[15][3... 阅读全文

posted @ 2015-02-26 23:07 windrises 阅读(187) 评论(0) 推荐(0) 编辑

2015年2月25日

UVa-1588 Kickdown

摘要: 思路比较简单,注意要双向。 我一直误以为两次cin>>a;时第二次会自动把数组清零,结果WA了我好多次,最后才发现原来不是这样的。 比如这样的: char a[15]={}; cin>>a; for(int i=0;i>a; for(int i=0;i#include#inc... 阅读全文

posted @ 2015-02-25 02:21 windrises 阅读(137) 评论(0) 推荐(0) 编辑

2015年2月23日

UVa-1587 - Box

摘要: 写的有点丑,主要是想把一个类似于边长1,2,3的长方体的6*2的数组转换成这样: 1 2 1 2 ... 阅读全文

posted @ 2015-02-23 18:08 windrises 阅读(159) 评论(0) 推荐(0) 编辑

UVa-10340 - All in All

摘要: #include#includeusing namespace std;int main(){ string a,b; while(cin>>a>>b) { int la=a.size(),lb=b.size(),i,j; bool flag=1; ... 阅读全文

posted @ 2015-02-23 18:03 windrises 阅读(127) 评论(0) 推荐(0) 编辑

UVa-202 - Repeating Decimals

摘要: #include#include#includeusing namespace std;int main(){ int n,m; while(cin>>n>>m) { int a=n/m,b=n%m; int ans[5000]={a},cnt=0; ... 阅读全文

posted @ 2015-02-23 18:03 windrises 阅读(106) 评论(0) 推荐(0) 编辑

UVa-1368 - DNA Consensus String

摘要: #include#include#includeusing namespace std;int main(){ //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); int n; cin>>n; ... 阅读全文

posted @ 2015-02-23 18:02 windrises 阅读(125) 评论(0) 推荐(0) 编辑

2015年2月15日

UVa-232 Crossword Answers

摘要: #include#include#include#includeusing namespace std;int main(){ //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); int a,b,pcnt=... 阅读全文

posted @ 2015-02-15 12:31 windrises 阅读(118) 评论(0) 推荐(0) 编辑

2015年2月14日

UVa-227 - Puzzle

摘要: #include#include#includeusing namespace std;void f(char a,int &xx,int &yy){ if(a=='A') xx=-1,yy=0; else if(a=='B') xx=1,yy=0; else if(a=='R')... 阅读全文

posted @ 2015-02-14 03:36 windrises 阅读(153) 评论(0) 推荐(0) 编辑

UVa-455 Periodic Strings

摘要: 第一次是自己写的,写完后看rujia写的更赞,于是模仿他又写了一遍。#include#include#includeusing namespace std;int main(){ int t; cin>>t; while(t--) { char a[85]={}... 阅读全文

posted @ 2015-02-14 03:34 windrises 阅读(140) 评论(0) 推荐(0) 编辑

UVa-1225 Digit Counting

摘要: #include#include#includeusing namespace std;int main(){ int t; cin>>t; while(t--) { int n,cnt[15]={}; cin>>n; for(int... 阅读全文

posted @ 2015-02-14 03:20 windrises 阅读(92) 评论(0) 推荐(0) 编辑

UVa-1586 Molar mass

摘要: #include#include#include#includeusing namespace std;double change(char a){ if(a=='C') return 12.010; else if(a=='H') return 1.008; else if(a=... 阅读全文

posted @ 2015-02-14 03:19 windrises 阅读(130) 评论(0) 推荐(0) 编辑

UVa-1585 Score

摘要: #include#include#includeusing namespace std;int main(){ int t; cin>>t; while(t--) { char a[85]={}; cin>>a; int k=strl... 阅读全文

posted @ 2015-02-14 03:18 windrises 阅读(107) 评论(0) 推荐(0) 编辑

UVa-1584 Circular Sequence

摘要: #include#include#includeusing namespace std;bool cmp(char a[],int p,int q,int k){ for(int i=0;ia[(q+i)%k]) return 0; } return 0;}i... 阅读全文

posted @ 2015-02-14 03:17 windrises 阅读(104) 评论(0) 推荐(0) 编辑

UVa-1583 Digit Generator

摘要: 这个写的有点丑#include#include#includeusing namespace std;int main(){ int t; cin>>t; while(t--) { int n,i; cin>>n; bool f=1;... 阅读全文

posted @ 2015-02-14 03:15 windrises 阅读(113) 评论(0) 推荐(0) 编辑

UVa-340 Master-Mind Hints

摘要: #include#include#include#includeusing namespace std;int main(){ //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); int n,cnt=0; ... 阅读全文

posted @ 2015-02-14 03:13 windrises 阅读(110) 评论(0) 推荐(0) 编辑

导航