自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Ac_freedom

有一口气点一盏灯

  • 博客(66)
  • 问答 (1)
  • 收藏
  • 关注

原创 UVa:11044 - Searching for Nessy

easy……#includeint main(){ int t; while(scanf("%d", &t) != EOF){ while(t--){ int m, n; scanf("%d%d", &n, &m); int xc = (n - 2) % 3 ? (n - 2) / 3 +

2015-04-19 22:01:40 497

原创 UVa: UVA - 10719 Quotient Polynomial

以前遇到过类似的情况——在未知数组长度的情况下输入数组各元素,解决问题的关键是如何判断数组何时输入结束,经验以为OJ会以EOF结束输入,但RE了,以'\n'结束输入AC#includeconst int MAXN = 10100;int p[MAXN];int main(){ int k; while(scanf("%d", &k) != EOF){ in

2015-04-12 10:12:10 571

原创 UVa:10790 - How Many Points of Intersection?

数学推导即可。。。(等差数列求和)刚开始WA了一次,样例过了,但没注意到int型不能隐性转换为long long型(不知道为什么,求解!??!),强制转换后AC#includeint main(){ long long sum; int a, b; int t = 1; while(scanf("%d%d", &a, &b) != EOF){

2015-04-08 13:01:56 374

原创 UVa:846 - Steps

注意:“The length of a step must be nonnegative and can be by one bigger than, equal to, or by one smaller than the length of the previous step.”相邻的

2014-11-01 14:49:51 459

原创 UVa:573 - The Snail

需要注意的地方是:1.

2014-10-19 21:56:49 438

原创 UVa:107 - The Cat in the Hat

刚开始没读懂题目,后来百度了一下中文翻译

2014-10-18 22:42:47 550

原创 UVa:591 - Box of Bricks

#includeint a[60];int main() { int n, c = 0; while(scanf("%d", &n) != EOF) { if(!n) break; c++; a[0] = 0; for(int i=1; i <= n; i++){ s

2014-09-23 11:02:26 548

原创 UVa:10025 - The ? 1 ? 2 ? ... ? n = k problem

让1到n的数做算术运算(加)

2014-09-22 22:41:36 549

原创 UVa:621 - Secret Research

好水……本以为会是道细节题……还有

2014-09-19 19:52:12 521

原创 UVa:253 - Cube painting

#includeint main(){ char c1[6],c2[6],c[13]; while(scanf("%s",c)!=EOF){ for(int i=0;i<6;i++){ c1[i]=c[i]; c2[i]=c[i+6]; } int t; for(int

2014-09-18 22:20:36 488

原创 UVa:10161 - Ant on a Chessboard

找规律……#include#includeint main(){ int time; while(scanf("%d",&time)!=EOF){ if(!time) break; int s=ceil(sqrt(time)); int N=s*s; if(s%2){

2014-09-18 22:18:31 411

原创 UVa:113 - Power of Cryptography

作为初学者,二分查找能有如此的

2014-09-18 22:13:44 432

原创 UVa:10785 - The Mad Numerologist

注意:在keep the vowel and consonant value minimum的基础上,要

2014-06-04 12:14:09 454

原创 UVa:755 - 487--3279

找出有重复的电话号码并输出

2014-06-03 11:30:38 572

原创 UVa:10194 - Football (aka Soccer)

以下有两组代码,一组AC了,一组每

2014-05-30 19:10:32 684

原创 UVa:123 - Searching Quickly

题意:给出要被忽略的单词列表和要被排序的

2014-05-24 16:06:17 483

原创 UVa:400 - Unix ls

题意:输入若干个“文件名”()

2014-05-19 20:22:09 542

原创 Uva:156 - Ananagrams

题意:输入纯英文文本,

2014-05-16 10:08:30 454

原创 UVa:120 - Stacks of Flapjacks

题意:给出一叠煎饼的直径大小,

2014-05-14 17:41:45 480

原创 UVa:299 - Train Swapping

题意:给出一列火车的车厢排列,要求将车厢

2014-05-09 23:04:56 593

原创 UVa:152 - Tree's a Crowd

题意:给出若干个点的三维坐标,

2014-05-06 12:03:35 468

原创 UVa:10474 - Where is the Marble?

#include#include#includeusing namespace std;const int maxn=10000+10;int q[maxn],p[maxn][2];bool cmp(int a, int b){ return a<b;}int main(){ int m,n,T=0; while(~scanf("%d%d",&m,&n

2014-05-04 21:22:36 424

原创 UVa:10420 - List of Conquests

#include#include#includeusing namespace std;const int maxn=2000+10;struct Beauty{ char ctry[90]; int num;}bea[maxn];char B[90],b[90];bool cmp(Beauty a,Beauty b){ return strcmp(a.

2014-05-04 12:22:57 552

原创 UVa:340 - Master-Mind Hints

题意:设计者设计了一组编码

2014-05-02 18:08:28 530

原创 UVa:10494 - If We Were a Child Again

这道题想了一下午,没能完全想通,卡在

2014-04-27 21:49:51 582

原创 UVa:748 - Exponentiation

一样的,用数组存储输入的数值,然后模拟乘法运算,

2014-04-27 11:50:46 526

原创 UVa:465 - Overflow

百度的时候看到都用atof函数,好东西啊,可是他转换也是在实数范围的-1.7*10^(-308) ~ 1.7*10^308,所以数据弱了没超过308位的数字。

2014-04-26 23:05:06 471

原创 UVa:10106 - Product

用数组存储大数,然后模拟

2014-04-26 20:52:53 439

原创 UVa:424 - Integer Inquiry

这题是大数问题,需要用字符数组输入,

2014-04-26 14:29:33 537

原创 UVa:10115 - Automatic Editing

此题又有字符匹配匹配的问题,

2014-04-26 09:41:44 470

原创 UVa:644 - Immediate Decodability

这题不难,但有些细节得多加注意(代码中的)

2014-04-24 22:25:39 392

原创 UVa:10815 - Andy's First Dictionary

gets输入:#include#include#include#includeusing namespace std;char text[210],comp[210];struct Word{ char word[210];}w[5010];bool cmp(struct Word a,struct Word b){ return strcmp(a.word,b

2014-04-24 18:47:14 357

原创 UVa:10878 - Decode the tape

观察磁带可知,磁带以“”

2014-04-23 17:31:19 503

原创 UVa:409 - Excuses, Excuses!

此题需要进行字符串的匹配,

2014-04-23 17:10:08 469

原创 UVa:537 - Artificial Intelligence?

--------------------------------------------------------------------------------------------          Keep It Simple,Stupid!------------------------------------------------------------------------

2014-04-21 13:49:59 486

原创 UVa:10361 - Automatic Poetry

按模式“ s1s3s5”来将第一句

2014-04-20 18:14:23 437

原创 UVa: 10010 - Where's Waldorf?

大概题意是:给一个m*n的字符矩阵,

2014-04-20 08:08:36 406

原创 UVa:401 - Palindromes

这是回归以后发表的第一道UVa的题目,略感

2014-04-19 09:33:29 421

原创 HDU:1235-统计同成绩学生人数

#include#includeint N,a[110];int main(){ while(scanf("%d",&N)!=EOF){ if(N==0) break; memset(a,0,sizeof(a)); for(int i=1;i<=N;i++){ int x; scanf("

2014-01-08 10:42:49 661

原创 HDU: 1201-18岁生日

I‘m Back!#includeint main(){ int T; while(scanf("%d",&T)!=EOF){ while(T--){ int Y,M,D,S=0; scanf("%d-%d-%d",&Y,&M,&D); if(M==2&&D==29)

2013-11-13 22:40:01 487

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除