随笔分类 -  UVa题解

上一页 1 2 3

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 阅读(160) 评论(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 阅读(147) 评论(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 阅读(100) 评论(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 阅读(140) 评论(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 阅读(114) 评论(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 阅读(112) 评论(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 阅读(122) 评论(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 阅读(113) 评论(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 阅读(131) 评论(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 阅读(111) 评论(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 阅读(99) 评论(0) 推荐(0)

上一页 1 2 3

导航