Search found 5 matches

by avlahov
Mon Dec 25, 2006 8:39 am
Forum: Bugs and suggestions
Topic: 11100 - OJ accepts incorrect solutions
Replies: 4
Views: 3442

I am aware that there can be more than one correct minimum sequence. However, my code is not even trying to find correct sequences. It just outputs the correct k, followed by the sorted input with each bag dimension on a separate line. This is obviously wrong, yet it gets AC...
by avlahov
Mon Dec 25, 2006 7:09 am
Forum: Bugs and suggestions
Topic: 11100 - OJ accepts incorrect solutions
Replies: 4
Views: 3442

11100 - OJ accepts incorrect solutions

OJ gave me AC although I sent incorrect code! It seems to only check the correctness of k (the minimum number of pieces), but does not care much for the format of the k sequences. Here's the code that got AC: #include <iostream> using namespace std; int a[10000]; int b[10000]; int last = 9999; int L...
by avlahov
Sun Jun 01, 2003 6:28 am
Forum: Volume 101 (10100-10199)
Topic: 10196 - Check The Check
Replies: 77
Views: 23665

try this one

mine failed this case at first:

. . . . . . . .
. . . . . . . .
. . . k . . . .
. . . . . . . .
. B . R . . . .
. . . . . . . .
. . . . . . . .
. K . . . . . .

because i had output for both B and R.
just had to add a couple of break statements and got AC!
by avlahov
Tue Jul 16, 2002 2:33 pm
Forum: Volume 101 (10100-10199)
Topic: 10195 - The Knights Of The Round Table
Replies: 59
Views: 15753

What's Wrong?

i can't think of a possible special case... also if i input 34.64 34.64 34.64 should i get 10.000 or 10? #include <iostream.h> #include <math.h> void main() { long double a, b, c; while(cin>>a>>b>>c) { long double p = (a + b + c)/2; long double temp = p*(p-a)*(p-b)*(p-c); long double s = sqrtl(temp)...
by avlahov
Wed Nov 07, 2001 6:37 am
Forum: Java
Topic: JAVA "Press any key to continue..." message
Replies: 1
Views: 2894

Hello, I am certain that I have solved problem 108 in Java but the online judge keeps saying that I have Wrong Answer. Could this be caused by the fact that at the end of my output I have the standart Java message "Press any key to continue..."? If yes, could you please give me a hint how to avoid t...

Go to advanced search