Search found 132 matches

by Revenger
Sun Jul 28, 2002 7:20 pm
Forum: Volume 6 (600-699)
Topic: 663 - Sorting Slides
Replies: 18
Views: 10812

663 - Sorting Slides

Why this code gets WA? I have no idea :( My algorithm is such: - if there is a slide on which lie only one number then I consider that this slide have this number - if there is a number which lie on only one slide then I consider that this slide have this number - if there is no such slides and numb...
by Revenger
Fri Jul 26, 2002 6:33 pm
Forum: Volume 5 (500-599)
Topic: 507 - Jill Rides Again
Replies: 92
Views: 30607

Sorry for this post.
I misunderstood the problem :oops:
by Revenger
Fri Jul 26, 2002 6:28 pm
Forum: Volume 5 (500-599)
Topic: 507 - Jill Rides Again
Replies: 92
Views: 30607

507 - Jill Rides Again

Why I get WA? I use a standart DP algorithm ... [pascal]Program p507; Var T,N : Integer; tt,i : Integer; Max,Sum,j : Integer; b,e,bm,em : Integer; begin Read(T); for tt:=1 to T do begin Read(N); Max:=0; Sum:=0; b:=1; for i:=2 to N do begin Read(j); if Sum+j>0 then begin Sum:=Sum+j; e:=i; end else be...
by Revenger
Fri Jul 26, 2002 6:04 pm
Forum: Volume 5 (500-599)
Topic: 531 - Compromise
Replies: 73
Views: 26329

531 WA

I use DP but get WA :cry: Help me !!! [pascal]Program p531; Const MaxN = 100; Var N1,N2 : Integer; i,j,k : Integer; T1,T2,P : Array[1..MaxN]of String[50]; Inf : Array[1..MaxN,0..MaxN]of Integer; Function ReadString : String; Var Ch : Char; S : String; begin S:=''; While True do begin While Eoln do b...
by Revenger
Fri Jul 26, 2002 4:36 pm
Forum: Volume 5 (500-599)
Topic: 529 - Addition Chains
Replies: 32
Views: 4168

529 - Addition Chains

I can't understand why this program gets Accepted 8) I use a such algorithm: 1. Consider that sequence <a0,a1,..,am> is good if and only if it is the answer for N = am 2. If sequence <a0,a1,..,am,a(m+1)> is good then the sequence <a0,a1,..,am> is also good. So, I find all good sequences with length ...
by Revenger
Wed Jul 24, 2002 7:43 am
Forum: Volume 5 (500-599)
Topic: 579 - Clock Hands
Replies: 44
Views: 14265

For example, on the test

Code: Select all

1:59
the corect output is

Code: Select all

65.500
Change your code is so way:

[cpp]if(ans<0)ans*=-1;
if(ans>180)ans=360.000-ans;[/cpp]
[/code]
by Revenger
Tue Jul 23, 2002 5:50 pm
Forum: Volume 5 (500-599)
Topic: 562 - Dividing coins
Replies: 73
Views: 30690

562 - Dividing coins

I wonder why this code gets WA :( Can anyone help me? [pascal]Program p562; Const MaxV = 500; MaxN = 100; Var Inf : Array[0..MaxN*MaxV]of Integer; T,tt : Integer; N,i,j : Integer; Sum : Integer; W : Array[1..MaxN]of Integer; begin Read(T); for tt:=1 to T do begin for i:=0 to 50000 do Inf :=0; Read(N...
by Revenger
Thu Jul 18, 2002 6:11 pm
Forum: Volume 4 (400-499)
Topic: 453 - Intersecting Circles
Replies: 84
Views: 15573

453 WA

I don't know why it gets WA. Please, help me! [pascal]Program p453; Const Eps = 1e-10; Var x1,y1,r1 : Extended; x2,y2,r2 : Extended; a,b,c,d,x,y : Extended; a0,b0,c0,di : Extended; ya,yb,xa,xb : Extended; begin While Not Eof(InPut) Do begin Readln(x1,y1,r1); Readln(x2,y2,r2); if (abs(x1-x2)<Eps)and(...
by Revenger
Sun Jul 14, 2002 5:38 pm
Forum: Volume 103 (10300-10399)
Topic: 10326 - The Polynomial Equation
Replies: 18
Views: 6205

10326 - The Polynomial Equation

I submit this problem 22 times at contest, but always get WA :( Please, help me! [pascal]Program p10326; Const MaxN = 50; Eps = 1e-3; Type TEqu = Array[0..MaxN]of Comp; Var N,i,j,ok : Integer; R : Array[1..MaxN]of Comp; Ans : TEqu; Procedure WriteEqu(E : TEqu); Var i : Integer; f : boolean; begin f:...
by Revenger
Sun Jul 14, 2002 3:08 pm
Forum: Volume 103 (10300-10399)
Topic: 10333 - The Tower of ASCII
Replies: 8
Views: 3398

10333 - The Tower of ASCII

I try to solve this problem on contest but get Time Limit. Then I change my program in proper way but get Wrong Answer. After contest I send the program and it get Accepted P.E. runnig 1.060 seconds. I just wonder how to get Accepted with time less that 0.100 seconds using Pascal. And I think that i...
by Revenger
Sun Jul 14, 2002 3:03 pm
Forum: Volume 103 (10300-10399)
Topic: 10314 - Three Pigs
Replies: 20
Views: 9922

The problem is very hard. To solve it you should use DFS + BFS + Backtracking. My program size is 7 KB!
by Revenger
Sat Jul 13, 2002 8:51 am
Forum: Other words
Topic: How to write Judge System?!
Replies: 0
Views: 1492

How to write Judge System?!

I am writing off-line Judge System under Win32 platform. Can anyone answer my question: 1. How I can find the maximum Memory Usage of Process? 2. How I can find how much memory is used by Process at now moment? 3. How I can set memory limit for Process? I use Delphi v6.0 Best Regards, Revenger [Naza...
by Revenger
Mon Jul 08, 2002 6:52 am
Forum: Volume 1 (100-199)
Topic: 191 - Intersection
Replies: 103
Views: 18978

:) I get Accepted at last! :) :D :lol:
by Revenger
Sun Jul 07, 2002 9:22 pm
Forum: Volume 1 (100-199)
Topic: 191 - Intersection
Replies: 103
Views: 18978

I found some mistakes, but still WA :cry: [pascal]Program p191; Const Eps = 1e-7; Type TPoint = Record X,Y : Extended; End; TLine = Record A,B,C : Extended; End; Var p1,p2,e1,e2 : TPoint; tmp : Extended; N,t : Integer; l : TLine; Procedure MakeLine(T1,T2:TPoint;Var L:TLine); begin l.a:=t1.y-t2.y; l....
by Revenger
Sun Jul 07, 2002 9:12 pm
Forum: Volume 1 (100-199)
Topic: 191 - Intersection
Replies: 103
Views: 18978

191 WA

I can't understand why my program gets WA: [pascal]Program p191; Const Eps = 1e-7; Type TPoint = Record X,Y : Extended; End; TLine = Record A,B,C : Extended; End; Var p1,p2,e1,e2 : TPoint; tmp : Extended; N,t : Integer; l : TLine; Procedure MakeLine(T1,T2:TPoint;Var L:TLine); begin l.a:=t1.y-t2.y; l...

Go to advanced search