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 |
---|---|---|---|---|---|---|
1695 | Codeforces Round 801 (Div. 2) and EPIC Institute of Technology Round | FINISHED | False | 7200 | 81617063 | June 18, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 16440 ) | A | Subrectangle Guess | PROGRAMMING | games |
B"Michael and Joe are playing a game. The game is played on a grid with n rows and m columns, filled with distinct integers. We denote the square on the i -th ( 1 <= i <= n ) row and j -th ( 1 <= j <= m ) column by (i, j) and the number there by a_{ij} . Michael starts by saying two numbers h ( 1 <= h <= n ) and w ( 1 <= w <= m ). Then Joe picks any h x w subrectangle of the board (without Michael seeing). Formally, an h x w subrectangle starts at some square (a,b) where 1 <= a <= n-h+1 and 1 <= b <= m-w+1 . It contains all squares (i,j) for a <= i <= a+h-1 and b <= j <= b+w-1 . Finally, Michael has to guess the maximum number in the subrectangle. He wins if he gets it right. Because Michael doesn't like big numbers, he wants the area of the chosen subrectangle (that is, h cdot w ), to be as small as possible, while still ensuring that he wins, not depending on Joe's choice. Help Michael out by finding this minimum possible area. It can be shown that Michael can always choose h, w for which he can ensure that he wins. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 20 ). Description of the test cases follows. The first line of each test case contains two integers n and m ( 1 <= n, m <= 40 ) -- the size of the grid. Each of the following n lines contains m integers. The j -th integer on the i -th line is a_{ij} ( -10^9 <= a_{ij} <= 10^9 ) -- the element in the cell (i, j) . It is guaranteed that all the numbers are distinct (that is, if a_{i_1j_1} = a_{i_2j_2} , then i_1 = i_2, j_1 = j_2 ). For each test case print a single positive integer -- the minimum possible area the subrectangle can have while still ensuring that Michael can guarantee the victory. In the first test case, the g"... |
Editorial for Codeforces Round #801 (Div. 2) and EPIC Institute of Technology Round |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
161119151 | hiyosilver | A | June 18, 2022, 5:29 p.m. | OK | C# 10 | TESTS | 39 | 93 | 2764800 | ||
161149802 | Rayhanul_Amin_Tanvir | A | June 19, 2022, 4:53 a.m. | OK | GNU C11 | TESTS | 40 | 15 | 0 | ||
161124636 | Nightmarexx1 | A | June 18, 2022, 6:11 p.m. | OK | GNU C11 | TESTS | 40 | 15 | 0 | ||
161132448 | Cloud09 | A | June 18, 2022, 7:58 p.m. | OK | GNU C11 | TESTS | 40 | 15 | 0 | ||
161129941 | gxlois | A | June 18, 2022, 7:17 p.m. | OK | GNU C11 | TESTS | 40 | 30 | 0 | ||
161151671 | apple5014856 | A | June 19, 2022, 5:26 a.m. | OK | GNU C11 | TESTS | 40 | 30 | 0 | ||
161122854 | Shambhavi_28 | A | June 18, 2022, 5:54 p.m. | OK | GNU C11 | TESTS | 40 | 31 | 0 | ||
161110410 | Mubarmaj_2092 | A | June 18, 2022, 4:21 p.m. | OK | GNU C11 | TESTS | 39 | 31 | 0 | ||
161122736 | Ambh | A | June 18, 2022, 5:53 p.m. | OK | GNU C11 | TESTS | 40 | 31 | 0 | ||
161115526 | chro4896 | A | June 18, 2022, 4:32 p.m. | OK | GNU C11 | TESTS | 39 | 62 | 10240000 | ||
161153738 | A_Student_QWH | A | June 19, 2022, 5:57 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161153413 | MH_Parag | A | June 19, 2022, 5:52 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161152595 | lkjhgfertyul | A | June 19, 2022, 5:40 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161151469 | Purav_07 | A | June 19, 2022, 5:23 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161151251 | Sand_Tripper | A | June 19, 2022, 5:19 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161151243 | Gammu | A | June 19, 2022, 5:19 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161149847 | Beginner343 | A | June 19, 2022, 4:54 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161148273 | yash3101 | A | June 19, 2022, 4:19 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161147019 | QWQWAW | A | June 19, 2022, 3:51 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161144759 | the_ilyas | A | June 19, 2022, 2:51 a.m. | OK | GNU C++14 | TESTS | 40 | 15 | 0 | ||
161151568 | d_patil_2002 | A | June 19, 2022, 5:24 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161151940 | Hikari_wa_yutakadesu | A | June 19, 2022, 5:30 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161152106 | Bunny_cal mandar.vardam6 sidjha57 | A | June 19, 2022, 5:33 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161152131 | Yuvraj176 | A | June 19, 2022, 5:33 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161152193 | CherryFrog | A | June 19, 2022, 5:34 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161152675 | Hp_11 | A | June 19, 2022, 5:41 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161152977 | hetvi_11 | A | June 19, 2022, 5:45 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161153020 | yashgarg_ | A | June 19, 2022, 5:46 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161153374 | Ragthi | A | June 19, 2022, 5:52 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161153611 | XORcist | A | June 19, 2022, 5:55 a.m. | OK | GNU C++17 | TESTS | 40 | 15 | 0 | ||
161139780 | ddvddv | A | June 18, 2022, 11:41 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161152229 | aliasgar_45 | A | June 19, 2022, 5:34 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161150329 | adikajale_123 | A | June 19, 2022, 5:04 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161149271 | hemanshu02 | A | June 19, 2022, 4:41 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161148206 | nicolasalba | A | June 19, 2022, 4:18 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161147111 | __magician__ | A | June 19, 2022, 3:53 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161146220 | alif_cse_ju | A | June 19, 2022, 3:32 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161145807 | Hisham_Hagag | A | June 19, 2022, 3:22 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161143139 | Alex01890 | A | June 19, 2022, 2:04 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161143003 | Alex01890 | A | June 19, 2022, 1:59 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 15 | 0 | ||
161151978 | jslim | A | June 19, 2022, 5:30 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161153912 | madhav_23 | A | June 19, 2022, 5:59 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161153819 | madhav_23 | A | June 19, 2022, 5:58 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161153583 | Sankalp-29 | A | June 19, 2022, 5:55 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161153511 | Restarted_lghhh | A | June 19, 2022, 5:54 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161153450 | Restarted_lghhh | A | June 19, 2022, 5:53 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161153436 | I.C.E.B.E.R.G | A | June 19, 2022, 5:53 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161153143 | yogomate | A | June 19, 2022, 5:48 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161152941 | rxlfd314 | A | June 19, 2022, 5:45 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161152060 | ezzr | A | June 19, 2022, 5:32 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
161142851 | churros | A | June 19, 2022, 1:52 a.m. | OK | Java 11 | TESTS | 40 | 171 | 0 | ||
161153563 | Spidey2182 | A | June 19, 2022, 5:55 a.m. | OK | Java 11 | TESTS | 40 | 171 | 0 | ||
161147342 | gurkaran_s | A | June 19, 2022, 3:58 a.m. | OK | Java 11 | TESTS | 40 | 171 | 0 | ||
161144708 | BigBrainInsane | A | June 19, 2022, 2:50 a.m. | OK | Java 11 | TESTS | 40 | 171 | 0 | ||
161142128 | abhinandank626 | A | June 19, 2022, 1:28 a.m. | OK | Java 11 | TESTS | 40 | 171 | 0 | ||
161124594 | nbhakar | A | June 18, 2022, 6:11 p.m. | OK | Java 11 | TESTS | 40 | 171 | 0 | ||
161123751 | pranp_24 | A | June 18, 2022, 6:02 p.m. | OK | Java 11 | TESTS | 40 | 171 | 0 | ||
161123566 | ritu_1 | A | June 18, 2022, 6 p.m. | OK | Java 11 | TESTS | 40 | 171 | 0 | ||
161121875 | utkarsh_1504 | A | June 18, 2022, 5:46 p.m. | OK | Java 11 | TESTS | 40 | 187 | 0 | ||
161130974 | LoudSilence | A | June 18, 2022, 7:33 p.m. | OK | Java 11 | TESTS | 40 | 187 | 0 | ||
161119914 | Abdallah_Ragab00 | A | June 18, 2022, 5:32 p.m. | OK | Java 8 | TESTS | 39 | 93 | 0 | ||
161132150 | alv1 | A | June 18, 2022, 7:53 p.m. | OK | Java 8 | TESTS | 40 | 108 | 0 | ||
161128766 | abhinavTalesra | A | June 18, 2022, 7 p.m. | OK | Java 8 | TESTS | 40 | 108 | 0 | ||
161124065 | VishuTomar | A | June 18, 2022, 6:05 p.m. | OK | Java 8 | TESTS | 40 | 109 | 0 | ||
161121439 | priyaroy3370 | A | June 18, 2022, 5:42 p.m. | OK | Java 8 | TESTS | 40 | 109 | 0 | ||
161121397 | ikillmyself | A | June 18, 2022, 5:42 p.m. | OK | Java 8 | TESTS | 40 | 109 | 0 | ||
161133869 | ayafayed | A | June 18, 2022, 8:29 p.m. | OK | Java 8 | TESTS | 40 | 109 | 0 | ||
161145687 | Zicode | A | June 19, 2022, 3:18 a.m. | OK | Java 8 | TESTS | 40 | 109 | 0 | ||
161143898 | josephSAMO | A | June 19, 2022, 2:26 a.m. | OK | Java 8 | TESTS | 40 | 109 | 0 | ||
161150821 | ganesh_6 | A | June 19, 2022, 5:13 a.m. | OK | Java 8 | TESTS | 40 | 124 | 0 | ||
161145911 | mohamedbakr | A | June 19, 2022, 3:24 a.m. | OK | Mono C# | TESTS | 40 | 46 | 3072000 | ||
161130349 | 1_shivam | A | June 18, 2022, 7:23 p.m. | OK | MS C++ 2017 | TESTS | 40 | 31 | 0 | ||
161129572 | anonymous.iitbhu | A | June 18, 2022, 7:12 p.m. | OK | MS C++ 2017 | TESTS | 40 | 31 | 0 | ||
161124413 | LarkTit | A | June 18, 2022, 6:09 p.m. | OK | MS C++ 2017 | TESTS | 40 | 31 | 0 | ||
161140483 | coder101p | A | June 19, 2022, 12:16 a.m. | OK | Node.js | TESTS | 40 | 77 | 2355200 | ||
161119437 | 1_2_3_4_5_9 | A | June 18, 2022, 5:30 p.m. | OK | PyPy 2 | TESTS | 39 | 171 | 2048000 | ||
161126966 | AyuAnchor | A | June 18, 2022, 6:37 p.m. | OK | PyPy 3 | TESTS | 40 | 108 | 2969600 | ||
161119066 | misorin | A | June 18, 2022, 5:28 p.m. | OK | PyPy 3 | TESTS | 39 | 109 | 2560000 | ||
161149421 | pranay_32 | A | June 19, 2022, 4:45 a.m. | OK | PyPy 3 | TESTS | 40 | 124 | 2867200 | ||
161121572 | loki0018 | A | June 18, 2022, 5:43 p.m. | OK | PyPy 3 | TESTS | 40 | 124 | 3072000 | ||
161141147 | Apass.Jack | A | June 19, 2022, 12:49 a.m. | OK | PyPy 3 | TESTS | 40 | 124 | 3174400 | ||
161113616 | tejassoni9998 | A | June 18, 2022, 4:28 p.m. | OK | PyPy 3 | TESTS | 39 | 124 | 3584000 | ||
161119516 | abhijeet.panihar.cse20 | A | June 18, 2022, 5:30 p.m. | OK | PyPy 3 | TESTS | 39 | 124 | 3686400 | ||
161126788 | AyuAnchor | A | June 18, 2022, 6:35 p.m. | OK | PyPy 3 | TESTS | 40 | 155 | 3174400 | ||
161123553 | Ayushman_123 | A | June 18, 2022, 6 p.m. | OK | PyPy 3 | TESTS | 40 | 217 | 6860800 | ||
161140750 | crapcode | A | June 19, 2022, 12:29 a.m. | OK | PyPy 3-64 | TESTS | 40 | 62 | 2662400 | ||
161125342 | ikoma | A | June 18, 2022, 6:19 p.m. | OK | PyPy 3-64 | TESTS | 40 | 77 | 4096000 | ||
161123286 | aberent | A | June 18, 2022, 5:58 p.m. | OK | PyPy 3-64 | TESTS | 40 | 77 | 4096000 | ||
161136120 | _icy_ | A | June 18, 2022, 9:22 p.m. | OK | PyPy 3-64 | TESTS | 40 | 77 | 4915200 | ||
161153889 | dunkin_shepherd | A | June 19, 2022, 5:59 a.m. | OK | PyPy 3-64 | TESTS | 40 | 93 | 3788800 | ||
161140237 | 3juhwan | A | June 19, 2022, 12:05 a.m. | OK | PyPy 3-64 | TESTS | 40 | 93 | 4096000 | ||
161129684 | _N_0_0_B_ | A | June 18, 2022, 7:13 p.m. | OK | PyPy 3-64 | TESTS | 40 | 93 | 4198400 | ||
161153054 | darkkcyan | A | June 19, 2022, 5:47 a.m. | OK | PyPy 3-64 | TESTS | 40 | 93 | 4300800 | ||
161137205 | agw02010 | A | June 18, 2022, 9:57 p.m. | OK | PyPy 3-64 | TESTS | 40 | 93 | 4300800 | ||
161133299 | biglunchdude | A | June 18, 2022, 8:16 p.m. | OK | PyPy 3-64 | TESTS | 40 | 93 | 4300800 | ||
161151327 | gajanan_5602 | A | June 19, 2022, 5:20 a.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161150002 | michaleproff | A | June 19, 2022, 4:57 a.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161144590 | MohaSa | A | June 19, 2022, 2:46 a.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161141965 | 20020meb1331 | A | June 19, 2022, 1:22 a.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161138225 | cheatercatch123 | A | June 18, 2022, 10:36 p.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161127221 | codersidhant | A | June 18, 2022, 6:41 p.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161126094 | wicked_knight | A | June 18, 2022, 6:27 p.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161125813 | wicked_knight | A | June 18, 2022, 6:24 p.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161124658 | Tanguyvans | A | June 18, 2022, 6:11 p.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161124398 | Datsky | A | June 18, 2022, 6:09 p.m. | OK | Python 3 | TESTS | 40 | 46 | 0 | ||
161144251 | kokkuri | A | June 19, 2022, 2:37 a.m. | OK | Ruby 3 | TESTS | 40 | 280 | 204800 | ||
161111580 | sansen | A | June 18, 2022, 4:23 p.m. | OK | Rust 2021 | TESTS | 39 | 15 | 1024000 |
Back to search problems