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) 编辑

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 阅读(124) 评论(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 阅读(104) 评论(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 阅读(92) 评论(0) 推荐(0) 编辑

开始我的博客之旅

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

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

导航