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 |
---|---|---|---|---|---|---|
1781 | VK Cup 2022 - Отборочный раунд (Engine) | FINISHED | False | 10800 | 58038899 | Jan. 15, 2023, 12:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 119 ) | H1 | Window Signals (easy version) | PROGRAMMING |
B'This is the easy version of the problem. In this version, the constraints on h and w are lower. A house at the sea has h floors, all of the same height. The side of the house facing the sea has w windows at equal distances from each other on every floor. Thus, the windows are positioned in cells of a rectangular grid of size h x w . In every window, the light can be turned either on or off, except for the given k (at most 2 ) windows. In these k windows the light can not be turned on, because it is broken. In the dark, we can send a signal to a ship at sea using a configuration of lights turned on and off. However, the ship can not see the position of the lights with respect to the house. Thus, if one configuration of windows with lights on can be transformed into another using parallel translation, these configurations are considered equal. Note that only parallel translation is allowed, but neither rotations nor flips are. Moreover, a configuration without any light at all is not considered valid. Find how many different signals the ship can receive and print this number modulo 998 ,244 ,353 . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). The description of the test cases follows. The first line of each test case contains three integers h , w , and k ( 1 <= h, w <= 40 ; 0 <= k <= min(h cdot w, 2) ) -- the height of the house, the number of windows on each floor, and the number of windows with broken lights. If k > 0 , each of the next k lines contains two integers r_i and c_i ( 1 <= r_i <= h ; 1 <= c_i <= w ) -- the floor number and the window number with the broken light. The floors are numbered 1 to h from bottom to top, and the windows are numbered 1 to w from left to right. If k = 2 , then either r_1 ne r_2 or '... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
189381026 | 244mhq | H1 | Jan. 15, 2023, 8:59 p.m. | OK | GNU C++17 (64) | TESTS | 94 | 78 | 0 | ||
189362380 | Golovanov399 | H1 | Jan. 15, 2023, 4:19 p.m. | OK | GNU C++20 (64) | TESTS | 94 | 31 | 0 | ||
189348710 | isaf27 | H1 | Jan. 15, 2023, 2:29 p.m. | OK | GNU C++20 (64) | TESTS | 94 | 93 | 102400 | ||
189379413 | TurkishMan123 | H1 | Jan. 15, 2023, 8:19 p.m. | OK | GNU C++20 (64) | TESTS | 94 | 171 | 102400 | ||
189338394 | turmax | H1 | Jan. 15, 2023, 1:43 p.m. | OK | GNU C++20 (64) | TESTS | 94 | 171 | 102400 | ||
189349225 | Petr | H1 | Jan. 15, 2023, 2:31 p.m. | OK | GNU C++20 (64) | TESTS | 94 | 249 | 0 |
Back to search problems