Search found 13 matches

by Rene
Tue Aug 05, 2003 6:32 pm
Forum: Volume 5 (500-599)
Topic: 587 - There's treasure everywhere!
Replies: 37
Views: 2635

i think if you try to init x and y as 10e-6,you will get AC.
GOOD LUCK. :lol:
by Rene
Fri Jul 25, 2003 6:11 pm
Forum: C++
Topic: A little problem about cin
Replies: 7
Views: 2515

yes,i can use scanf(). but i don't know much about the function in C. In UVA, the most input is terminated by End Of File. when i use stream, cin will throw an exception when it read EOF, i use [cpp] while (cin >> a)[/cpp] to find the End Of File. If i use scanf(), how should i write [c]while (scanf...
by Rene
Fri Jul 25, 2003 6:11 am
Forum: Volume 4 (400-499)
Topic: 408 - Uniform Generator
Replies: 48
Views: 4058

Oh,my god.
yes,you are right, i use "Choice",then ACC.
Thank you. :lol:
by Rene
Fri Jul 25, 2003 6:06 am
Forum: C++
Topic: A little problem about cin
Replies: 7
Views: 2515

I use TC and VC++. They have the same problem.
My OS is Windows.
can i include <iostream>?
i always use iostream.h.
Thank you.
by Rene
Thu Jul 24, 2003 5:37 pm
Forum: C++
Topic: A little problem about cin
Replies: 7
Views: 2515

A little problem about cin

I am writing a program about clock these days. but there are a little problem about input, then i have writen a test program.And i have found a strange thing. This is my code: [cpp] #include <iostream.h> void main() { int a; while (cin >> a) cout << a << endl; } [/cpp] input: 15 00 01 02 05 07 08 09...
by Rene
Thu Jul 24, 2003 3:59 pm
Forum: Volume 4 (400-499)
Topic: 408 - Uniform Generator
Replies: 48
Views: 4058

408 WA,Why?

I have tested my code for many inputs,and i have been careful to the output format. But it always gets WA. :( Please help me,Thank you. :D :D :D [cpp] #include <iostream.h> #include <stdio.h> void main() { long int step,mod,i,seed,j; long int flag; while (cin >> step >> mod) { for (i = 0;i < mod;i++...
by Rene
Tue Jul 15, 2003 2:23 pm
Forum: General
Topic: SECURITY FLAW IN ONLINE JUDGE
Replies: 34
Views: 8529

/* * @(#)InternalFrameDemo.java 1.4 99/10/19 * * Copyright (c) 1997-1999 by Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use, * modify and redistribute this software in source and binary code form, * provided that i) this copyr...
by Rene
Sat Jul 12, 2003 1:47 pm
Forum: Volume 5 (500-599)
Topic: 568 - Just the Facts
Replies: 39
Views: 16562

568 Why PE?

why my answer always gets PE? [cpp] #include <iostream.h> #include <stdio.h> int main() { long n,i,b; while (cin >> n) { b = 1; for (i = 1;i <= n;i++) { b *= i; while (!(b % 10)) b /= 10; b %= 100000; } while (!(b % 10)) b /= 10; b %= 10; printf ("%5ld -> %ld\n",n,b); } return 0; }[/cpp]
by Rene
Sun May 18, 2003 10:08 am
Forum: Volume 4 (400-499)
Topic: 424 - Integer Inquiry
Replies: 96
Views: 20011

i have checked my code and got AC
thanx :D
by Rene
Tue May 13, 2003 5:19 am
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11185

oh,i see.
and i have changed a new way to slove this problem and got accepted.
Thanx. :D
by Rene
Sun May 11, 2003 11:00 am
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11185

2 is the right answer?
why?
i think 3 is the right answer. And my code get the answer 3.
by Rene
Sat May 10, 2003 1:38 pm
Forum: Volume 4 (400-499)
Topic: 424 - Integer Inquiry
Replies: 96
Views: 20011

424 Why WA

Please help me! why WA? [cpp] #include <iostream.h> #include <stdio.h> int max = 104; int k; int sum[105]; void main() { char c; int i,j,k1,x; int sum1[105]; k = max; while (1) { for (i = 0;(c = getchar()) != '\n';i++) sum1 = c - 48; if (!sum1[0]) break; k1 = i - 1; j = max; x = 0; for (i = k1;i >= ...
by Rene
Sat May 10, 2003 1:27 pm
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11185

299 WA

Why my code is WA? Please help me! [cpp]#include <iostream.h> struct node { int num; node *next; }; node *head,*last; int dele () { node *p; p = head; head = head -> next; delete p; return 0; } int swap () { last -> next = head; last = head; head = head -> next; last -> next = NULL; return 0; } int ...

Go to advanced search