| Show all threads Hide all threads Show all messages Hide all messages |
| To admins: New tests | Milanin | 1589. Sokoban | 30 Aug 2026 22:27 | 5 |
Hey admins, I've sent a couple of tests to timus_support@acm.timus.ru that my AC solution was struggling with. Please validate if they can be added to the system. Your tests have been added. Thanks! Milanin, thanks a lot for new tests! Now I've got AC only with neural networks solution. All solutions with just "optimizations"/"bad subfields & patterns", etc. didn't allow me to pass new tests. This is impressive. I still can't believe that there's a problem on Timus that has a meaningful neural network based solution. Finally, 0.343 sec without neural networks. Just correct removing of "bad" fields, effective hash/pq implementations + bit tricks & memory optimizations + A*. |
| test this if you have WA#8 | LIGHT | 1494. Monobilliards | 30 Aug 2026 20:30 | 1 |
try this input 8 2 3 4 1 5 6 7 8 (correct answer for it is "Not a proof") Edited by author 30.08.2026 20:32 |
| WA 8 HEELP | ADSK_Y | 1014. Product of Digits | 29 Aug 2026 22:59 | 1 |
n = int(input()) if n == 0: print(10) exit() if n < 2: print(n) exit() d = [2, 3, 5, 7] i = 0 ans = [] while n > 0 and i < len(d): p = d[i] while n % p == 0: ans.append(p) n //= p i += 1 if n == 1: n2 = ans.count(2) n3 = ans.count(3) n5 = ans.count(5) n7 = ans.count(7) n9 = n3 // 2 n3 -= n9 * 2 n8 = n2 // 3 n2 -= n8 * 3 n4 = n2 // 2 n2 -= n4 * 2 n6 = min(n3, n2) n2 -= n6 n3 -= n6 print('2' * n2 + '3' * n3 + '4' * n4 + '5' * n5 + '6' * n6 + '7' * n7 + '8' * n8 + '9' * n9) exit() print(-1) |
| help | Лукьянчиков Владимир Игоревич | 1527. Bad Roads | 19 Aug 2026 11:30 | 2 |
help Лукьянчиков Владимир Игоревич 2 Nov 2009 19:36 please give any hint how to solve this problem. i now that we should use binary searching of height but how write dijkstra with 2 edge-parameters ? Edited by author 19.08.2026 11:46 |
| What complexity your solution has? | Victor Barinov (TNU) | 1527. Bad Roads | 19 Aug 2026 11:26 | 3 |
Mine is O( log(MaxH) * N^4 ) O(log(maxH)*M*N*log(N^2)) log(maxH) can actually be log(M) because you have only that many different height values |
| A subproblem | Igor Parfenov | 1670. Asterisk | 17 Aug 2026 13:38 | 1 |
In my solution I had to solve following interesting subproblem. Given an array. There is somewhere a unique cutpoint in this array. We don't know where, but we can check, if x is a cutpoint in O(1). We have to find this cutpoint, split array in two parts and do the same recursively on both parts. We need to do it faster than in O(n^2). Solution: For a segment (l, r) check for cutpoints in following order: l, r, l+1, r-1, l+2, r-2, ... |
| What a test 3? | SamGTU7_MASHENTSEVA_ELENA_ALEKSEEVNA | 1884. Way to the University | 13 Aug 2026 12:18 | 3 |
Answer always should be >= 0. Add even more additional checks I guess these should help 1 8 1 1 Answer: 0.00 1 8 1 3 Answer: 0.00 1 8 1 4 Answer: 2.34 1 8 1 15 Answer: 2.34 1 8 1 16 Answer: 0.00 |
| Hint for inc and dec case | 🎧 Vadim Barinov \Frez_Fstilus/'``' :) | 1965. Pear Trees | 12 Aug 2026 16:03 | 1 |
Let's use pref_m[i][x], pref_le[i][x], suff_m[i][x], suff_le[i][x] where: pref_m[i][x] - on [0;i) elements > x are in decreasing order; pref_le[i][x] - on [0;i) elements <= x are in increasing order; suff_m[i][x] - on [i;n) elements > x are in increasing order; suff_le[i][x] - on [i;n) elements <= x are in decreasing order. There is inc-dec-solution if and only if there exists some pos and val such that pref_m[pos][val], pref_le[pos][val], suff_m[pos][val] and suff_le[pos][val] are all true. In order not to get ML you need to remove either positions or values from these arrays. It's your call to chose |
| WA4 | Solver | 1738. Computer Security | 12 Aug 2026 12:17 | 1 |
WA4 Solver 12 Aug 2026 12:17 11 may yield 1 twice via deletion |
| It's very beatyfull problem. Thanks | KostyaRychkov`~ | 2105. Alice and Bob are on Bikes | 10 Aug 2026 11:10 | 2 |
|
| If one of players is waiting, meeting still takes place | bidzilya | 2105. Alice and Bob are on Bikes | 7 Aug 2026 22:15 | 1 |
Test case is mentioned in other topic 10 10 10 10 1 1 0 10 Answer is 10 |
| some tests | __Andrewy__ | 1905. Travel in Time | 5 Aug 2026 10:30 | 3 |
1) 4 4 1 2 9 15 1 4 0 8 2 3 20 30 3 1 31 0 1 4 9 30 -> 4 1 3 4 2 2) 2 3 1 2 0 5 1 1 110 80 1 1 90 0 1 2 100 6 -> 3 2 3 1 3) 3 6 1 2 50 55 2 1 55 40 1 2 0 1 1 3 41 80 3 2 80 12 2 1 15 0 1 2 49 7 -> 6 1 2 4 5 6 3 n= ; k= ; m=n*k <=100000 ------------------------ n m 1 2 1 1 1 2 2 2 ....... 1 2 k k 2 3 1 1 2 3 2 2 ....... 2 3 k k ....... ....... ....... n 1 1 0 n 1 2 1 n 1 3 2 ....... n 1 k k-1 1 1 k 0 --------------------------- for n=3, k=2 Ans. 2 4 6 1 3 5 Thanks, 3rd test helped to find a bug (I didn't register start/end times, so would output just 1 2 4 5) |
| Poor centipede :-D | Brooklyn | 1876. Centipede's Morning | 5 Aug 2026 09:52 | 3 |
One of the cutest problems in its statement :) |
| Understanding the solution | MARAZ MIA | 1876. Centipede's Morning | 5 Aug 2026 09:49 | 4 |
After so many calculation and math I have solved the problem..... Here we can have two worst cases... Case 1: having all the right shoes first.so here needed time is 2*b and we have now all the left shoes remaining...so total time is 2*b+40... Case 2: we may have 39 right shoes so time needed here is (39*2=78)...then we have only one right foot left but we may encounter all the left shoes and here needed time is 40+2*(a-40)....> 40 for the first 40 shoes and 2*(a-40) is for the remaining shoes as they needed to be thrown away...then we have the only one right foot left and it need 1 second... so total time = 78+40+2*(a-40)+1 = 119+2*a-80 = 2*a-39 ans=max(Case 1,Case 2) Edited by author 22.02.2020 03:07 But it's given that both a,b>=40.....so how 39 right shoes can be there? mistake in case 2: 119+2*a-80 = 2*a+39 everything else is correct Edited by author 11.01.2021 22:56 It can be solved with simple DP on number-of-left-picked-slippers x number-of-right-picked-slippers |
| Limitation of 64 Kb to source code size | Oleg Vasilenko (Chelyabinsk) | | 4 Aug 2026 13:27 | 1 |
Please, extend the limit for the size of submitted solution at least to 128 Kb. It is too hard to compress huge difficult solutions in 64 Kb without code obfuscation. There are some problems in this site that can require big source code (not pre-generated array of answers, but really huge algorithmic approach, like Voronoy diagram in 1369 or Sokoban/Ships) |
| WA3 | Solver | 2140. BitMazeCraft | 4 Aug 2026 12:25 | 1 |
WA3 Solver 4 Aug 2026 12:25 Forgot to check that cell above the start is empty when jumping |
| Test 15, something strange | diver_ru (free) | 1341. Device | 4 Aug 2026 11:15 | 4 |
I send program with such procedure: void moveNorth(double dist) { w += dist / rEarth * 180 / pi; if (w > 91.0) n = (n - n) / n; } And got crash 15, but when i send void moveNorth(double dist) { w += dist / rEarth * 180 / pi; } i got accepted. So, i think device can reach north pole with test 15 input data, but it's impossible. In this test the device flies too close to north pole. I got AC instead WA#15 when I changed PI from 3.14159265 to 3.141592653589. And I searched for a numerical mistake for 1 hour :) Ha-ha! Edited by author 03.03.2011 23:16 acos(-1) for the most precise value of PI, but still had WA15 with this code int rlat = (int)round(lat * 180 * 1000 / pi); int rlon = (int)round(lon * 180 * 1000 / pi); while (rlon <= -180 * 1000) rlon += 360 * 1000; while (rlon > 180 * 1000) rlon -= 360 * 1000; printf("%s%d.%.3d\n", rlat < 0 ? "-" : "", abs(rlat) / 1000, abs(rlat) % 1000); printf("%s%d.%.3d\n", rlon < 0 ? "-" : "", abs(rlon) / 1000, abs(rlon) % 1000); Then got AC with this code lat *= 180 / pi; lon *= 180 / pi; while (lon <= -180) lon += 360; while (lon > 180) lon -= 360; printf("%.3lf\n%.3lf\n", lat, lon); So I guess there is something like "-0.000" expected by checker Edited by author 03.08.2026 11:20 P.S: Checked with asserts for "-0.000" and "-180.000" results - it didn't fire. Maybe that stuff with 'round' is wrong way to do it with integers (I actually did that precisely to avoid fiddling with such outputs) |
| whats wrong with test 15? | Alias aka Alexander Prudaev | 1341. Device | 3 Aug 2026 11:21 | 3 |
Test 15 was incorrect, now it is fixed. 5 authors got AC. It is still not precisely correct, see the other thread |
| WA3 | Solver | 1341. Device | 3 Aug 2026 11:06 | 1 |
WA3 Solver 3 Aug 2026 11:06 -0.001 -0.002 0 my integer-based output omitted "-" sign in that case |
| WA #12 | 👨🏻💻 Spatarel Dan Constantin | 1540. Battle for the Ring | 2 Aug 2026 11:50 | 2 |
WA #12 👨🏻💻 Spatarel Dan Constantin 31 Oct 2014 06:15 The following test helped me: Input: 17 84 47 44 99 60 43 14 91 8 39 26 15 41 70 90 41 72 48 20 59 3 68 15 21 78 95 5 22 60 61 88 43 59 84 94 19 26 7 61 85 97 86 51 89 55 40 29 78 39 100 89 41 19 3 62 97 98 18 70 9 79 57 51 37 92 96 55 17 55 67 54 3 52 4 92 59 44 20 36 34 72 24 27 90 79 88 38 28 57 7 36 35 16 38 24 7 34 30 76 88 97 29 90 100 32 33 58 27 5 46 61 76 69 87 65 99 26 3 26 34 61 13 69 76 51 92 83 36 73 10 23 69 38 64 69 21 49 78 100 53 23 12 28 92 50 44 42 27 98 20 60 59 32 28 34 82 71 68 17 96 77 91 64 66 7 84 87 55 62 86 59 84 49 86 27 98 29 69 24 27 88 83 37 19 63 22 53 85 90 21 80 18 64 44 84 70 79 22 76 40 59 34 24 7 71 2 4 51 70 27 29 9 61 65 80 23 87 84 8 28 4 87 45 67 82 80 88 61 53 15 100 11 100 75 69 70 77 24 73 98 50 1 59 63 18 38 85 4 73 92 83 76 31 79 95 64 59 34 24 63 49 76 26 100 2 94 70 30 18 42 80 19 94 38 81 11 27 18 14 99 61 48 26 91 27 72 55 37 6 30 99 6 57 24 5 11 18 26 92 87 19 71 57 13 60 38 23 38 55 89 88 15 36 66 58 62 37 64 98 42 45 97 99 54 72 56 64 41 81 55 27 100 78 36 64 37 73 86 27 79 26 14 45 62 79 54 75 16 17 25 9 62 73 60 67 44 15 30 85 47 36 63 98 13 50 61 2 22 99 28 52 24 93 49 37 72 2 12 39 19 36 99 32 8 10 98 3 24 79 39 23 14 54 20 27 3 81 80 77 79 7 80 2 99 28 39 22 30 2 12 100 89 11 31 48 20 80 50 96 58 41 18 23 94 37 1 48 69 80 76 47 38 56 1 89 83 91 10 12 44 22 11 32 84 93 79 55 24 80 50 81 20 19 4 65 56 56 65 76 36 40 75 73 95 75 61 30 17 23 93 60 44 56 43 79 48 73 33 72 52 35 4 24 53 59 40 60 15 4 36 2 96 10 74 42 36 87 71 4 9 64 15 4 19 57 34 18 29 66 41 32 52 45 55 5 55 47 16 69 50 3 70 97 64 96 39 99 34 9 54 42 24 68 97 94 24 30 12 4 47 4 36 99 48 90 55 55 36 70 75 38 25 45 86 88 92 24 39 25 85 92 18 60 60 66 54 35 47 17 39 93 20 26 43 20 15 49 74 3 71 48 92 95 44 29 82 35 53 20 11 89 12 80 48 23 45 53 57 91 69 47 36 89 72 30 8 39 79 33 93 49 80 36 95 24 64 76 10 68 96 73 56 59 52 56 81 49 8 89 91 29 88 78 17 59 8 76 49 38 8 41 38 39 76 32 62 40 7 24 59 54 96 15 12 47 22 44 47 81 85 38 9 72 15 77 30 22 4 79 11 63 71 48 2 99 79 15 90 38 38 48 43 33 62 7 32 35 50 78 16 86 67 76 57 82 5 39 55 8 17 66 71 39 65 72 37 96 86 26 33 76 74 27 8 87 33 91 74 35 21 89 20 87 16 77 68 20 15 23 28 83 40 50 73 4 73 10 99 58 87 83 85 60 10 93 99 94 35 72 28 55 12 48 42 27 76 61 99 42 35 78 24 74 27 96 30 99 57 80 8 44 15 93 55 24 37 53 17 71 76 97 78 39 96 71 18 71 31 16 12 66 93 87 91 71 34 72 69 91 52 76 86 66 20 40 41 56 45 9 79 72 5 56 11 100 26 80 70 8 47 33 73 39 71 16 9 5 87 29 47 38 56 84 55 76 23 95 31 19 4 61 43 8 68 5 60 93 84 29 Output: G 1 67 Thanks, found a typo (my wrong output was 1 59 here) - scanned from 'zero' instaed of 'first' of a segment. Though I struggled with WA6 on that one. |