OJ
tralonzhang
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
zoj 1331
Perfect Cubes For hundreds of years Fermat's Last Theorem, which stated simply that for n > 2 there exist no integers a, b, c > 1 suc原创 2011-08-31 23:44:19 · 556 阅读 · 0 评论 -
zoj 1382
#include int main() { int num,n; int o,p; int i,count; scanf("%d",&num); while(num--) { scanf("%d",&n); count=0; if (n%2==1原创 2011-10-10 23:14:43 · 448 阅读 · 0 评论 -
zoj 1383
#include int main() { int d,n; int a[20]; int i,j; scanf("%d",&d); while(d--) { for(i=0;i<20;i++) { a[i]=0; } scanf("%d",原创 2011-10-10 23:15:34 · 493 阅读 · 0 评论 -
zoj 1350
#include #include int main() { int a[101]; int n,m; int i,j; scanf("%d",&n); while(n--) { scanf("%d",&m); for(i=0;i<=m;i++)原创 2011-10-10 23:13:39 · 496 阅读 · 0 评论 -
uva oj 10361
这道题关键是确定“"的位置。 代码: #include #include char str[202]; int pos[4]; int main() { int n,num,k,i,flag,count; char c; scanf("%d原创 2011-09-22 17:12:48 · 467 阅读 · 0 评论 -
uva oj 401
代码: 开始忘考虑‘0’字符不是有效字符了,WA了2次,然后又发现mirroredstring中的for(i=0;i #include #include #include int palindrome(char *str); int mirroredst原创 2011-09-21 14:01:04 · 540 阅读 · 0 评论 -
uva oj 457
代码: #include #include char str[5]=" .xW"; int DNA[10]; int dish[42]; int dishre[42]; int main() { int n,i,j; scanf("%d"原创 2011-09-18 16:32:09 · 383 阅读 · 0 评论 -
uva oj 414
代码: #include #include #include int main() { int n,k,i; char str[30]; int size[13]; int min,sum; while(scanf("%d",&n)&&n)原创 2011-09-17 23:56:11 · 327 阅读 · 0 评论 -
uva oj 458
代码: #include #include char str[1000]; int main() { int i; memset(str,0,1000); while(scanf("%s",str)!=EOF) { for (i=0;str[i]!='\0'原创 2011-09-17 23:57:04 · 387 阅读 · 0 评论 -
uva oj 494
代码: #include #include #include char str[1000]; int main() { int i,n,count; while(fgets(str,1000,stdin)) { count=0; n=strle原创 2011-09-17 23:57:51 · 312 阅读 · 0 评论 -
uva oj 445
代码: #include #include #include int main() { char c; int sum=0,j; while((c=getchar())!=EOF) { if (isdigit(c)) { sum+=c-'0'原创 2011-09-17 23:58:34 · 370 阅读 · 0 评论 -
uva oj 488
代码: #include int main() { int n,i,j,k; int a,f; scanf("%d",&n); while(n--) { scanf("%d%d",&a,&f); for(i=0;i { for(j=1;j {原创 2011-09-18 00:01:58 · 404 阅读 · 0 评论 -
uva oj 490
代码: #include #include char str[101][101]; int main() { char c; int i=0,j=0,k,max=0; memset(str,0,10201); while((c=getchar原创 2011-09-18 00:02:51 · 346 阅读 · 0 评论 -
uva oj 694
代码: #include int main() { long A,L,num=1,a; int j=1; while(scanf("%ld%ld",&A,&L)==2&&A>0&&L>0) { num=1; a=A; while(原创 2011-09-18 00:03:34 · 257 阅读 · 0 评论 -
uva oj10055
代码: #include int main() { _int64 a,b; while(scanf("%lld%lld",&a,&b)!=EOF) { if (a>b) { printf("%lld\n",a-b); } else { prin原创 2011-09-18 00:04:32 · 387 阅读 · 0 评论 -
uva oj 10071
代码: #include int main() { int v,t; while(scanf("%d%d",&v,&t)!=EOF) { printf("%d\n",2*v*t); } return 0; }原创 2011-09-18 00:05:19 · 367 阅读 · 0 评论 -
uva oj 10300
代码: #include int main() { int n,f,a,b,c; int sum; scanf("%d",&n); while(n--) { scanf("%d",&f); sum=0; while(f--) { scanf("原创 2011-09-18 00:06:06 · 349 阅读 · 0 评论 -
zoj 1205
这道题本身不难,开始我采取第一种方法,不过在输入时用gets,导致超时;然后就采用第二种方法结果当用gets输入时还是超时,不过当用scanf输入时,就可以顺利通过,然后,把第一种方法也改用scanf输入,发现也能通过。 两种方法: 第一种: #include #inc原创 2011-08-30 07:35:10 · 800 阅读 · 0 评论 -
zoj 1251
Box of Bricks Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height.原创 2011-08-29 19:20:08 · 647 阅读 · 0 评论 -
zoj 1292
Integer Inquiry One of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from原创 2011-08-31 18:15:07 · 2001 阅读 · 1 评论 -
zoj 1334
代码如下: #include #include #include char zimu[]="0123456789ABCDEF"; int main() { char str[10]; int re[10]; int a,b,length,i,sum,j; mem原创 2011-09-11 21:14:44 · 450 阅读 · 0 评论 -
zoj1337
代码如下: #include #include #include int gcd(int a,int b); int main() { int N,i,j,count; int a[55]; double PI; memset(a,0,55); while(sc原创 2011-09-11 21:16:26 · 421 阅读 · 0 评论 -
zoj 1001
A + B Problem Calculate a + bInputThe input will consist of a series of pairs of integers a and b,separated by a space, one pair of integ原创 2011-08-28 15:30:30 · 676 阅读 · 0 评论 -
zoj 1037
Gridland Background For years, computer scientists have been trying to find efficient solutions to different computing problems. For s原创 2011-08-28 15:34:14 · 975 阅读 · 0 评论 -
zoj 1048
Financial Management Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. L原创 2011-08-28 15:36:15 · 589 阅读 · 0 评论 -
zoj 1051
A New Growth Industry A biologist experimenting with DNA modification of bacteria has found a way to make bacterial colonies sensitive to原创 2011-08-28 15:42:42 · 724 阅读 · 0 评论 -
zoj 1067
Color Me Less Problem A color reduction is a mapping from a set of discrete colors to a smaller one. The solution to this problem requ原创 2011-08-28 15:44:24 · 888 阅读 · 0 评论 -
zoj 1201
Inversion Let { A1,A2,...,An } be a permutation of the set{ 1,2,..., n}. If i Aj then the pair (Ai,Aj) is called an "inversion" of the原创 2011-08-28 15:52:40 · 718 阅读 · 0 评论 -
zoj 1151
Word Reversal For each list of words, output a line with each word reversed without changing the order of the words. This problem cont原创 2011-08-28 19:51:35 · 533 阅读 · 0 评论 -
zoj 1049
I Think I Need a Houseboat Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investig原创 2011-08-28 15:38:56 · 1456 阅读 · 0 评论 -
zoj 1115
Background The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit原创 2011-08-28 15:49:37 · 718 阅读 · 0 评论 -
zoj 1216
Scenario A single playing card can be placed on a table, carefully, so that the short edges of the card are parallel to the table's edge, a原创 2011-08-28 15:54:16 · 668 阅读 · 0 评论 -
zoj 1240
IBM Minus One You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubric原创 2011-08-28 15:56:36 · 558 阅读 · 0 评论 -
zoj 1241
Geometry Made Simple Mathematics can be so easy when you have a computer. Consider the following example. You probably know that in a rig原创 2011-08-28 15:59:04 · 1019 阅读 · 0 评论 -
zoj 1242
Carbon Dating Until the second half of the 20th century, determining the actual age of an archaeological find had been more or less a mat原创 2011-08-28 16:01:03 · 1082 阅读 · 0 评论 -
uva oj 489
代码: #include #include char str1[100]; char str2[100]; int main() { int n; int i,j,count,num,flag; while(scanf("%d",&n)&&n原创 2011-09-18 14:25:01 · 434 阅读 · 0 评论
分享