| Show all threads Hide all threads Show all messages Hide all messages |
| WA #10 | 👨🏻💻 Spatarel Dan Constantin | 1089. Verification with the Dictionary | 9 Apr 2026 16:32 | 1 |
WA #10 👨🏻💻 Spatarel Dan Constantin 9 Apr 2026 16:32 The text may start with some white spaces. |
| This question looks easy. but i got WA, Help! | abc | 1062. Triathlon | 9 Apr 2026 16:11 | 4 |
My algo is as follows: 1.for any contestant i: 2. if(there is a contestant j whose three speeds all equal to i ) 3. then i and j are both sure losers; 4. else if(the three speeds of j are no less than i) 5. then i is a sure loser; 6. else if(the three speeds of j are no more than i) 7. then j is a sure loser; 8.for any contestant i: 9. if(i is a sure loser) writeln(No); 10. else writeln(Yes); > My algo is as follows: > 1.for any contestant i: > 2. if(there is a contestant j whose three speeds all equal to i ) > 3. then i and j are both sure losers; > 4. else if(the three speeds of j are no less than i) > 5. then i is a sure loser; > 6. else if(the three speeds of j are no more than i) > 7. then j is a sure loser; > 8.for any contestant i: > 9. if(i is a sure loser) writeln(No); > 10. else writeln(Yes); > 4 10000 10000 1 10000 1 10000 1 10000 10000 2 2 2 the fourth contestant is not a "sure loser" but always lose... The correct answer to this test is: Yes Yes Yes No |
| Can you tell my the answer for this test and why? | Alexandru Tandrau | 1062. Triathlon | 9 Apr 2026 16:09 | 2 |
3 10 10 10 6 100 17 100 6 17 The correct answer is: No Yes Yes |
| What is the answer for this Test ? can anyone give me a help? | Nguyễn Cảnh Toàn | 1062. Triathlon | 9 Apr 2026 16:04 | 2 |
2 1 2 3 1 2 3 Edited by author 23.01.2010 12:58 No No Because they are tied regardless of what the judge chooses. |
| WA #12 | Budau Adrian | 1062. Triathlon | 9 Apr 2026 16:03 | 2 |
WA #12 Budau Adrian 15 Apr 2011 01:15 Can someone who has had problems on this test put a tes the used to figure the problem? Thank you very much Later Edit: This tests helped me: 4 1 1 1 3 1 2 4 1 2 5 2 1 and 3 1 1 1 2 2 2 3 2 2 Edited by author 15.04.2011 02:21 Re: WA #12 👨🏻💻 Spatarel Dan Constantin 9 Apr 2026 16:03 The correct answers are: No No Yes Yes and No No Yes |
| To admins: please could you add such test case | Slusarenko Alexey | 1062. Triathlon | 9 Apr 2026 16:01 | 6 |
My solution (as well as solutions of some other authors) got AC, but gives incorrect answer for such test case: 3 9999 9999 1 10000 9998 10000 9998 10000 10000 The correct answer is: Yes Yes Yes Please add it to system tests. Edited by author 04.05.2009 00:44 Really, i've got AC with incorrect answer for this test. I used too small infinity (1e10). My solution (as well as solutions of some other authors) got AC, but gives incorrect answer for such test case: 3 9999 9999 1 10000 9998 10000 9998 10000 10000 The correct answer is: Yes Yes Yes Please add it to system tests. Edited by author 04.05.2009 00:44 this test is incorrect ! 9999a + 9999b + 1c > 10000a + 9998b + 10000c 9999a + 9999b + 1c > 9998a + 10000b + 10000c => 19998a+19998b+2c > 19998a+19998b+ 20000c => 2c > 20000c !!!! that why the answer is: No Yes Yes a/9999 + b/9999 + c/1 < a/10000 + b/9998 + c/10000 a/9999 + b/9999 + c/1 < a/9998 + b/10000 + c/10000 a = 9999^4 b = 9999^4 c = 1e-100 I agree with Valentin. We may also choose such a, b and c: a = 9999 b = 9999 c = 1e-9 We get: a/9999 + b/9999 + c/1 = 2 + 1e-9 a/10000 + b/9998 + c/10000 = a/10000 + b/9998 + c/10000 = = 2 * 9999 * 9999 / (9999 * 9999 - 1) + 1e-15 > > 2 + 2 / 9999 * 9999 > 2 + 2e-8 > 2 + 1e-9 So the first contestant can win. The correct answer is: Yes Yes Yes |
| WA 25 | 👨🏻💻 Spatarel Dan Constantin | 1062. Triathlon | 9 Apr 2026 15:56 | 1 |
WA 25 👨🏻💻 Spatarel Dan Constantin 9 Apr 2026 15:56 I was getting WA 25 and was failing this test (from the forum): Input: 3 9999 9999 1 10000 9998 10000 9998 10000 10000 Output: Yes Yes Yes I was using Epsion 1e-6 and got WA #25. After changing Epsilon to 1e-9 I got AC. |
| Some tests | Otrebus | 1894. Non-Flying Weather | 6 Apr 2026 02:06 | 2 |
3 4 0 2000 1000 3000 0 3000 0 0 3000 0 3000 3000 0 3000 ans: 647.1067811865
5 6 0 2000 500 2500 1000 3000 1500 3000 0 3000 0 0 1500 0 3000 0 1500 0 3000 3000 0 3000 ans: 647.1067811865 3 4 0 0 4000 0 2000 4000 0 0 4000 0 4000 4000 0 4000 ans: 3517.7087639997 4 4 0 0 3000 0 3000 3000 0 3000 2000 2000 5000 2000 5000 5000 2000 5000 ans: 940 4 4 0 0 3000 0 3000 3000 0 3000 1000 1000 -2000 1000 -2000 -2000 1000 -2000 ans: 940 4 3 0 0 30000 0 30000 30000 0 30000 10000 40000 40000 10000 40000 40000 ans: 7011.0678118655 4 4 0 0 3000 0 3000 3000 0 3000 -1000 1000 5000 1000 5000 2000 -1000 2000 ans: 1940 4 4 0 0 3000 0 3000 3000 0 3000 -1000 2000 1000 -1000 2000 -1000 -1000 2000 ans: 647.1067811865 3 3 0 0 4000 2000 0 4000 3000 2000 7000 0 7000 4000 ans: 387.2135955000 Also, WA6 = integer overflow The second and eighth tests are invalid. The second test contains a concave polygone. The eighth test contains a repeating vertex. The second test fixed: 3 4 0 2000 1000 3000 0 3000 0 0 3000 0 3000 3000 0 3000 ans: 647.1067811865 The eighth test fixed: 4 3 0 0 3000 0 3000 3000 0 3000 -1000 2000 1000 -1000 2000 -1000 ans: 647.1067811865 |
| To admins | 👨🏻💻 Spatarel Dan Constantin | 1983. Nectar Gathering | 5 Apr 2026 15:01 | 1 |
To admins 👨🏻💻 Spatarel Dan Constantin 5 Apr 2026 15:01 I believe there might be some precision issues with the tests. Here is why: My AC solution (ID = 11182582) has a parameter STEPS set to 1000. As I set it higher, the accuracy increases. On this input: 54 46 -161 -82 -150 -33 100 127 -175 My AC program gets: 48.217529 But when I set STEPS to 10000, the improved AC program gets: 38.806852 In addition, I have another program (ID 11182578 - WA #22) outputting: 37.855475851615 I believe test #22 is wrong (as well as my AC solution) while my WA #22 solution is in fact correct. To strenghten that conviction, when I set STEPS to 30000, the improved AC program gets: 38.191302 Thus, the two answers are within a relative error of less than 10^-2. Please look into this issue. Thank you! |
| If you wa on test#12 , try this data | Eazy jobb | 1297. Palindrome | 5 Apr 2026 05:42 | 6 |
input : ABCDLKOIKJTFIDCBA ouput is a single letter such as A K and I NOT “ABCD” or what have you . Why is the answer not "ABCD" in this case? YES, why is not ABCD input : ABCDLKOIKJTFIDCBA oh...I see.. Edited by author 17.06.2016 15:54 I think ,cause we need to find a substring,not a subsequence Guys my code returns "A" for that test case, but still WA 12. Any ideas? Edited by author 05.04.2026 05:33 Nvm. Another useful tc could be: "Kbzbkaba". If your sol outputs "aba" it's wrong, it should be "bzb". |
| WA #10 | 👨🏻💻 Spatarel Dan Constantin | 1703. Robotic Arm | 4 Apr 2026 23:48 | 1 |
WA #10 👨🏻💻 Spatarel Dan Constantin 4 Apr 2026 23:48 I passed WA #10 by printing 90 decimals and using custom decimal computations accurate up to 45 digits. |
| WA4 | Kelemvora | 1703. Robotic Arm | 3 Apr 2026 17:50 | 3 |
WA4 Kelemvora 31 Oct 2018 04:57 Re: WA4 Andrey_Vorobey 19 Nov 2025 14:03 idk i just love chiken wings so much Edited by author 19.11.2025 14:03 Re: WA4 👨🏻💻 Spatarel Dan Constantin 3 Apr 2026 17:50 I passed WA #4 by printing 15 decimals instead of 6; I got WA #10. |
| WA #45 | 👨🏻💻 Spatarel Dan Constantin | 1883. Ent's Birthday | 3 Apr 2026 02:05 | 1 |
WA #45 👨🏻💻 Spatarel Dan Constantin 3 Apr 2026 02:05 This test was failing on my solution. Other similar (symetric) tests could fail other similar (symetric) solutions. Input: 2 1 -999999999 0 -999999999 1 |
| Test #2 | Vitaliy Karelin | 1836. Babel Fish | 3 Apr 2026 00:40 | 12 |
Test #2 Vitaliy Karelin 30 Apr 2011 15:52 What's wrong with this test? i have the same question. what's the catch? and what's with the "ambiguous" case? how can it be ambiguous? When tank angled too much, one or more of sensors will show 0. If 3 or 2 neighboring sensors shows 0, then you cant determine the angle, but at whole data is not erroneous, so you shall output "ambiguous" for exampe 10 0 1 1 0 - ambiguous 10 0 1 0 1 - error 10 0 0 0 0 - 0.0 10 0 1 3 1 - 104.166667 (not error!) 10 0 1 3 2 - 150.0 10 0 1 5 3 - 202.083333 10 0 1 3 5 - error Edited by author 01.05.2011 03:36 OMG, my program passed all these tests, but still WA#2. Do you have any other tricky tests? I don't know ;) naive o^2 * (h1 + h2 + h3 + h4) / 4 will pass test #2 (with checking erroneous data preliminarily of course) and will WA only at #3 try swap data, like this: 10 0 1 3 2 10 2 0 1 3 10 3 2 0 1 10 1 3 2 0 etc. Edited by author 01.05.2011 02:41 Of course, I considered this case. Now I have WA#4. This test helped me a little: 1000000 1000000 1000000 1000000 1000000 -> 1000000000000000000.000 I guess, there are exists such tests, where, while calculating the volume, the itermediate calculations exceed 2^64. The reason of WA seems to be this. P.S. Don't like Java :) bsu.mmf.team, did you find the mistake? What is it? Edited by author 05.05.2011 16:26 I've used extended (in Pascal) to perform all calculations. But I think precision of double also enough to perform it, because required "relative error of at most 10^6". I hope you're not using integers of any size to perform real-number calculations? ;) --- I've just sent my solution replacing extended to double - it still have AC. But when I replaced it again to single (Pascal) - I got WA #4. So, if you using float (in Java) you have to replace it with double Edited by author 05.05.2011 18:40 Yes, I found my mistake. I got AC after I changed my function, which checks if 4 points lie on the same plane. I rewrote it using only integer calculations. what the wrong with test case 2 ,passing all of the forum :(.help pls..!! Friend! Your swapping-advice very right but very very dangerous! My ideal AC program had 12 lost submissions due bad swapping. Example: 0 1 3 2 -> 3 1 0 2- good. 1 0 3 2 -> 1 3 0 2 - bad! But double swapping swap(y2,y3),swap(y1,y4) 1 0 3 2 ->2 3 0 1 - right again! P.S. Why 1 0 3 2 -> 1 3 0 2 - bad? In 1,0,3,2 we have ciclic 3>2>1>0 but in 1,3,0,2 this invariant killed ,nature of data changed. Edited by author 25.10.2011 11:07 Re: Test #2 👨🏻💻 Spatarel Dan Constantin 3 Apr 2026 00:40 This is what helped me pass WA #2: Input: 1 10 0 1 4 1 Output: 114.814815 |
| The O(1) solution | Smbat Voskanyan | 1319. Hotel | 1 Apr 2026 00:44 | 1 |
Before you look at the solution I have to clear up some confusion. If we are talking about the lowest bound it takes for the program to complete, then it is O(N^2), because you have to evaluate each table cell no matter what and print the value. This is also considering that by N we denote the side of the table. On the other hand, the function that takes in i and j and spits out the correct number in O(1) **is possible** without any lookup, which can be also be parallelized and be ported as fragment shader. You can see it below, it's the `eval` function and all calls are independent of their neighbors. The core challenge is to figure out how to calculate which diagonal are you on -- I call it level -- and what is your local index on that diagonal line. For example, for N=3, we have: 4 2 1 7 5 3 9 8 6 where, "1" is on the first level, "2,3" are on the second level, "4,5,6" are on the third level and so on. Furthermore, 6 is the third number on that line. ```cpp #include <stdio.h> int abs( int x ) { return x >= 0 ? x : -x; } int sum( int n ) { return ( n + 1 ) * n / 2; } static int n; static int totalLevels; static int topRight[2]; int eval(int i, int j) { const int level = abs( topRight[ 0 ] - i ) + abs( topRight[ 1 ] - j ); if( level < n ) { const int origin = n - 1 - level; const int index = i - origin; return 1 + sum( level ) + index; } else { const int index = i; return 1 + n * n - sum( totalLevels - level ) + index; } } int main() { scanf("%d", &n); totalLevels = n * 2 - 1; topRight[0] = n - 1; topRight[1] = 0; for( int j = 0; j < n; ++j ) { for( int i = 0; i < n; ++i ) printf("%d ", eval( i,j )); printf("\n"); } return 0; } ``` |
| WA 17 | ~'Yamca`~ | 2203. Favorite Sandwiches | 31 Mar 2026 22:55 | 2 |
WA 17 ~'Yamca`~ 24 Feb 2026 02:07 try this test: 1 1 3 100 3000 ans: 1000 For this test, the correct answer is: 1020 |
| idea | svr | 1659. Regular Triangles | 31 Mar 2026 22:45 | 2 |
idea svr 3 Nov 2008 21:39 take sample output and map it affinly to data triangle and you will have AC |
| Overrated | Bot_14`~ | 1641. Duties | 24 Mar 2026 20:04 | 1 |
Edited by author 24.03.2026 20:05 |
| Help with WA 4 pls | Dmitriy | 1380. Ostap's Chess | 20 Mar 2026 15:52 | 3 |
Please tell me this test and tell me if the three-time repetition of the position by the king is taken into account (in chess, in this situation there is a draw) Three-time repetition or the fifty-move rule are not considered in this problem (or at least I didn't implement them and got AC). I was getting WA #4 because I printed the board and stopped processing the moves after a "Check" message. After fixing this issue I got AC. |
| WA3 | Yuri K | 1700. Awakening | 20 Mar 2026 00:01 | 1 |
WA3 Yuri K 20 Mar 2026 00:01 I use 'set' in python. Very simple. But I have WA3. Don't know why. Please help. |