| Show all threads Hide all threads Show all messages Hide all messages |
| I got AC,I want to say something. | Kwc-Oliver | 1004. Sightseeing Trip | 5 Jun 2010 15:32 | 1 |
1,Don't care the K,ignore the K!=2. 2,two-way road. 3,the answer will be too long,so you should use long string. |
| WA1 - is important order path? | Wojciech Wawrzyniak | 1004. Sightseeing Trip | 5 Jun 2010 15:18 | 10 |
I have got many WA but I'don't know why .. I test my program and compare output test with CEOI1999 and have only one difference .. My find sometimes no the same path. not for example 23 54 56 34 but 56 34 23 54 ... this can be reason for WA? I was change my program and i get the same results that OUT in CEIO1999 test any one can help me same advise?. it's important the path.. in this problem you have to output the crossing points of the shortest sightseeing in the order how to pass them. for your example if the route is 23 54 56 34 it's wrong to output 56 34 23 54 because you jump from a crossing point to another even if there is no road between them.. check the output for the CEOI problem with this one and see if there is any difference.. I don't understand. If the input is: --------------------- 3 2 1 2 1 2 3 1 3 2 1 2 1 2 3 1 1 3 1 -1 --------------------- Isn't the output like this? --------------------- No solution. 3 1 2 --------------------- Help, please. Ok but if I have sightseeing :23 54 56 34 this is a cycle right? so 56 34 23 54 is the same cycle but it's only start from another point. I didn't try to sending solution from one month perhaps now i'll find source of problem :) WA1 - is important order path? - NO NO, the first vertex of cycle does not matter. My program prints sample out in such way: 2 5 3 1 And I got AC try to do test use this program: var fout:text; i:integer; begin assign(fout,'test1004.in'); rewrite(fout); writeln(fout,'100 101'); writeln(fout,'1 20 20'); for i:=1 to 99 do writeln(fout,i,' ',i+1,' 1'); writeln(fout,'100 1 1'); writeln(fout,-1) ; close(fout); end. It real help me. Thank you very much!!The answer is too long,I have to use ansistring in pascal. But unfortunately I was wrong agian. My program prints sample out: 3 5 2 1 No solution. And I got WA test 1 Edited by author 06.03.2009 21:37 |
| dont use Java | Rauf Agayev | 1047. Simple Calculations | 5 Jun 2010 01:00 | 2 |
Edited by author 10.06.2010 10:43 Edited by author 10.06.2010 10:43 I did it in java. it works just fine: 2975448 05:24:05 30 Mar 2010 ile 1047 Java Accepted 0.171 6 074 KB |
| It seems that test 51 has garbage after test data | hedrok <ONPU> Odesa | 1509. Domino Recognition | 2 Jun 2010 18:48 | 2 |
I read input using while (scanf("%d", &n) != EOF) { ... } to be able to run multiple tests. I had TLE 51 with such code. But when i deleted this cycle, i got accepted. Please check test 51. Test 51 is correct. You have got TLE 51 because of bug in your code. |
| several tricky cases i failed at | Koala | 1074. Very Short Problem | 2 Jun 2010 13:49 | 3 |
1) the exponent may be very large (absolute value). e.g. -100000000000000000000000000000000000. 2) the exponent may pretend to be very large, but actually not. e.g. 000000000000000000000000000000000010 3) 12.e1 is not a valid floating point number, because the dot cannot be the last character of the integral part according to the grammar mentioned. good luck try also tests such as --1 1 I used conversion String to BigDecimal in Java. But cases 1 and 3 (in Koala's message) should be processed separately. To process very large negative exponent I used the following String res; try { res = bd.toPlainString(); } catch (OutOfMemoryError e) { // gets here if exp < -1000000 res = "0.0"; // no need to keep any digits if exp < -200 } But I don't like it. And maybe it's wrong? Nevertheless I still have WA 12 :))) Edited by author 02.06.2010 13:54 |
| WA # 7 | Nikita Sivukhin`` | 1190. Bar of Chocolate | 2 Jun 2010 11:40 | 2 |
WA # 7 Nikita Sivukhin`` 24 Mar 2010 11:35 This test helped me. 4 Water 1 10 Cocoa-butter 0 Cocoa-powder 1 1 Lecithin 0 Answer is NO. Because there is a maximum of 40 parts of 10000 |
| 0.89s 129kb AC | Radi Muhammad Reza | 1249. Ancient Necropolis | 1 Jun 2010 17:56 | 1 |
|
| No subject | Alexey Dergunov [Samara SAU] | 1197. Lonesome Knight | 1 Jun 2010 15:57 | 1 |
No subject Alexey Dergunov [Samara SAU] 1 Jun 2010 15:57 Edited by author 01.06.2010 16:05 |
| WA 16 | Zefick | 1766. Humpty Dumpty | 1 Jun 2010 12:06 | 1 |
WA 16 Zefick 1 Jun 2010 12:06 I solve the system by the Gauss method, but the 16-th test he passes. Then I tried to take first the Gauss method and the results of the initial matrix method of Seidel (iterative algorithm), but it does not always converge and the result becomes invalid even before the 16-second test. What is there a problem? |
| tle#7 | sbsbsb | 1037. Memory Management | 1 Jun 2010 00:07 | 1 |
tle#7 sbsbsb 1 Jun 2010 00:07 I've tried the heap one, I've done everything I could, but still TLE. I guess there should be some tricky part or my implementation error. what have you guys done to avoid the TLE? I use heap to arrange the time, everytime there is a new timestamp that is different from the last one, I check the heap and delete the out-of-time nodes. I also use a bool array to record the existance of a node, as well as a link table to record the next label that can be used. I don't know why I got TLE all the time... |
| ADMINS!WHY WA#1??? | 123 | 1094. E-screen | 31 May 2010 20:05 | 4 |
#include<stdio.h> #include<iostream> using namespace std; char s[10001],str[80]; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout); #endif int j = 0; memset(s,'\0',sizeof(s)); while(gets(s)) { int len = strlen(s); int i = 0; while(i<len) { if(s[i]=='>') { j++; if(j>79)j=0; } else if(s[i]=='<') { j--; if(j<=0)j=0; } else if(s[i]!='\n' && s[i]!='\0') { str[j] = s[i]; j++; } i++; } memset(s,'\0',sizeof(s)); } for(int i = 0;i<80;i++) printf("%c",str[i]); return 0; } "at the beginning the e-screen contains 80 spaces" I add in begin memset(str,' ',sizeof(80)); I get WA#1 to former =( Thank you!!!You help me!!!I got AC!!!=) |
| Problem 1099 "Work scheduling" has been rejudged | Vladimir Yakovlev (USU) | 1099. Work Scheduling | 31 May 2010 13:39 | 2 |
New tests have been added. 91 authors have lost AC after rejudge. Thanks to Sergey Kopeliovich. |
| simple solution | Rauf Agayev | 1118. Nontrivial Numbers | 30 May 2010 18:52 | 1 |
you should find nearest prime number to J if the number doesnt exist you should find odd number because even number's divisor sum is bigger:) Edited by author 30.05.2010 18:53 Edited by author 30.05.2010 18:53 Edited by author 30.05.2010 18:54 |
| is it correct we get at #5 WA | BRAINIAC++ | 1005. Stone Pile | 30 May 2010 16:24 | 5 |
var a,c,b : array[1..10000]of longint; var n : longint; procedure sort(m,t:longint); var y,i,j,w:longint; begin i:=m;j:=t;y:=a[(m+t)div 2]; repeat while a[i]<y do inc(i); while a[j]>y do dec(j); if i<=j then begin w:=a[i];a[i]:=a[j];a[j]:=w; inc(i);dec(j); end; until i>j; if i<t then sort(i,t); if m<j then sort(m,j); end; PRocedure red; var i,j : longint; begin readln(n); for i:=1 to n do read(a[i]); sort(1,n); end; {=-=================} PRocedure get; var i,sum1,sum2 : longint; begin sum1:=a[n]; sum2:=0; for i:=n-1 downto 1 do begin if sum1>=sum2 then begin sum2:=sum2+a[i]; end else begin sum1:=sum1+a[i]; end; end; writeln(abs(sum1-sum2)); end; {=-=================} BEgin red; get; end. Try brudforce =) It realy works What does brudforce mean,my english is poor Try brudforce =) It realy works Bruteforce REALLY works in 0.14, 130K:)) 2Aybek_TKTL: bruteforce in this case is full search through all possible variants (if u are Russian, then полный перебор). I have WA at #5 test too. |
| TO ADMINISTRATOR!WHAT IS #4 TEST?WHAT IS WRONG IN MY PROGRAM?PLEASE HELP ME | Kod | 1193. Queue at the Exam | 30 May 2010 15:44 | 1 |
import java.util.Scanner; public class Queue { public static void main(String[] args) { Scanner input = new Scanner(System.in); koor A[] = new koor[50]; int i, j, st; int vaxt = 0; int temp, temp1, temp2; int max = 0; int N = input.nextInt(); for (i = 1; i <= N; i++) { A[i] = new koor(); A[i].T1 = input.nextInt(); A[i].T2 = input.nextInt(); A[i].T3 = input.nextInt(); } for (i = 1; i <= N - 1; i++) { for (j = 1; j <= N - 1; j++) { if (A[j].T1 > A[j + 1].T1) { temp = A[j].T1; A[j].T1 = A[j + 1].T1; A[j + 1].T1 = temp; temp1 = A[j].T2; A[j].T2 = A[j + 1].T2; A[j + 1].T2 = temp1; temp2 = A[j].T3; A[j].T3 = A[j + 1].T3; A[j + 1].T3 = temp2; } } }
st = A[1].T1 + A[1].T2; if (st > A[1].T3) { vaxt = st - A[1].T3; } for (i = 2; i <= N; i++) { if (st > A[i].T1) { st += A[i].T2; if (st > A[i].T3) { vaxt = st - A[i].T3; } } else { st = A[i].T1 + A[i].T2; if (st > A[i].T3) { vaxt = st - A[i].T3; } } if (vaxt > max) { max = vaxt; } } System.out.println(max); } } class koor { int T1; int T2; int T3; } Edited by author 30.05.2010 15:45 |
| WA7 | vgu | 1269. Obscene Words Filter | 30 May 2010 14:29 | 1 |
WA7 vgu 30 May 2010 14:29 |
| Test case is not consistent with the problemset | ConanKudo | 1131. Copying | 29 May 2010 02:17 | 2 |
The only input line contains two integers separated with a space: N and K (0 < N ≤ 109, 1 < K ≤ 109). and There's a Test case with K = 1 which made me got 2 wrong answer...So funny |
| 1014 | qu_soltanzadeh | | 28 May 2010 19:56 | 1 |
1014 qu_soltanzadeh 28 May 2010 19:56 could anyone tell me,what is test 1 in 1014 ? |
| Is something wrong with sample #1? Need answer ASAP. | tedomir | 1416. Confidential | 27 May 2010 00:10 | 2 |
4 6 1 2 2 2 3 2 3 4 2 4 1 2 1 3 1 2 4 1 Cost: 4 Cost: 4 1: why not 1>4(cost 2, minimum. Description says if transition between A > B is possible then B > A is possible too) That gives answer: 2 2:1>3(cost 1) then 3>4(cost 2), 1+2=3 That gives answer: 3 Anyone mind explaining why its 4 and 4 in sample? "choose the minimal possible set of trans-planet passages so that he could pass from any planet to any other one via those passages" If you choose 1-3 and 3-4, you can't reach planet 2 from the other planets. |
| Example for 'NO' | crazy_woman | 1135. Recruits | 25 May 2010 22:02 | 2 |
Anybody knows? Edited by author 25.05.2010 20:52 There is no answer like NO; |