| Show all threads Hide all threads Show all messages Hide all messages |
| Statement | -XraY- | 1405. Goat in the Garden 5 | 26 Feb 2026 06:31 | 2 |
What does it mean: "reach smth"? It's a strict condition, but how should i understand it?) In my opinion, this sample has two right answers: 4 0 0 0 1 0 5 0 8 2 * (1.5 * 1.5) * M_PI or (1 + 3 * 3) * M_PI. You have to find the largest possible answer. Thus the correct answer is: (1 * 1 + 3 * 3) * M_PI = 31.4159 |
| WA #12 | 👨🏻💻 Spatarel Dan Constantin | 2204. Friends and Exams | 26 Feb 2026 04:44 | 1 |
WA #12 👨🏻💻 Spatarel Dan Constantin 26 Feb 2026 04:44 input: 2 8 12 28 40 46 48 54 60 80 2 7 9 24 34 49 54 62 66 77 78 79 80 83 84 84 output: 6 |
| WA #39 | 👨🏻💻 Spatarel Dan Constantin | 2217. Binary Sort | 24 Feb 2026 17:27 | 1 |
WA #39 👨🏻💻 Spatarel Dan Constantin 24 Feb 2026 17:27 input #1: 3 110 output #1: YES input #2: 4 1110 output #2: NO |
| No subject | 👨🏻💻 Spatarel Dan Constantin | 2214. Quality Emitter | 24 Feb 2026 17:25 | 1 |
No subject 👨🏻💻 Spatarel Dan Constantin 24 Feb 2026 17:25 Edited by author 24.02.2026 17:26 |
| Is correct second example ?? | coder | 2160. Meta-statement | 24 Feb 2026 03:16 | 2 |
12 12 5 3 11 2 8 4 9 1 6 10 7 answer: 34650 in example output. But, following full check test prints 6300. ----- static bool match(int a[], int n, int b[], int m){ if (n != m) return false; if (n == 0 && m == 0) return true;
int i = std::max_element(a, a + n) - a; int j = std::max_element(b, b + m) - b;
return i == j && match(a, i, b, j) && match(a + i + 1, n - i - 1, b + j + 1, m - j - 1); } int main() { int n = 12; int a[] = { 12, 5, 3, 11, 2, 8, 4, 9, 1, 6, 10, 7 }; int b[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; int ans = 0; do{ if (match(a, n, b, n)) ++ ans;
} while (std::next_permutation(b, b + 12) );
printf("ans = %d\n", ans); return 0; }
The second example is correct. In your code, you should replace std::max_element with std::min_element to get the correct answer. |
| Is there any solution aside from DP? | Aleksander | 2173. Meta-statement 3 | 24 Feb 2026 02:55 | 3 |
I solved it using pretty straigtforward DP O(n * m^2), obviously it's just a complexity without any additional factors but it doesn't seem to be fitting time limit. Somehow it did. But I wonder, is there any more intricate idea for a faster solution? pretty straigtforward DP O(n * m^2) it doesn't seem to be fitting time limit Most likely, your solution is actually O(N*M), because the statement says "It is guaranteed that the total number of wishes does not exceed 2 · M." I believe the time complexity is actually O(M*(N+M)). |
| WA 17 | ~'Yamca`~ | 2203. Favorite Sandwiches | 24 Feb 2026 02:07 | 1 |
WA 17 ~'Yamca`~ 24 Feb 2026 02:07 try this test: 1 1 3 100 3000 ans: 1000 |
| 1001 | bini7yam | 1001. Reverse Root | 24 Feb 2026 00:58 | 3 |
1001 bini7yam 24 Dec 2025 11:34 how to know when there are no more inputs Just use a while loop like this: while( cin >> a ) and then push_back it in a vector and output the solution. while (scanf("%lf", &stack[++top]) != EOF); or while ((tmp = getchar()) != EOF) |
| WA-26 | Dmitrieva Viktoria | 1919. Titan Ruins: Transformation of Cylinders | 23 Feb 2026 21:33 | 1 |
WA-26 Dmitrieva Viktoria 23 Feb 2026 21:33 Что за 26 тест? Никак не могу его победить |
| why wa#17? | kurinov649 | 1348. Goat in the Garden 2 | 22 Feb 2026 20:28 | 2 |
why wa#17? help pls Edited by author 23.11.2018 08:05 0 0 0 0 5 0 10 if the length of the segment AB is 0 or point A= point B, then your solution fails. |
| Problem 1589. Sokoban rejudged | Vladimir Yakovlev (USU) | 1589. Sokoban | 22 Feb 2026 18:34 | 1 |
New tests have been added. All accepted solutions have been rejudged. 15 out of 20 authors lost the Solved status for this problem. |
| To admins: New tests | Milanin | 1589. Sokoban | 22 Feb 2026 18:33 | 2 |
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! |
| Why this code in python 3 is not woking here though it is working in Jupyter Notebook ? | Prayanshu Singh | 1002. Phone Numbers | 21 Feb 2026 12:27 | 2 |
def word_to_num(word): d= {'a':'2','b':'2','c':'2','d':'3','e':'3','f':'3','g':'4','h':'4','i':'1','j':'1','k':'5','l':'5','m':'6','n':'6','o':'0','p':'7','q':'0','r':'7','s':'7','t':'8','u':'8','v':'8','w':'9','x':'9','y':'9','z':'0'} s='' for i in word: s+=d[i] return s from itertools import permutations while True: num_dict={} num_list=[] word_list=[] num = input() if num=='-1': break loop_len = int(input()) for i in range(loop_len): word_list.append(input()) for item in word_list: num_dict[word_to_num(item)]=item num_list.append(word_to_num(item)) perm = permutations(num_list,2) x=0 for k,v in list(perm): if k+v==num: print(num_dict[k]+' '+num_dict[v]) else: x += 1
if x==loop_len*(loop_len-1): print('No solution')
|
| Стал третьим человеком кто сдал все задачи на тимус | kostan3 | | 21 Feb 2026 02:16 | 2 |
Как же быстро это сообщение состарилось |
| Is there any easier solution? | Mickkie | 2055. Urban Geography | 20 Feb 2026 18:36 | 4 |
One way I can think of is to sort edge by cost and use dynamic connectivity But it's very hard to implement :( What's the better solution? divide and conquer is ok. but i can't understand now .And i get T with dynamic connectivity. One way I can think of is to sort edge by cost and use dynamic connectivity But it's very hard to implement :( What's the better solution? Lucky one, I have TL with this method. |
| What is the complexity of the algorithm? | ilya trofimov | 2199. Company Question | 19 Feb 2026 19:24 | 1 |
O(n*sqrt(n)*log(n)) enough? Upd: OK with this complexity. But 2.7 c++. How to solve with 0.1 second? Edited by author 21.02.2026 00:26 |
| Test Miners | Milanin | 1589. Sokoban | 28 Jan 2026 09:30 | 2 |
Finding out a testcase to improve algorithm does not mean that all submissions use information about tests. I have many submissions that AC, but the code is not based on specific test cases. At least adding strong test and rejudge is OK, removing totally - no. Edited by author 28.01.2026 09:30 |
| Can you give me some "extra" test or smth like that... My prog passed all my tests but i get wa#3... | Zerolog1c [LNU] | 1028. Stars | 27 Jan 2026 23:03 | 4 |
Can you give me some "extra" test or smth like that... My prog passed all my tests but i get wa#3... Thnx! he he... finaly i passed this test you should be carefull with 32000 its better to use 32002 :) Good Luck! thaa..........anks a lo..........ot! |
| WA 27 | kostan3 | 1952. To Kill the Dragon | 26 Jan 2026 22:49 | 1 |
WA 27 kostan3 26 Jan 2026 22:49 Accepted:) Edited by author 18.02.2026 21:32 |
| overrated | 👑TIMOFEY👑 | 2021. Scarily interesting! | 22 Jan 2026 17:06 | 4 |
|