| Show all threads Hide all threads Show all messages Hide all messages |
| тест 6 и 17 | Aleksandr Rusakov | 2078. Bowling game | 6 Oct 2024 12:41 | 1 |
подскажите в какие там данные входные |
| Problem statement | Lilian | 1018. Binary Apple Tree | 2 Oct 2024 22:35 | 3 |
If I delete a branch, does it means that I delete also its sub-braches? Yes, you cannot have two or more components |
| Why my code got Wrong Answer on #1? | Loner | 1278. “… Connecting People” | 30 Sep 2024 23:33 | 3 |
#include <cstdio> int ncall; int call[100]; void solve(int K) { if (!K) return; if (K % 2 == 0) { call[ncall] = ++ncall; if (K > 2) solve(K / 2); } else { call[ncall++] = -1; solve(K - 1); } } int main( void ) { // freopen( "p1278.in", "r", stdin ); int K; scanf( "%d", &K ); if (K > 1) solve(K); for (int i = 0; i < ncall; i++) printf( "CALL %d\n", call[i] < 0 ? ncall : call[i] ); printf( "BELL&RET\n" ); return 0; } For test #1, K = 4, and my code output: CALL 1 CALL 2 BELL&RET I think it's correct. |
| WA24 | andreyDagger`~ | 1616. Square Country 4 | 30 Sep 2024 17:42 | 1 |
WA24 andreyDagger`~ 30 Sep 2024 17:42 When finding intersection of segments (a, b) and (c, d) I am finding t1, t2, such that a + (b - a) * t1 = c + (d - a) * t2, -eps <= t1 <= 1+eps, -eps <= t2 <= 1+eps. This code doesn't work for eps=1e-12, but works for eps=0. THIS IS MINDBLOWING |
| WA#3 | Yoshinaz | 1126. Magnetic Storms | 29 Sep 2024 01:21 | 4 |
WA#3 Yoshinaz 16 Oct 2012 14:08 Do you know the test#3? i use heap in this problem but got WA#3. please help. sorry for poor english. thank. i used also heap. Who knows test #3 ???. Help me please!!! try numbers in descending order Re: WA#3 Aadarsh Tyagi 29 Sep 2024 01:21 If you are using heap then use should also use something that will store the count of elements because we also have to remove the previous elements that are not in window of size m |
| HINT | Wonsei | 1654. Cipher Message | 29 Sep 2024 00:19 | 4 |
HINT Wonsei 15 Sep 2020 19:52 Use stacks. Push one letter by letter. If stack.top() == current letter, pop the stack. else push the letter in the stack. Re: HINT Lifeisbeautiful 6 Jan 2021 10:19 Re: HINT Eusebiu_distrugatorul 6 Feb 2021 20:27 Re: HINT Aadarsh Tyagi 29 Sep 2024 00:19 You could also use deque. |
| WA44 | andreyDagger`~ | 1509. Domino Recognition | 28 Sep 2024 02:08 | 1 |
WA44 andreyDagger`~ 28 Sep 2024 02:08 wrong epsilon, precision problems |
| python solution func | #free | 1296. Hyperjump | 24 Sep 2024 07:46 | 1 |
def get_max(arr): res = arr[0] maxEnding = arr[0] for i in range(1, len(arr)): maxEnding = max(maxEnding + arr[i], arr[i]) res = max(res, maxEnding)
return res |
| Some hints for solving the problem WITHOUT GREEDY SEARCH | LeTim | 1589. Sokoban | 22 Sep 2024 21:59 | 1 |
Some hints for solving this problem the way I was able to solve it, without greedy search 1. I used BFS search with heuristic (A* search). As a heuristic, I used the sum of the distances from the boxes to the nearest goals, taking into account that different boxes should be on different goals. It is better to distribute boxes among goals in some greedy way, so as not to spend a lot of time on this. 2. In the board states, DO NOT store the position of the player, store the places he can REACH. This will greatly reduce the number of states needed to be stored. You can store one board state in two 64-bit numbers as bit masks. 3. To find bad positions and stop further search on them, look for simple deadlocks (the box is in a corner and not on a target), dynamic deadlocks (the boxes block each other) and NOT COMPLEX corral deadlocks (the boxes are not on goals and block access to some board area, so they cannot be pushed out of there). 4. If you try to search for too complex corral deadlocks, the time spent on finding them will not be worth it. Try different settings of what difficulty of corral deadlocks to search for and when to stop the search. Store the found configurations of corral deadlocks (and the configurations in which no deadlock was found) in some sets so as not to determine them every time. 5. In addition to the forward search (pushing boxes from the starting positions to the goals), you can also use the backward search (pulling boxes from the goals to the starting positions) to reduce the depth of the search tree. 6. For the forward (backward) search, prevent situations when, for example, there are more (fewer) boxes near the wall than goals. This can greatly speed up the search for some boards. 7. To understand why your algorithm is working too long for a particular board, you can find and output long deadlock branches - a sequence of pushes/pulls in the search tree that starts from one of the board states that is in the found solution and that does not eventually lead to the solution. This way you can find bugs when the algorithm did not find one of the types of deadlocks and did not stop searching on them. Good luck! |
| Пример не поддается никакой логике! И описание задачи! | Альфия | 2001. Mathematicians and Berries | 22 Sep 2024 01:18 | 1 |
если второй пересыпает первому, то у первого должно быть больше, а не наоборот! А если это a1 и b1, соответственно, то это и есть ответ! Потому что a1 и b1 это изначальные мерки, до пересыпаний, в задаче так описано Edited by author 22.09.2024 01:35 Edited by author 22.09.2024 01:36 Edited by author 22.09.2024 01:36 Edited by author 22.09.2024 01:37 |
| Why WA1 | FimoZZZ | 2149. Pigeonhole Principle | 21 Sep 2024 08:15 | 1 |
What could be the reason??? |
| To admins | andreyDagger`~ | 1300. Taxes | 19 Sep 2024 23:51 | 1 |
I think it sholud be said in statement that we do rounding to near number. I spent 20 minutes, understanding why my code doesn't work for sample test, but the mistake was here: floor(100*x)/100, because I thought we should round to bottom |
| Wa at 6 | LuoXi0209 | 1645. Ski Race | 12 Sep 2024 02:03 | 6 |
Wa at 6 LuoXi0209 28 Oct 2008 09:26 Who can help me? thanks. Give me some tests. i found you got AC finally. can you tell me what is the trick, thx. faint , the input is the number of the people who finished the contest. Re: Wa at 6 Olympic Bear (Nikolay Dubchuk) 4 Nov 2008 17:47 Yes, second line contains number of participant. So test example (3 5 1 4 2 6) means that participant #3 finished first, participant #5 finished second and so on. again I couldn't solve this problem because of bad understanding of problem..... I have had the same experience D: LaVuna Edited by author 12.09.2024 02:03 Edited by author 12.09.2024 02:03 |
| директивы не воспринимает компилятор (с++ gcc 13.2 x64) | Dmitry | | 11 Sep 2024 01:36 | 3 |
Здравствуйте! Не воспринимает компилятор директивы #include <iostream> #include <map> #include <vector> #include <algorithm> #include <tuple> #include <string> Ошибка: fatal error: map: No such file or directory 2 | #include <map> | ^~~~~ compilation terminated. ----------------------------------------------- В чём проблема? Hello. It's better to use English at forum) Idk why your code don't work, but with "G++ 13.2 x64" u can use: #include <bits/stdc++.h> It is basically a header file that includes every standard library. If u use it you don't need to include anything else from STL. |
| How to prove? | andreyDagger`~ | 1957. Mundial | 8 Sep 2024 15:03 | 1 |
How to prove that such constraints on bruteforce are working finely? |
| WA 7 | Andre Marin | 1196. History Exam | 8 Sep 2024 03:29 | 1 |
WA 7 Andre Marin 8 Sep 2024 03:29 Edited by author 08.09.2024 07:01 |
| Test on WA14 | Alyoksi | 1964. Chinese Dialects | 8 Sep 2024 02:12 | 1 |
You should check if the answer is >= 0 :) |
| Finally I got AC!!! IF you have problems, read this text (I HAD WA5) | DonNTU Team (Akulshin, Belikov, Trofimenko) | 1033. Labyrinth | 8 Sep 2024 01:27 | 5 |
I had this problems: 3 .## ### ##. answer is 36. If you have any problems write me john_chip<dog>mail.ru You can write russian messages But,it's written in the question,only those wall will be wallpapered which are visible from one end.in you example if we enter from top left...the down right cell is not visible...so ans should be 18....correct me if i am wrong?? I am 10 years late, but I hope you do read this, in the problem it states both the first and last cell are 'entrances', so you can enter via both cells. Cheers! |
| Overrated + Easy BFS | Keworker `~ | 1315. MDPAR and MIIAR | 7 Sep 2024 18:41 | 2 |
|
| wa15 | 👑TIMOFEY👑`~ | 1408. Polynomial Multiplication | 6 Sep 2024 20:44 | 1 |
wa15 👑TIMOFEY👑`~ 6 Sep 2024 20:44 |