Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
---|---|---|---|---|---|---|
1758 | Codeforces Round 836 (Div. 2) | FINISHED | False | 7200 | 67789463 | Nov. 25, 2022, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 862 ) | E | Tick, Tock | PROGRAMMING | 2-sat combinatorics dfs and similar ds graphs |
B"Tannhaus, the clockmaker in the town of Winden, makes mysterious clocks that measure time in h hours numbered from 0 to h-1 . One day, he decided to make a puzzle with these clocks. The puzzle consists of an n x m grid of clocks, and each clock always displays some hour exactly (that is, it doesn't lie between two hours). In one move, he can choose any row or column and shift all clocks in that row or column one hour forward ^ dagger . The grid of clocks is called solvable if it is possible to make all the clocks display the same time. While building his puzzle, Tannhaus suddenly got worried that it might not be possible to make the grid solvable. Some cells of the grid have clocks already displaying a certain initial time, while the rest of the cells are empty. Given the partially completed grid of clocks, find the number of ways ^ ddagger to assign clocks in the empty cells so that the grid is solvable. The answer can be enormous, so compute it modulo 10^9 + 7 . ^ dagger If a clock currently displays hour t and is shifted one hour forward, then the clock will instead display hour (t+1) bmod h . ^ ddagger Two assignments are different if there exists some cell with a clock that displays a different time in both arrangements. The first line of input contains t ( 1 <= q t <= q 5 cdot 10^4 ) -- the number of test cases. The first line of each test case consists of 3 integers n , m , and h ( 1 <= q n, m <= q 2 cdot 10^5 ; 1 <= q h <= q 10^9 ) -- the number of rows in the grid, the number of columns in the grid, and the number of the hours in the day respectively. The next n lines each contain m integers, describing the clock grid. The integer x ( -1 <= q x < h ) in the i -th row and the j -th column represents the initial hour of the corresponding clock, or if x = -1 , an empty cell. It is guaranteed that the sum of $"... |
Codeforces Round #836 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
182551591 | Tdyx | E | Nov. 25, 2022, 6:35 p.m. | OK | C# 10 | TESTS | 63 | 155 | 24064000 | ||
182551767 | omeganot | E | Nov. 25, 2022, 6:37 p.m. | OK | GNU C++14 | TESTS | 63 | 77 | 5836800 | ||
182566563 | awoo | E | Nov. 25, 2022, 8:32 p.m. | OK | GNU C++14 | TESTS | 63 | 78 | 12083200 | ||
182583070 | The-Fourth-Pole | E | Nov. 26, 2022, 2:30 a.m. | OK | GNU C++14 | TESTS | 63 | 93 | 18636800 | ||
182594440 | OvO_Zuo | E | Nov. 26, 2022, 5:17 a.m. | OK | GNU C++14 | TESTS | 63 | 93 | 19353600 | ||
182593446 | xkcdjerry | E | Nov. 26, 2022, 5:06 a.m. | OK | GNU C++14 | TESTS | 63 | 109 | 14336000 | ||
182559189 | jennyfischer | E | Nov. 25, 2022, 7:25 p.m. | OK | GNU C++14 | TESTS | 63 | 109 | 15360000 | ||
182578645 | t98slider | E | Nov. 26, 2022, 12:42 a.m. | OK | GNU C++14 | TESTS | 63 | 109 | 15462400 | ||
182561677 | MYNAMEISSHARIFUL | E | Nov. 25, 2022, 7:45 p.m. | OK | GNU C++14 | TESTS | 63 | 109 | 22732800 | ||
182578540 | t98slider | E | Nov. 26, 2022, 12:39 a.m. | OK | GNU C++14 | TESTS | 63 | 124 | 12185600 | ||
182547168 | omeganot | E | Nov. 25, 2022, 6:13 p.m. | OK | GNU C++14 | TESTS | 63 | 124 | 15155200 | ||
182550686 | dmenezes | E | Nov. 25, 2022, 6:31 p.m. | OK | GNU C++17 | TESTS | 63 | 78 | 8704000 | ||
182550577 | dmenezes | E | Nov. 25, 2022, 6:30 p.m. | OK | GNU C++17 | TESTS | 63 | 93 | 8704000 | ||
182571624 | Arti1990 | E | Nov. 25, 2022, 9:43 p.m. | OK | GNU C++17 | TESTS | 63 | 93 | 27443200 | ||
182585638 | acwing_meow | E | Nov. 26, 2022, 3:20 a.m. | OK | GNU C++17 | TESTS | 63 | 93 | 43315200 | ||
182550191 | Omar-Hk | E | Nov. 25, 2022, 6:28 p.m. | OK | GNU C++17 | TESTS | 63 | 108 | 8704000 | ||
182550406 | fishy15 | E | Nov. 25, 2022, 6:29 p.m. | OK | GNU C++17 | TESTS | 63 | 108 | 14950400 | ||
182559884 | aa2985759 | E | Nov. 25, 2022, 7:30 p.m. | OK | GNU C++17 | TESTS | 63 | 108 | 19148800 | ||
182557340 | Meeena | E | Nov. 25, 2022, 7:11 p.m. | OK | GNU C++17 | TESTS | 63 | 108 | 20377600 | ||
182548193 | Serendipity__ | E | Nov. 25, 2022, 6:18 p.m. | OK | GNU C++17 | TESTS | 63 | 109 | 8294400 | ||
182581084 | orangecalculator | E | Nov. 26, 2022, 1:47 a.m. | OK | GNU C++17 | TESTS | 63 | 109 | 14643200 | ||
182552693 | cuzperf | E | Nov. 25, 2022, 6:42 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 77 | 10444800 | ||
182552662 | cuzperf | E | Nov. 25, 2022, 6:42 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 77 | 10444800 | ||
182534998 | HpSuda | E | Nov. 25, 2022, 5:19 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 78 | 12902400 | ||
182549482 | akifpatel | E | Nov. 25, 2022, 6:24 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 78 | 34508800 | ||
182549477 | eriksuenderhauf | E | Nov. 25, 2022, 6:24 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 93 | 9625600 | ||
182541315 | Kude | E | Nov. 25, 2022, 5:34 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 93 | 19353600 | ||
182535895 | cuiaoxiang | E | Nov. 25, 2022, 5:21 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 93 | 19558400 | ||
182549146 | eriksuenderhauf | E | Nov. 25, 2022, 6:23 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 93 | 21708800 | ||
182557615 | lunchbox | E | Nov. 25, 2022, 7:13 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 93 | 28876800 | ||
182536242 | Andreasyan | E | Nov. 25, 2022, 5:22 p.m. | OK | GNU C++17 (64) | TESTS | 63 | 108 | 24473600 | ||
182563901 | yangster67 | E | Nov. 25, 2022, 8:05 p.m. | OK | GNU C++20 (64) | TESTS | 63 | 62 | 8908800 | ||
182587611 | Thallium54 | E | Nov. 26, 2022, 3:54 a.m. | OK | GNU C++20 (64) | TESTS | 63 | 62 | 11878400 | ||
182545085 | lhr_bupt | E | Nov. 25, 2022, 6:05 p.m. | OK | GNU C++20 (64) | TESTS | 63 | 62 | 11878400 | ||
182544966 | LLL_2820 | E | Nov. 25, 2022, 6:04 p.m. | OK | GNU C++20 (64) | TESTS | 63 | 62 | 14336000 | ||
182557629 | MrBrionix | E | Nov. 25, 2022, 7:13 p.m. | OK | GNU C++20 (64) | TESTS | 63 | 62 | 15462400 | ||
182590694 | Lavine | E | Nov. 26, 2022, 4:35 a.m. | OK | GNU C++20 (64) | TESTS | 63 | 62 | 17612800 | ||
182561903 | YouKn0wWho | E | Nov. 25, 2022, 7:47 p.m. | OK | GNU C++20 (64) | TESTS | 63 | 62 | 18227200 | ||
182588176 | HaiYen | E | Nov. 26, 2022, 4:03 a.m. | OK | GNU C++20 (64) | TESTS | 63 | 77 | 10444800 | ||
182535429 | kimoyami | E | Nov. 25, 2022, 5:20 p.m. | OK | GNU C++20 (64) | TESTS | 63 | 77 | 15769600 | ||
182589318 | propane | E | Nov. 26, 2022, 4:18 a.m. | OK | GNU C++20 (64) | TESTS | 63 | 78 | 8806400 | ||
182580998 | profchi | E | Nov. 26, 2022, 1:45 a.m. | OK | Java 11 | TESTS | 63 | 576 | 66252800 | ||
182552388 | Dukkha | E | Nov. 25, 2022, 6:40 p.m. | OK | Java 17 | TESTS | 63 | 202 | 512000 | ||
182559701 | golions | E | Nov. 25, 2022, 7:29 p.m. | OK | Java 8 | TESTS | 63 | 841 | 39628800 | ||
182579133 | hxu10 | E | Nov. 26, 2022, 12:59 a.m. | OK | PyPy 3 | TESTS | 63 | 327 | 35225600 | ||
182557339 | misorin | E | Nov. 25, 2022, 7:11 p.m. | OK | PyPy 3 | TESTS | 63 | 342 | 23040000 | ||
182553960 | misorin | E | Nov. 25, 2022, 6:49 p.m. | OK | PyPy 3 | TESTS | 63 | 373 | 32153600 | ||
182550690 | manish.17 | E | Nov. 25, 2022, 6:31 p.m. | OK | PyPy 3 | TESTS | 63 | 467 | 37888000 | ||
182554126 | misorin | E | Nov. 25, 2022, 6:50 p.m. | OK | PyPy 3-64 | TESTS | 63 | 390 | 51814400 | ||
182544864 | huangxw | E | Nov. 25, 2022, 6:04 p.m. | OK | PyPy 3-64 | TESTS | 63 | 405 | 35430400 | ||
182558024 | tassei903 | E | Nov. 25, 2022, 7:16 p.m. | OK | PyPy 3-64 | TESTS | 63 | 452 | 79872000 | ||
182590138 | Young_Sean | E | Nov. 26, 2022, 4:28 a.m. | OK | PyPy 3-64 | TESTS | 63 | 499 | 90214400 | ||
182589985 | Young_Sean | E | Nov. 26, 2022, 4:26 a.m. | OK | PyPy 3-64 | TESTS | 63 | 592 | 112537600 | ||
182589932 | Young_Sean | E | Nov. 26, 2022, 4:25 a.m. | OK | PyPy 3-64 | TESTS | 63 | 623 | 113254400 | ||
182589885 | Young_Sean | E | Nov. 26, 2022, 4:25 a.m. | OK | PyPy 3-64 | TESTS | 63 | 623 | 113561600 | ||
182594848 | fathorse | E | Nov. 26, 2022, 5:21 a.m. | OK | PyPy 3-64 | TESTS | 63 | 748 | 43008000 | ||
182582992 | Little_Sheep_Yawn | E | Nov. 26, 2022, 2:29 a.m. | OK | PyPy 3-64 | TESTS | 63 | 763 | 105369600 |
Back to search problems