Oh, that's it. Your phone array should have a size of 9, to include the null-terminator.
And your program prints 0.6, not 0.60 in my computer. Dunno if it is the problem.
Search found 17 matches
- Mon Jul 15, 2002 1:20 am
- Forum: Volume 1 (100-199)
- Topic: 145 - Gondwanaland Telecom
- Replies: 62
- Views: 22441
- Sun Jul 14, 2002 11:45 am
- Forum: Volume 1 (100-199)
- Topic: 145 - Gondwanaland Telecom
- Replies: 62
- Views: 22441
- Wed Jul 10, 2002 3:59 am
- Forum: Volume 1 (100-199)
- Topic: 145 - Gondwanaland Telecom
- Replies: 62
- Views: 22441
- Mon Jun 03, 2002 2:37 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10291 - Cut the Legs
- Replies: 3
- Views: 3037
- Fri Apr 19, 2002 11:33 am
- Forum: Volume 102 (10200-10299)
- Topic: 10258 - Contest Scoreboard
- Replies: 87
- Views: 48274
- Fri Apr 19, 2002 11:28 am
- Forum: Volume 1 (100-199)
- Topic: 173 - Network Wars
- Replies: 29
- Views: 6180
- Wed Apr 17, 2002 1:45 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10258 - Contest Scoreboard
- Replies: 87
- Views: 48274
10258 Multiple input issues
Is this code enough to handle the multiple input in 10258?
[cpp]void main()
{
#ifdef ONLINE_JUDGE
FILE *fp=stdin;
#else
FILE *fp=fopen("b.in","r");
#endif
int n,p,t;
int i;
char l;
int j;
char buf[100];
fgets(buf,100,fp);
sscanf(buf,"%d",&j);
fgets(buf,100,fp);
while(j>0 ...
[cpp]void main()
{
#ifdef ONLINE_JUDGE
FILE *fp=stdin;
#else
FILE *fp=fopen("b.in","r");
#endif
int n,p,t;
int i;
char l;
int j;
char buf[100];
fgets(buf,100,fp);
sscanf(buf,"%d",&j);
fgets(buf,100,fp);
while(j>0 ...
- Sat Apr 13, 2002 5:16 am
- Forum: Volume 1 (100-199)
- Topic: 168 - Theseus and the Minotaur
- Replies: 64
- Views: 15139
- Tue Apr 02, 2002 5:05 pm
- Forum: Volume 1 (100-199)
- Topic: 168 - Theseus and the Minotaur
- Replies: 64
- Views: 15139
This seems to be a very easy problem but I have been getting wrong answer. I have tried several cases and they all work very well. So reading the program specification again I'm now wondering what should Theseus do if the Minotaur is approaching(i.e. starts) Theseus in a one-direction passage, that ...
- Sat Mar 30, 2002 9:41 am
- Forum: Volume 1 (100-199)
- Topic: 139 - Telephone Tangles
- Replies: 66
- Views: 15743
- Thu Mar 07, 2002 4:47 am
- Forum: Volume 1 (100-199)
- Topic: 133 - The Dole Queue
- Replies: 42
- Views: 10643
- Sun Mar 03, 2002 4:03 pm
- Forum: Volume 1 (100-199)
- Topic: 147 - Dollars
- Replies: 233
- Views: 50874
- Wed Feb 27, 2002 5:16 pm
- Forum: Volume 1 (100-199)
- Topic: 147 - Dollars
- Replies: 233
- Views: 50874
- Sat Feb 23, 2002 4:04 pm
- Forum: Volume 1 (100-199)
- Topic: 139 - Telephone Tangles
- Replies: 66
- Views: 15743
- Sat Feb 23, 2002 3:56 pm
- Forum: Volume 1 (100-199)
- Topic: 140 - Bandwidth
- Replies: 49
- Views: 16262