| Show all threads Hide all threads Show all messages Hide all messages |
| WA #14 | Petru Trimbitas | 1143. Electric Path | 23 Sep 2011 22:26 | 1 |
WA #14 Petru Trimbitas 23 Sep 2011 22:26 Can someone give me some tests? I have a greedy solution. |
| Is the sample output correted now??? | FireBirds | 1659. Regular Triangles | 23 Sep 2011 21:31 | 3 |
Of course, the sample output isn't correct because there is a hint at the bottom of the problem description: "The sample output isn't correct" :) input 0 30 -25.9807621135 -15 25.9807621135 -15 output -8.2902573694809689e-012 -4.7855053253442748e-012 8.0829037686437069 13.999999999999361 16.165807537287968 -3.1885605267234496e-013 -1.6580514738954005e-011 -29.999999999980858 -25.980762113541445 15.000000000004786 25.980762113533153 15.000000000019146 input 0 0 5 8.6602540378443864676372317075294 10 0 output 5 2.8867513459481291 3.9106836025229588 0.99999999999999989 6.0893163974770417 0.99999999999999989 10 5.7735026918962582 0 5.7735026918962582 5 -2.8867513459481291 |
| Rules for competitions | the_swede | | 23 Sep 2011 18:55 | 1 |
Hi, I looked through the archive of old online contests here at Timus and got intrested in how the scores are calculated. Any one who can give me a pointer to information on this? Would be nice to know how the competitions are set up also (how long are they open etc). /Robert |
| Need help with test #10. WA10 | FreezingCool | 1841. Cableways | 23 Sep 2011 18:18 | 6 |
Can anyone that had problem with test #10 help me pass it? I've been trying for a few hours and I can't find where am I mistaken. I had WA# 10 too, because I chose my constant INFINITY as 10^15. But the answer may be up to 2*10^17, for example, in the test 100000 1000000 -1000000 1000000 ... -1000000 1000000 1000000 0 1000000 0 ... 1000000 0 After changing INFINITY to 10^18 I got AC :) So, maybe, you have the same mistake. Check it. Edited by author 19.09.2011 21:35 Yeah, that was the problem for test #10. Now having WA#13. I think I am going to retype the whole program again and use all long long since I think the problem is with some long long calculations. Thanks Try something like this: 3 0 3 0 3 1 1 2 1 1 1 1 1 1 0 Answer is 7. My program answers 7 for that case, too. I don't know where the bug was, but I got AC by typing the whole code again. Probably have put int somewhere instead of long long. |
| WA test 1 | Jumabek_Alihonov | 1712. Cipher Grille | 23 Sep 2011 18:08 | 1 |
my solution #include<string> #include<iostream> using namespace std; int main() {char a[4][4],c[4][4]; int b[4][4],i,j,t; for(i=1;i<=4;i++) for(j=1;j<=4;j++) cin>>c[i][j]; for(i=1;i<=4;i++) for(j=1;j<=4;j++) cin>>a[i][j]; cout<<endl; //1 qator for(i=1;i<=4;i++) for(j=1;j<=4;j++) if(c[i][j]=='X') cout<<a[i][j]; //2-qator for(i=1;i<=4;i++) for(j=1;j<=4;j++) if(c[i][j]=='X') c[j][5-i]='1';
for(i=1;i<=4;i++) for(j=1;j<=4;j++) if(c[i][j]=='1') cout<<a[i][j]; //3-qator for(i=1;i<=4;i++) for(j=1;j<=4;j++) if(c[i][j]=='1') c[j][5-i]='2'; for(i=1;i<=4;i++) for(j=1;j<=4;j++) if(c[i][j]=='2') cout<<a[i][j]; for(i=1;i<=4;i++) for(j=1;j<=4;j++) if(c[i][j]=='2') c[j][5-i]='3'; for(i=1;i<=4;i++) for(j=1;j<=4;j++) if(c[i][j]=='3') cout<<a[i][j]; } |
| The description is incomplete: When n is uneven and the middle person is last to arrive. | Nic Roets | 1725. Sold Out! | 23 Sep 2011 11:55 | 2 |
Suppose * n in uneven, * the first (n-1)/2 seats and the last (n-1)/2 seat has the same number of people already sitting and * the person sitting in seat (n+1)/2 arrives. The description does not say if he will choose left or right. I got AC by assuming he will not choose the same side as Vasya. 1 ≤ k ≤ n ≤ 50; n is even |
| What in #19 | aranax | 1644. A Whole Lot of Walnuts | 23 Sep 2011 11:49 | 1 |
Edited by author 23.09.2011 20:23 |
| In case of WA#7 | daftcoder [Yaroslavl SU] | 1208. Legendary Teams Contest | 23 Sep 2011 01:17 | 2 |
Notice that there are 18*3=54 participants, 64bit-type should be used for masks. It's possible to solve that problem with only 32-bit masks. Encode team number k as 2^k (in c "1 << k", in pascal "1 shl k"). Create an array (I named it "check"): forall (i) { check[i] = 0; forall (j, not equal i) { if (there is a member in team j that exists also in team i) then check[i] = check[i] bitwise or (2 ^ j); } } You can encode every possible teams combination in one number from interval [0 .. (2^k) - 1]. Note that the number is less than 2 ^ 18 (or 262144). Then enumerate all numbers from that interval and for every number S for every bit p in position q in number S check inequality "S & check[q] > 0". If for some p in position q in number S this inequality is true, than state S is inacceptable. Edited by author 23.09.2011 01:18 |
| WA #5 | Astekinane | 1193. Queue at the Exam | 23 Sep 2011 01:06 | 1 |
WA #5 Astekinane 23 Sep 2011 01:06 Test my code, please. #include <iostream> #include <string> #include <vector> #include <queue> using namespace std; int N; bool proverka(vector <int> &used, queue <int> &Q){ if (!Q.empty()) return true; for (int i=0;i<N;i++) if (!used[i]) return true; return false; } int main(){ cin>>N; vector <int> T1(N); vector <int> T2(N); vector <int> T3(N); for (int i=0;i<N;i++) cin>>T1[i]>>T2[i]>>T3[i]; vector <int> used(N,0); queue <int> Q; int res=0; int tres=0; for (int m=0;m<4*N;m++){ int t=-1; for (int i=0;i<N;i++) if (!used[i] && (t==-1 || T1[i]<T1[t])) t=i;
//cout<<t+1<<": "<<T1[t]<<" "<<T2[t]<<" "<<T3[t]<<" "<<Q.front()<<endl; if (Q.empty() && t==-1) continue;
if (Q.empty()){ res+=T1[t]; used[t]=1; Q.push(t); for (int i=0;i<N;i++) if(!used[i]){ T1[i]-=T1[t]; if (T1[i]<=0){ Q.push(i); used[i]=1; } } continue; }
if (t==-1){ res+=T2[Q.front()]; tres=max(tres,(res-T3[Q.front()]<0 ? 0 : res-T3[Q.front()])); Q.pop(); continue; }
if (T1[t]<T2[Q.front()]){ res+=T1[t]; used[t]=1; Q.push(t); for (int i=0;i<N;i++) if(!used[i]){ T1[i]-=T1[t]; if (T1[i]<=0){ Q.push(i); used[1]=1; } } T2[Q.front()]-=T1[t]; if (T2[Q.front()]<=0) Q.pop(); continue; }
if (T1[t]>T2[Q.front()]){ res+=T2[Q.front()]; tres=max(tres,(res-T3[Q.front()]<0 ? 0 : res-T3[Q.front()])); for (int i=0;i<N;i++) if (!used[i]){ T1[i]-=T2[Q.front()]; if (T1[i]<=0){ Q.push(i); used[1]=1; } } Q.pop(); continue; }
}
cout<<tres<<endl; return 0; } |
| Reason of WA #10 | Aram Taranyan (YSU) | 1688. Team.GOV! | 23 Sep 2011 00:00 | 2 |
To pass this test you should use int64 or long long.Good luck! I think you should use the test like 1000 5 1000 1000 1000 1000 1000 (answer 4) to pass it |
| Good problem! | bsu.mmf.team | 1845. Integer-valued Complex Determinant | 22 Sep 2011 20:51 | 1 |
I've really learned much more about Gauss integers while solving this problem. I didn't even suspect that most of algebraic theorems and definitions also take place in complex algebra (I mean Gauss integers, of course). Great thanks to authors for creating that. For anyway, this test helped me to pass WA#21: 3 2 1 3 5 0 0 4 0 5 0 6 0 0 1 -5 -1 8 12 0 9 One of possible answers is -1 -3
|
| WA#7 | Oyster | 1822. Hugo II's War | 22 Sep 2011 20:41 | 2 |
WA#7 Oyster 20 Sep 2011 01:01 I keep getting WA for test #7, any tips? Sorry, my fault - I was handling input data incorrectly, hoping on certain nodes order. Got AC after fix :) Edited by author 27.09.2011 20:37 Edited by author 27.09.2011 20:38 |
| To Author: I got AC, But my solution doesn't work correctly for m=1 !! | Moein Fatehi | 1224. Spiral | 22 Sep 2011 20:09 | 2 |
when m=1, the answer must be 0, but my AC submission's answer is 1!! Edited by author 22.09.2011 18:12 You are wrong. Answer for m = 1, n > 1 is 1. The robot makes turn in the first cell. |
| Where wrong??H..E..L..P (pascal) | xuanzebin | 1723. Sandro's Book | 22 Sep 2011 18:48 | 3 |
program sdf; var i,j,k,l,n,m,max:longint; a:array[1..58]of longint; str,str1:ansistring; begin //while not eof do begin readln(str); for i:=1 to length(str) do inc(a[ord(str[i])-64]); max:=0; for i:=1 to 58 do if max<a[i] then max:=a[i]; for i:=1 to length(str) do if a[ord(str[i])-64]=max then begin write(str[i]); a[ord(str[i])-64]:=-1; end; writeln; //end; end. May be all elements of array a should be equals by zero? Edited by author 22.09.2011 18:26 Edited by author 22.09.2011 18:27 test for you: "tebidoghtebidoh" |
| In test #13 more than two point belong to same line | maxx | 1207. Median on the Plane | 22 Sep 2011 17:54 | 2 |
It's 1-st point and two others. thank you! I choose 1st point and another point: Part of my code: //........ if ( A*p[j].x + B*p[j].y >= C ) ++up;//if use A*p[j].x + B*p[j].y > C => WA13 else if( A*p[j].x + B*p[j].y < C ) ++down; //........ if(up==down){ printf( "1 %hd\n", ++i ); return 0; } |
| What is wrong? A programm give a right result, but no AC. Why? | Whiteha | 1083. Factorials!!! | 22 Sep 2011 14:39 | 1 |
Edited by author 22.09.2011 15:24 |
| My Sample's Output is 114 but I have WA in 1st test case! | Moein Fatehi | 1567. SMS-spam | 22 Sep 2011 13:33 | 1 |
|
| My Sample's Output is 114 but I have WA in 1st test case! | Moein Fatehi | 1567. SMS-spam | 22 Sep 2011 13:33 | 1 |
|
| WA #6, test ??? | cs_Diablo | 1355. Bald Spot Revisited | 22 Sep 2011 13:12 | 1 |
|
| 1769. Старая уральская легенда | kiol | | 22 Sep 2011 02:28 | 1 |
Not clearly... The Data goes in the char arr[] without " "? 121314162023242625? Two sign numbers? Early thank you very much! |