Search found 38 matches

by Pier
Tue Jun 17, 2003 8:41 pm
Forum: Volume 105 (10500-10599)
Topic: 10509 - R U Kidding Mr. Feynman?
Replies: 41
Views: 13529

I don't like the judge!

This is stupid!

If I use:
[pascal] writeln(output,(a+dx):0:4);[/pascal]

I get WA, but if I use

[pascal] a:= a+dx;
writeln(output,a:0:4);[/pascal]

I get AC!
by Pier
Tue Jun 10, 2003 6:41 pm
Forum: Volume 104 (10400-10499)
Topic: 10484 - Divisibility of Factors
Replies: 39
Views: 18681

Why WA!

I keep getting WA. Any help appreciated! [pascal]{Wrong Answer 0:00.100 64} {$N+} Const p: array [1..25] of byte= (2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97); Var i: byte; n,d,t: longint; r: extended; pn: array [1..25] of byte; Begin readln(input,n,d); While (n<>0) or (d...
by Pier
Wed May 28, 2003 2:00 am
Forum: Volume 104 (10400-10499)
Topic: 10499 - The Land of Justice
Replies: 51
Views: 19434

10499 - The Land of Justice

I don't quite understand this problem. For what I understood, the answer should always be 50%!

Could someone please explain me?



Thanks!
by Pier
Tue May 27, 2003 6:54 pm
Forum: Volume 101 (10100-10199)
Topic: 10107 - What is the Median?
Replies: 74
Views: 18662

All test OK, but still WA!

Any help appreciated! [pascal] {$N+} Var m: extended; i,j,t: longint; n: array [1..10000] of longint; Begin i:= 1; While (not eof(input)) do begin read(input,n ); for j:= i downto 2 do if n[j-1]>n[j] then begin t:= n[j]; n[j]:= n[j-1]; n[j-1]:= t; end else break; if odd(i) then writeln(output,n[(i s...
by Pier
Sun May 11, 2003 6:31 am
Forum: Volume 104 (10400-10499)
Topic: 10487 - Closest Sums
Replies: 89
Views: 30090

Thanks! I got AC on both!
by Pier
Fri May 09, 2003 6:40 pm
Forum: Volume 104 (10400-10499)
Topic: 10487 - Closest Sums
Replies: 89
Views: 30090

Thanks for the tip on problem 10489, I got AC now!

But didn't undertand what you ment for problem 10487. Could you explain me a little bit further?



Thanks!
by Pier
Thu May 08, 2003 7:41 pm
Forum: Volume 104 (10400-10499)
Topic: 10487 - Closest Sums
Replies: 89
Views: 30090

10487, 10489 and 10490

I have problems with this three programs. Any help is appreciated! Problem 10487: [pascal]Var c,i,j,k,m,n,s,t: integer; a: array [1..1000] of integer; Begin readln(input,n); c:= 0; While (n<>0) do begin Inc(c); writeln(output,'Case ',c,':'); for i:= 1 to n do readln(input, a ); readln(input,m); for ...
by Pier
Mon Mar 31, 2003 5:08 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 49468

Help with problem 102!

Hi! Here's my code. Any help aprecciated. [pascal]Const l: array [0..2] of char = ('C','B','G'); Var i,s,tot: Longint; r: string[3]; n: array [1..9] of longint; Procedure intenta (a,b,c: longint); begin if (n[a]+n +n[c]) > s then begin s:= n[a]+n +n[c]; r:= l[a mod 3] + l + l[c mod 3]; end; end; Beg...

Go to advanced search