Common Board| Show all threads Hide all threads Show all messages Hide all messages | | Hint | Plamen_N | 1640. Circle of Winter | 21 May 2012 21:00 | 1 | Hint Plamen_N 21 May 2012 21:00 The answers of the tests aren't unique. For example for the first sample test my AC program outputs 4.564191068 4.136298156 5.377150309. It can be also 0 0 (and the respective radius). But don't forget to check if the coordinates of your answer don't coincide with some from the input. | | So easy | Radi Muhammad Reza | 1185. Wall | 21 May 2012 14:40 | 2 | So easy Radi Muhammad Reza 31 Aug 2010 11:53 length of convex hull + 2 * PI * l :D Why did you said "length of convex hull + 2 * PI * l :D" | | Help me ! | hnivhnivt95 | 1185. Wall | 21 May 2012 14:22 | 1 | Can you have me why solution is 1628 ?? | | WA on test 17 | armenia1993 | 1362. Classmates 2 | 21 May 2012 11:45 | 1 | What the 17 test? why WA? armenia1993@mail.ru int charact(int v) { used[v] = true; vector<int> dp; for (int i=0; i<g[v].size(); ++i) { int to = g[v][i]; if (!used[to]) dp.push_back(charact(to)); } if (dp.size() == 0) return 0; sort(dp.begin(), dp.end()); for (int i=dp.size(); i>0;--i) dp[i-1] += dp.size() - i + 1; return *max_element(dp.begin(), dp.end()); } | | 1001. Обратный корень. Wrong answer! Why? | Margar | 1001. Reverse Root | 20 May 2012 23:08 | 1 | #include <iostream> #include <stdio.h> #include <math.h> using namespace std; int main(void){ double a[300]; unsigned long int n; short int i=0, k=0; while (cin>>n){ k++; a[k]=sqrt((double)n); } for (i=k; i>0; i--){ printf("\n%.4f",a[i]); } return(0); } I don't know where the error =( Edited by author 20.05.2012 23:10 | | Any idea? Please! | coder | 1888. Pilot Work Experience | 20 May 2012 22:56 | 3 | if unconnected graph, alway maximal difference is 49. if connected graph ?? AC!!! I found bug!!! Edited by author 22.12.2011 21:28 Edited by author 22.12.2011 21:28 TAGS: Graph Theory, Parity, Connectivity. Please, explane in more detail. =) | | help why is wrong | armenia1993 | 1001. Reverse Root | 20 May 2012 22:36 | 2 | #include<iostream> #include <stdio.h> using namespace std; int main(){ freopen("in.txt", "r", stdin); int i = 0; double mas[9310]; cin >> mas[i]; while(mas[i]>=0) { i++; cin >> mas[i]; } for(int k = i-1; k>=0; k--) printf("%.4lf\n",sqrt(mas[k])); } | | Как самому проверить время работы программы / in English inside | DIMA_N | | 20 May 2012 00:48 | 1 | При проверки программы на сайте выдается время работы программы, как это можно самому проверить? When checking program on the site is issued by the time of work program, as this is the test? | | Please, test my program... Whats wrong? Can you give me any tests? | Evgeny Reshetnikov | 1019. Line Painting | 19 May 2012 22:23 | 12 | Program p1019; Const MaxN = 6000; Var S : Array[1..MaxN, 1..2]of Longint; Del : Array[1..MaxN]of Byte; N, s0, ai, bi : Longint; ci : Char; Procedure Check; Var i, j, k : Longint; begin k := 0; for i := 1 to s0 do begin if i > s0 - k then break; if (Del[i] = 1) or (S[i, 1] = S[i, 2]) then begin k := k + 1; for j := i to s0 - 1 do S[j] := S[j + 1]; end; end; s0 := s0 - k; end; Procedure Black; Var i, ts0 : Longint; begin FillChar(Del, SizeOf(Del), 0); ts0 := s0; for i := 1 to s0 do if (ai <= S[i, 1]) and (bi >= S[i, 1]) and (bi <= S[i, 2]) then S[i, 1] := bi else if (ai >= S[i, 1]) and (ai <= S[i, 2]) and (bi >= S[i, 2]) then S[i, 2] := ai else if (ai <= S[i, 1]) and (bi >= S[i, 2]) then Del[i] := 1 else if (ai >= S[i, 1]) and (bi <= S[i, 2]) then begin ts0 := ts0 + 1; S[ts0, 1] := bi; S[ts0, 2] := S[i, 2]; S[i, 2] := ai; end; s0 := ts0; Check; end; Procedure Merge; Var i, j : Longint; ex : Boolean; begin FillChar(Del, SizeOf(Del), 0); While True do begin ex := true; for i := 1 to s0 - 1 do if Del[i] = 0 then for j := i + 1 to s0 do if Del[j] = 0 then if (S[i, 1] <= S[j, 1]) and (S[i, 2] >= S[j, 1]) then begin if S[j, 2] > S[i, 2] then S[i, 2] := S[j, 2]; Del[j] := 1; ex := false; end else if (S[i, 1] <= S[j, 2]) and (S[i, 2] >= S[j, 2]) then begin if S[j, 1] <= S[i, 1] then S[i, 1] := S[j, 1]; Del[j] := 1; ex := false; end else if (S[i, 1] >= S[j, 1]) and (S[i, 2] <= S[j, 2]) then begin Del[i] := 1; ex := false; end else if (S[j, 1] >= S[i, 1]) and (S[j, 2] <= S[i, 2]) then begin Del[j] := 1; ex := false; end; if ex then break; end; end; Procedure WriteIt; Var L, R, i : Longint; begin L := 0; R := 0; for i := 1 to s0 do if (S[i, 2] - S[i, 1] > R - L) or ((S[i, 2] - S[i, 1] = R - L) and (S[i, 1] < L)) then begin L := S[i, 1]; R := S[i, 2]; end; Writeln(L, ' ', R); end; begin S[1, 1] := 0; S[1, 2] := 1000000000; s0 := 1; Readln(N); While N > 0 do begin N := N - 1; Readln(ai, bi, ci, ci); if ai >= bi then Continue; if ci = 'b' then Black else begin s0 := s0 + 1; S[s0, 1] := ai; S[s0, 2] := bi; end; end; Merge; WriteIt; end. INPUT: 14 1 999999999 b 1 300 b 20 120 w 1 50 b 220 300 w 250 270 b 40 70 w 50 160 b 30 90 w 120 140 w 40 50 b 180 200 w 1 40 w 70 80 w OUTPUT: 0 40 Hope it can help.If still not,I can give you more test data. my program made the correct answer for the test case above, but WA at #2 on the judge, could you give me some more tests? Thank you very much! input 9 2 34 w 1 95 b 33 875 b 34 543 w 33 762 b 98754 999999843 b 87 221 w 76 432 w 325 764 b output 76 325 if you want more test mail me Hanieh_Mirzaei@yahoo.com I thought your test is incorrect. I solve it by hand and I found the answer should be 875 98754,isn't it? I have the same problem (WA on #2). I checked this test and it sould be 875 98754. why is it 76 325 ?? ...well i also wa on test 2 but the 1st test my answer is 60 140 the 2nd the same as upstairs i'm wa on test 8 now ... Edited by author 27.11.2005 20:47 Edited by author 27.11.2005 20:48 Edited by author 27.11.2005 20:49 thanks very much for your test date,because of then test date,i found what is wrong with my program 14 1 999999999 b 1 300 b 20 120 w 1 50 b 220 300 w 250 270 b 40 70 w 50 160 b 30 90 w 120 140 w 40 50 b 180 200 w 1 40 w 70 80 w The answer isn't 50 90? Where did it say that 0 is white? Edward, I think in this test 1 40 Edited by author 19.05.2012 22:24 Hi, I have tried out many tests and they are all passing. However, I get "Wrong answer" in test #1 and stuck up there. Can u give me test cases for test #1 ? | | To Admins - Rejudge | Valery Klamm | 1112. Cover | 19 May 2012 19:46 | 1 | I got AC, but on test: 6 0 30 10 70 20 80 40 110 90 130 120 140 my AC program output: 2 0 30 90 130 but answer must be: 3 0 30 40 110 120 140 | | Something is wrong with test 11 | Dima_Philippov | 1202. Rectangles Travel | 18 May 2012 19:37 | 1 | Something is wrong with test 11. When I wrote while (scanf("%d", &n) >= 1) { ... } I got WA11. But when I wrote while (scanf("%d", &n) >= 1) { ... break; } I got AC. | | test 5 | barca | 1243. Divorce of the Seven Dwarfs | 18 May 2012 13:04 | 1 | test 5 barca 18 May 2012 13:04 | | test 12 | barca | 1021. Sacrament of the Sum | 18 May 2012 12:56 | 1 | | | WA | mastersobg | 1323. Classmates | 18 May 2012 04:27 | 4 | WA mastersobg 6 Nov 2007 21:45 What's the second test?? Any hints?? Re: WA mirzman 6 Jan 2008 14:27 In this test n=m=8 I also had some problems with this test.. And it's all that I found out about it.. =( Re: WA [ONU]Denis Shchelkonogov 20 Jul 2010 21:46 I also have WA3, but program solves all my tests. Can anyone suggest some tricky test? Edited by author 20.07.2010 21:55 Edited by author 20.07.2010 21:56 Re: WA mastersobg 18 May 2012 04:27 Accepted. 5 years have passed since my first comment in this thread. Oh... | | TL # 10 | N0D1R | 1450. Russian Pipelines | 17 May 2012 23:11 | 2 | I have a TL#10, I did Dijkstra's algarithm !!! Tel me please better algarithm than Dijkstra. | | what is test case 51 = = | mpoporing | 1893. A380 | 17 May 2012 22:31 | 1 | | | W5 | sdlcj | 1894. Non-Flying Weather | 17 May 2012 17:27 | 1 | W5 sdlcj 17 May 2012 17:27 what's wrong about my code ? Why it is wrong answer on test 5? | | SOS | Eileen Behbood | | 17 May 2012 17:05 | 1 | SOS Eileen Behbood 17 May 2012 17:05 zzz Edited by author 17.05.2012 17:06 Edited by author 17.05.2012 17:06 | | :(((((((((((((((w.a1 why:((((((((((( | +FAMAS+ | 1392. Dreaming of Stars | 17 May 2012 16:19 | 9 | give me wrong test, please {$n+} [be ili ne be] spasibo toliany Edited by author 10.01.2006 02:12 test 2 1 1 1 2 3 3 3 1 Answer 0, 1 You mistake on this line s2:=sqr(r[i]+r[t]); Understand What wrong? But you again got Wa1. :) i find test where you program with strange output 4 1 1 1 1 5 6 3 2 3 4 2 5 1 3 5 2 Answer: "no comments" sqr(r[i]+r[t]) - this ok zamena h:=m[i]; m[i+1]:=m[i]; m[i]:=h; :)) wa52:) Why answer is 0, 1??? Distance between centers of planets is bigger then sum of radiuses! you right ACM.Krupko_Victor[Ivanovo SPU] 15 Jan 2006 02:31 answer 0 1 sqrt(4+4+4)>2+1 tolian lol:) P.S. Tolstobrov Anatoliy[Ivanovo SPU] 15 Jan 2006 04:03 ofCouse Answer is 0 1 I Write When s2:=sqr(r[i]+r[t]); <=Mistake here correct s2:=r[i]+r[t]; <=it correct. At last you have received AC. P.S. My code only 775 bytes.
Re: P.S. Oleg Strekalovsky [Retired] 30 Jul 2009 19:46 And don't use squareRoot. Compute in sqr =) I get WA 1 because I forgot to sort stars in each archipelago when I output stars. =) Edited by author 17.05.2012 16:19 Edited by author 17.05.2012 16:20 | | Memory limit exceeded Test#8 | Andrey | 1303. Minimal Coverage | 16 May 2012 19:15 | 1 | Help!!! import java.util.*; public class Ll { public static class Line implements Comparable{ int a,b; Line(int x, int y){ a = x; b = y; } public int compareTo(Object obj){ Line tmp = (Line)obj; if (this.b>tmp.b) return 1; if (this.b<tmp.b) return -1; return 0; } } public static void main(String args[]){ Scanner stream = new Scanner(System.in); short M = stream.nextShort(); ArrayList<Line> arL = new ArrayList<Line>(); arL.add(new Line(stream.nextInt(), stream.nextInt()) ); while(true){ int a=stream.nextInt(), b=stream.nextInt(); if ((a==0)&&(b==0)) break; if((b>0)&&(a<M)) for (int i=0;i<arL.size();i++){ if ((arL.get(i).a>=a) && (arL.get(i).b<=b)){ arL.set(i,new Line(a,b)) ;} else {if (!((arL.get(i).a<=a) && (arL.get(i).b>=b))) arL.add(new Line(a,b));} break; } } if(arL.size()==0) { System.out.println("No solution"); return; } arL.trimToSize(); Collections.sort(arL); ArrayList<Integer> arV= new ArrayList<Integer>(); int i=arL.size()-1,F =0; while ((i>=0)&&(arL.get(i).b>0)){ if (arL.get(i).a<=F){ F=arL.get(i).b; arV.add(i); i = arL.size(); } if (F>=M){ System.out.println(arV.size()); for (int g= 0;g<arV.size();g++){ System.out.println(arL.get(arV.get(g)).a + " "+ arL.get(arV.get(g)).b); } return; } i--; } System.out.println("No solution"); } } |
|
|