02 2015 档案

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 阅读(191) 评论(0) 推荐(0)

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 阅读(144) 评论(0) 推荐(0)

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

posted @ 2015-02-23 18:08 windrises 阅读(166) 评论(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 阅读(132) 评论(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 阅读(111) 评论(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 阅读(133) 评论(0) 推荐(0)

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 阅读(123) 评论(0) 推荐(0)

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 阅读(158) 评论(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 阅读(145) 评论(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 阅读(99) 评论(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 阅读(137) 评论(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 阅读(111) 评论(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 阅读(111) 评论(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 阅读(119) 评论(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 阅读(112) 评论(0) 推荐(0)

UVa-401 Palindromes
摘要:#include#include#includeusing namespace std;int main(){ string a; while(cin>>a) { int k=a.size(); bool f1=1,f2=1; for(in... 阅读全文

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

UVa-10082 WERTYU
摘要:#include#include#includeusing namespace std;int main(){ char a[100]={"`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./"}; char b; while(scanf... 阅读全文

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

Uva-272 TEX Quotes
摘要:容易题,考察字符串。#include#includeusing namespace std;int main(){ char a; int cnt=0; while(scanf("%c",&a)==1) { if(a=='"') { ... 阅读全文

posted @ 2015-02-14 03:06 windrises 阅读(98) 评论(0) 推荐(0)

开始我的博客之旅
摘要:以前也写过博客,可是都没有坚持下去。 今天想尝试开始写写编程方面的博客, 一方面督促自己,一方面也能和大家交流学习。 编程小白,现在读大一,接触编程有半年了。 想在这个寒假自学一点算法,刷刷题,为步入ACM之路打基础。 就这样了,加油! 阅读全文

posted @ 2015-02-14 02:53 windrises 阅读(91) 评论(0) 推荐(0)

导航