Page 2 of 6
Posted: Tue Feb 03, 2004 11:10 am
by CDiMa
sjn wrote:Sorry, what i mean is "ceil"

i made the mistake when i posted the topic
Are you sure that it was your mistake and not that your source uses ceill?
ceill is a valid C99 function and handles long double...
Ciao!!!
Claudio
362 - 18.000 seconds remaining. Please this input
Posted: Sun Mar 07, 2004 1:30 pm
by Dejarik
I'm guessed to be very near from the Accepted Answer. Please, may you help me by testing this simple input in your correct 362's implementations?
Maybe i will found my problem here. Thanks in advance.
My input is
- 210
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
10
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
5
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
And my output succeeded in my WA implementation:
- Output for data set 1, 210 bytes:
Time remaining: 7 seconds
Time remaining: 5 seconds
Time remaining: 2 seconds
Time remaining: 0 seconds
Total time: 20 seconds
Output for data set 2, 10 bytes:
Time remaining: 12 seconds
Time remaining: 13 seconds
Time remaining: 4 seconds
Total time: 19 seconds
Output for data set 3, 5 bytes:
Time remaining: 20 seconds
Time remaining: 15 seconds
Time remaining: 10 seconds
Time remaining: 5 seconds
Time remaining: 0 seconds
Total time: 25 seconds
Posted: Sun Mar 07, 2004 2:49 pm
by angga888
Your output is the same with my AC solution.
Maybe you should care about output formatting.
Hope it helps,
angga888
Posted: Sun Mar 07, 2004 3:05 pm
by Dejarik
Why do you mean with 'output formatting'? Can you show me an example?
Thank you very much!
PD: Does your program finish each iteration with:
[c]printf("Total time: %d seconds\n\n",time);[/c]
or with
[c]printf("Total time: %d seconds\n",time);[/c]
I don't know if an extra /n at the end of the output will make execution fail... Thanks again
Posted: Tue Mar 09, 2004 2:24 am
by junbin
If it is a simple one more line, one less line thing, then you'd get PE.. so I think you probably have a +1/-1 bug somewhere... try posting random data of very long length.. I'll post my results and then you can compare a bit.
Posted: Tue Mar 09, 2004 3:58 pm
by Dejarik
Thank you very much junbin. Please try this input in your 362 accepted problem.
Code: Select all
980
32
23
22
48
38
28
36
4
9
31
10
2
42
44
52
11
19
93
22
42
33
21
48
0
32
0
42
0
1
0
14
94
0
44
43
465
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
10
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
10
0
My output is the next one:
Code: Select all
Output for data set 1, 980 bytes:
Time remaining: 26 seconds
Time remaining: 33 seconds
Time remaining: 19 seconds
Time remaining: 10 seconds
Time remaining: 9 seconds
Time remaining: 23 seconds
Time remaining: 0 seconds
Total time: 35 seconds
Output for data set 2, 465 bytes:
Time remaining: 150 seconds
Time remaining: 52 seconds
Time remaining: 27 seconds
Time remaining: 15 seconds
Time remaining: 7 seconds
Time remaining: 0 seconds
Total time: 30 seconds
Output for data set 3, 10 bytes:
Time remaining: stalled
Time remaining: stalled
Time remaining: stalled
Time remaining: stalled
Total time: 23 seconds
Thanks again!
Posted: Tue Mar 09, 2004 4:58 pm
by junbin
my answer is exactly the same. :p
Code: Select all
Output for data set 1, 980 bytes:
Time remaining: 26 seconds
Time remaining: 33 seconds
Time remaining: 19 seconds
Time remaining: 10 seconds
Time remaining: 9 seconds
Time remaining: 23 seconds
Time remaining: 0 seconds
Total time: 35 seconds
Output for data set 2, 465 bytes:
Time remaining: 150 seconds
Time remaining: 52 seconds
Time remaining: 27 seconds
Time remaining: 15 seconds
Time remaining: 7 seconds
Time remaining: 0 seconds
Total time: 30 seconds
Output for data set 3, 10 bytes:
Time remaining: stalled
Time remaining: stalled
Time remaining: stalled
Time remaining: stalled
Total time: 23 seconds
though you may wanna go through the spelling and stuff just to make sure.
Posted: Tue Mar 09, 2004 6:24 pm
by Dejarik
I can't understand where is my fuc**** mistake in my solutions
My only chance is to try with large numbers as the total amount of bytes (for possible overflows). Did you realized similar tests with this problem when you was trying to get its correct answer?
I think i will let this problem as impossible for me... I will focus my time on other problems...
Thank you by the way, we will be in contact if needed with our tries...
Joan

Posted: Wed Mar 10, 2004 10:40 pm
by Dejarik
Hey, if you have an ACCEPTED answer for this problem, please can you check this input and report its results here?
I think i'm VERY near from the correct solution, but still WA
Code: Select all
500000
100000
100000
100000
100000
0
100000
5000000
1000000
1000000
1000000
1000000
0
1000000
500000000
100000000
100000000
100000000
100000000
0
100000000
5000000000
1000000000
1000000000
1000000000
1000000000
0
Thanks in advance! Joan
Posted: Thu Mar 11, 2004 12:28 am
by junbin
3rd data gave a very long string of "stalled"
4th data crashed my program
Output for data set 1, 500000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds
Output for data set 2, 5000000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds
Posted: Thu Mar 11, 2004 1:25 am
by Dejarik
Of course, i was wrong while posting my example. Sorry junbin, this is the correct one. Thank you very much for the time spent on me.
Code: Select all
500000
100000
100000
100000
100000
0
100000
5000000
1000000
1000000
1000000
1000000
0
1000000
500000000
100000000
100000000
100000000
100000000
0
100000000
5000000000
1000000000
1000000000
1000000000
1000000000
0
1000000000
0
And my output is the next one. For the last try, it makes an overflow, does like yor program? Thanks!!
Code: Select all
Output for data set 1, 500000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds
Output for data set 2, 5000000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds
Output for data set 3, 500000000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds
Output for data set 4, 705032704 bytes:
Time remaining: -16 seconds
Total time: 6 seconds
Joan
Posted: Thu Mar 11, 2004 1:39 pm
by junbin
Code: Select all
Output for data set 1, 500000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds
Output for data set 2, 5000000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds
Output for data set 3, 500000000 bytes:
Time remaining: 2 seconds
Total time: 6 seconds
Output for data set 4, 705032704 bytes:
Total time: 1 seconds
Output for data set 5, 1000000000 bytes:
Total time: 1 seconds
Output for data set 6, 1000000000 bytes:
Total time: 2 seconds
I think set 4 caused my program to overflow and so anything after set 3 should be invalid.
Bug in judge
Posted: Mon Jun 21, 2004 2:56 pm
by Rajib
I can't believe myself . . .
I get WA with;
remaintime=ceil(remainbyte/(transferbyte/5.0));
printf(" Time remaining: %ld seconds\n",long(remaintime));
I get AC with;
remaintime=remainbyte/(transferbyte/5.0);
printf(" Time remaining: %ld seconds\n",long(ceil(remaintime)));
only chainge is ceil in printf function...
Re: Bug in judge
Posted: Tue Jun 22, 2004 8:55 am
by CDiMa
Rajib wrote:I can't believe myself . . .
I get WA with;
remaintime=ceil(remainbyte/(transferbyte/5.0));
printf(" Time remaining: %ld seconds\n",long(remaintime));
I get AC with;
remaintime=remainbyte/(transferbyte/5.0);
printf(" Time remaining: %ld seconds\n",long(ceil(remaintime)));
only chainge is ceil in printf function...
What is the type of the remaintime variable?
Ciao!!!
Claudio
WA -- help 362 18,000 seconds remaining
Posted: Thu Sep 02, 2004 5:34 am
by Ghust_omega
Hi!! I get WA for 362 , anyone help me and give me tricky inputs
I dont know where its wrong, i try all the inputs before posted and i got the same answer

Any help would be appreciated
Thanks in advance