Show all threads Hide all threads Show all messages Hide all messages |
solved | Jakub Minarik | 1000. A+B Problem | 28 Mar 2024 16:13 | 1 |
solved Jakub Minarik 28 Mar 2024 16:13 already done. for someone who doesn't know how to do it: a,b = input().split() print(int(a)+int(b)) a = int(1) b = int(5) Edited by author 28.03.2024 16:23 |
Is the segment close or open? | Ade [FDU] | 1469. No Smoking! | 28 Mar 2024 08:06 | 2 |
What the output of? 2 0 0 1 1 1 1 2 2 |
WA in 11 test help please | Nabi | 1469. No Smoking! | 28 Mar 2024 08:03 | 2 |
i used redblack tree on python and using a quick input using stdin i passed test 8 time limit and met evening at 11 ok, it was a perpendicular but what about 15 test |
Use cstdio | pocochuk | 1306. Sequence Median | 27 Mar 2024 05:35 | 1 |
|
The most stupid solution | andreyDagger`~ | 1621. Definite Integral | 23 Mar 2024 21:40 | 1 |
Just run Simpson's method, you will only need to find suitable "a", "b" and "N" parameters, but it can be done easily with trial and error method |
How to solve it without BigDecimal? | gerind | 1814. Continued Fraction | 22 Mar 2024 17:26 | 2 |
|
Who can explain the right solution?(-) | Programmer | 1735. Theft of the Century | 22 Mar 2024 07:53 | 2 |
|
WA5 Python | Shepeleva Elena | 1037. Memory Management | 21 Mar 2024 22:28 | 1 |
class MemoryManager: def __init__(self, n, t): self.n = n self.t = t self.blocks = {} self.free_blocks = set(range(1, n + 1)) def allocate_block(self, time): block = min(self.free_blocks) self.free_blocks.remove(block) self.blocks[block] = time + self.t return block def access_block(self, time, block_no): if block_no in self.blocks and self.blocks[block_no] >= time: return '+' else: return '-' n = 30000 t = 10 memory_manager = MemoryManager(n, t) queries = input().strip() for query in queries: query_type = query[0] time = query[1] if query_type == '+': print(memory_manager.allocate_block(time)) elif query_type == '.': block_no = query[2] print(memory_manager.access_block(time, block_no)) |
Can anyone explain to me the input ? | ACSpeed | 1878. Rubinchik's Cube | 17 Mar 2024 22:20 | 2 |
I don't understand how to translate them to the initial state . Tks This is 4 layered Rubics Cube. These layers are situated behind each other (perpendicularly). You can think them as 4 Cards placed behind each other. Also, each layer is transparent. So, color on the second, third or fourth layer can be seen through the first layer. Top View is watching the cube from the first layer. As all the layers are transparent, so we can see the colors of each layer behind it from the first layer. So, from the TOP VIEW you will see a complete cube combining each layer's colors. In the description, the first picture is the 4 layers of the cube. Can you place them behind each other? What will you see if you observe them from the first layer and considering them as transparent? If you see them like below, then bingo you get the idea!! YRYB RRYY GGBB RGBG Here, the first Y and the last B color of the first row are coming from the 4th layer if you see. And so on for the rests. In the given input, let say the color code is like below, 1 - Red 2 - Yellow 3 - Blue 4 - Green. So, the input basically says that what you will see all the layers from the front of the first layer. If you replaced the number with the color, then you will get the exact same cube that is given in the description. (We have already built it above!!) |
Idea | InstouT94 | 2166. Two Roads | 16 Mar 2024 20:49 | 1 |
Idea InstouT94 16 Mar 2024 20:49 I haven't coded my idea yet, but it looks plausible. We can use the idea of binsearch by answer. For a fixed cost x, we need to check that all intersection points are inside a square with center (0;0) and side length x*sqrt(2), rotated at an angle of 45 degrees. That is, there are no points of intersection of lines outside the square. Let us cut out the area of intersection with the square for each straight line, then each straight line will be divided into no more than two parts. Then we apply the idea of solving problem 1469. And the complexity will be O(log(max_answer)*n*log(n)). |
HINT | Dhaval Rathod | 1742. Team building | 15 Mar 2024 22:33 | 2 |
HINT Dhaval Rathod 26 Feb 2022 23:07 first make a SCC , u will get max iterate through scc graph root nodes and in dfs the node size is great than 2 increment answer u will get min is great than 2 no, great than 1! I got AC using it |
WA8 | Kruppov07 | 1014. Product of Digits | 15 Mar 2024 16:12 | 2 |
WA8 Kruppov07 14 Jun 2020 16:47 150 : 556 Edited by author 14.06.2020 17:05 Re: WA8 Dmitry Zhukov 15 Mar 2024 16:12 There is another interesting test case that might be a cause of WA8. Try 12, and the right answer should be 26. Edited by author 15.03.2024 16:13 |
WA #3 :( | Rafal | 1269. Obscene Words Filter | 15 Mar 2024 14:29 | 8 |
Hi. Any ideas what they put inside the test file to #3? У меня этот тест проходит :(, но WA 3... Может кто-нибудь помочь с тестом? I have passed your test,but I still WA#3.Why? Read badwords with spaces, so: 'this is badword' not: this is badword :) changes nothing, still wrong answer Could be space trimming of right side or left side a problem... Hi. Any ideas what they put inside the test file to #3? |
wa on 3 | Roman | 2133. Terms of reference | 14 Mar 2024 17:39 | 1 |
got WA on 3, why, have any tests? Edited by author 14.03.2024 17:39 |
Hint | pocochuk | 1152. False Mirrors | 14 Mar 2024 00:30 | 1 |
Hint pocochuk 14 Mar 2024 00:30 Use dp + bitmask. I got AC in 0.015 and 1M Edited by author 14.03.2024 00:30 |
Works good for my local, why it returns a wrong result? | satybal | 1910. Titan Ruins: Hidden Entrance | 13 Mar 2024 16:51 | 1 |
#include <iostream> using namespace std; int main() { double n, k1, k2, k3, pos = 2, current_pos = 2, oldsum = 0; cin >> n; cin >> k1 >> k2; while (cin >> k3) { double sum = k1 + k2 + k3; if (sum > oldsum) { oldsum = sum; pos = current_pos; } k1 = k2; k2 = k3; ++current_pos; } cout << oldsum << " " << pos; return 0; } |
WA #5 | Kropt | 1444. Elephpotamus | 13 Mar 2024 11:13 | 1 |
WA #5 Kropt 13 Mar 2024 11:13 |
Solved with hashes XD | FaNato4kA_TiMoFeYa | 1590. Bacon’s Cipher | 12 Mar 2024 23:47 | 1 |
|
Why does it return compilation error? I'm using GCC compilator. | satybal | 1001. Reverse Root | 12 Mar 2024 13:34 | 1 |
#include <iostream> #include <vector> #include <cmath> using namespace std; int main() { double number; vector<double> numbers; while (cin >> number) numbers.push_back(number); cout.precision(4); cout.setf(std::ios::fixed); for (auto iter = numbers.rbegin(); iter != numbers.rend(); ++iter) cout << sqrt(*iter) << endl; return 0; } |
wa 10 | 👑TIMOFEY👑 | 1401. Gamers | 10 Mar 2024 19:20 | 3 |
wa 10 👑TIMOFEY👑 30 Oct 2022 13:33 Re: wa 10 vtalgo24_Zakusov_367223 10 Mar 2024 19:18 wa 10 output for "3 3 2": 1 1 2 2 8 8 6 6 1 5 5 2 8 10 10 6 3 0 5 4 9 9 10 7 3 3 4 4 21 9 7 7 12 12 14 21 21 19 18 18 12 15 14 14 19 19 20 18 11 15 15 13 17 20 20 16 11 11 13 13 17 17 16 16 Re: wa 10 vtalgo24_Zakusov_367223 10 Mar 2024 19:20 no overflow, checked all cases for n \in {1, 2, 3} |