Codeforces Round 950 (Div. 3)

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
1980 Codeforces Round 950 (Div. 3) FINISHED False 8100 14397899 June 3, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10521 ) E Permutation of Rows and Columns PROGRAMMING constructive algorithms data structures hashing math matrices sortings

B'You have been given a matrix a of size n by m , containing a permutation of integers from 1 to n cdot m . A permutation of n integers is an array containing all numbers from 1 to n exactly once. For example, the arrays [1] , [2, 1, 3] , [5, 4, 3, 2, 1] are permutations, while the arrays [1, 1] , [100] , [1, 2, 4, 5] are not. A matrix contains a permutation if, when all its elements are written out, the resulting array is a permutation. Matrices [[1, 2], [3, 4]] , [[1]] , [[1, 5, 3], [2, 6, 4]] contain permutations, while matrices [[2]] , [[1, 1], [2, 2]] , [[1, 2], [100, 200]] do not. You can perform one of the following two actions in one operation: You can perform any number of operations. You are given the original matrix a and the matrix b . Your task is to determine whether it is possible to transform matrix a into matrix b using the given operations. The first line contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The descriptions of the test cases follow. The first line of each test case description contains 2 integers n and m ( 1 <= n, m <= n cdot m <= 2 cdot 10^5 ) -- the sizes of the matrix. The next n lines contain m integers a_{ij} each ( 1 <= a_{ij} <= n cdot m ). It is guaranteed that matrix a is a permutation. The next n lines contain m integers b_{ij} each ( 1 <= b_{ij} <= n cdot m ). It is guaranteed that matrix b is a permutation. It is guaranteed that the sum of the values n cdot m for all test cases does not exceed 2 cdot 10^5 . For each test case, output "YES" if the second matrix can be obtained from the first, and "NO" otherwise. You can output each letter in any case (lowercase or uppercase). For example, the strings "yEs", "yes", "Yes", and "YES" will be accepted as '...

Tutorials

130135

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
264074481 AbaKuS E June 4, 2024, 3:16 a.m. OK C++14 (GCC 6-32) TESTS 18 109 3686400
264073541 Aderose_yr E June 4, 2024, 2:59 a.m. OK C++14 (GCC 6-32) TESTS 18 140 2457600
264064035 lzh999 E June 3, 2024, 11:22 p.m. OK C++14 (GCC 6-32) TESTS 18 140 8294400
264063681 lzh999 E June 3, 2024, 11:12 p.m. OK C++14 (GCC 6-32) TESTS 18 156 8294400
264047731 dev_chandani E June 3, 2024, 6:52 p.m. OK C++14 (GCC 6-32) TESTS 18 187 11059200
264041981 ashu2 E June 3, 2024, 5:58 p.m. OK C++14 (GCC 6-32) TESTS 18 202 9523200
264062965 Rombing E June 3, 2024, 10:50 p.m. OK C++14 (GCC 6-32) TESTS 18 265 20070400
264042964 roberto_firmino E June 3, 2024, 6:07 p.m. OK C++14 (GCC 6-32) TESTS 18 265 25292800
264074902 sameer_shreyas E June 4, 2024, 3:23 a.m. OK C++14 (GCC 6-32) TESTS 18 281 9625600
264067849 appalled_15 E June 4, 2024, 1:17 a.m. OK C++14 (GCC 6-32) TESTS 18 296 12697600
264083880 adi0104 E June 4, 2024, 5:26 a.m. OK C++17 (GCC 7-32) TESTS 18 124 0
264072922 z5359122 E June 4, 2024, 2:49 a.m. OK C++17 (GCC 7-32) TESTS 18 124 3276800
264075934 _Milu E June 4, 2024, 3:40 a.m. OK C++17 (GCC 7-32) TESTS 18 124 5324800
264043823 mst_molik E June 3, 2024, 6:15 p.m. OK C++17 (GCC 7-32) TESTS 18 125 0
264078095 9527_ E June 4, 2024, 4:14 a.m. OK C++17 (GCC 7-32) TESTS 18 125 3788800
264063256 Elrashedy E June 3, 2024, 10:59 p.m. OK C++17 (GCC 7-32) TESTS 18 139 5632000
264079475 utk2006iitd E June 4, 2024, 4:35 a.m. OK C++17 (GCC 7-32) TESTS 18 140 0
264063353 im.priyansh E June 3, 2024, 11:01 p.m. OK C++17 (GCC 7-32) TESTS 18 140 0
264086288 himanshu13162 E June 4, 2024, 5:52 a.m. OK C++17 (GCC 7-32) TESTS 18 140 1126400
264071129 Fusu E June 4, 2024, 2:17 a.m. OK C++17 (GCC 7-32) TESTS 18 140 1126400
264064955 _Lactosi E June 3, 2024, 11:51 p.m. OK C++20 (GCC 13-64) TESTS 18 108 0
264035142 VanLam E June 3, 2024, 5:08 p.m. OK C++20 (GCC 13-64) TESTS 18 108 307200
264044093 lucasancruz E June 3, 2024, 6:18 p.m. OK C++20 (GCC 13-64) TESTS 18 108 6963200
264060224 K3br E June 3, 2024, 9:42 p.m. OK C++20 (GCC 13-64) TESTS 18 109 307200
264040861 BanSsal E June 3, 2024, 5:48 p.m. OK C++20 (GCC 13-64) TESTS 18 109 1228800
264035163 blankKyo E June 3, 2024, 5:08 p.m. OK C++20 (GCC 13-64) TESTS 18 109 1228800
264043267 taha-r E June 3, 2024, 6:10 p.m. OK C++20 (GCC 13-64) TESTS 18 109 2662400
264062781 NamanJ_1 E June 3, 2024, 10:45 p.m. OK C++20 (GCC 13-64) TESTS 18 109 4403200
264086178 DonSilvio E June 4, 2024, 5:51 a.m. OK C++20 (GCC 13-64) TESTS 18 109 6348800
264050389 Kairm_Zaf E June 3, 2024, 7:20 p.m. OK C++20 (GCC 13-64) TESTS 18 109 17203200
264035161 InTheBloom E June 3, 2024, 5:08 p.m. OK D TESTS 18 561 52736000
264085185 amit_roy E June 4, 2024, 5:39 a.m. OK Java 21 TESTS 18 281 6553600
264039285 guptashreyansh2048 E June 3, 2024, 5:35 p.m. OK Java 21 TESTS 18 390 16998400
264040004 Eslam_Ahmed E June 3, 2024, 5:40 p.m. OK Java 21 TESTS 18 421 19148800
264074887 yadavDipesh E June 4, 2024, 3:23 a.m. OK Java 21 TESTS 18 578 16076800
264080461 yang_wei E June 4, 2024, 4:47 a.m. OK Java 21 TESTS 18 640 38195200
264053021 ramitg254 E June 3, 2024, 7:50 p.m. OK Java 21 TESTS 18 656 39731200
264083993 rajasomeshwar_bitla E June 4, 2024, 5:27 a.m. OK Java 21 TESTS 18 702 15667200
264043879 Althaf_Hussain E June 3, 2024, 6:16 p.m. OK Java 21 TESTS 18 718 35737600
264043082 dan00ile E June 3, 2024, 6:09 p.m. OK Java 21 TESTS 18 749 32972800
264039103 dinosparton_013 E June 3, 2024, 5:33 p.m. OK Java 21 TESTS 18 749 34099200
264079291 kunal_0199 E June 4, 2024, 4:32 a.m. OK Java 8 TESTS 18 452 25497600
264080148 NayanVerma14 E June 4, 2024, 4:43 a.m. OK Java 8 TESTS 18 468 34611200
264074794 yadavDipesh E June 4, 2024, 3:21 a.m. OK Java 8 TESTS 18 499 11366400
264070317 IvanD94 E June 4, 2024, 2:07 a.m. OK Java 8 TESTS 18 577 51097600
264082476 achyut88 E June 4, 2024, 5:11 a.m. OK Java 8 TESTS 18 655 66764800
264048219 PlayDate E June 3, 2024, 6:57 p.m. OK Java 8 TESTS 18 812 19148800
264048146 PlayDate E June 3, 2024, 6:57 p.m. OK Java 8 TESTS 18 812 19148800
264040946 MarcAS E June 3, 2024, 5:48 p.m. OK Java 8 TESTS 18 1390 106188800
264048496 shreyansharipur E June 3, 2024, 7 p.m. OK Java 8 TESTS 18 1608 212992000
264043468 _skb_ E June 3, 2024, 6:12 p.m. OK Kotlin 1.9 TESTS 18 1468 45772800
264037783 chinesedfan E June 3, 2024, 5:23 p.m. OK Node.js TESTS 18 608 76902400
264073671 KrishBhimani E June 4, 2024, 3:02 a.m. OK PyPy 3 TESTS 18 1796 50790400
264032313 l0stempl3 E June 3, 2024, 4:54 p.m. OK PyPy 3-64 TESTS 18 296 56422400
264044279 ghgb E June 3, 2024, 6:19 p.m. OK PyPy 3-64 TESTS 18 311 57548800
264044632 gardengnome E June 3, 2024, 6:22 p.m. OK PyPy 3-64 TESTS 18 343 51814400
264044852 gardengnome E June 3, 2024, 6:24 p.m. OK PyPy 3-64 TESTS 18 343 51916800
264064991 RobinFromTheHood E June 3, 2024, 11:52 p.m. OK PyPy 3-64 TESTS 18 343 63283200
264036691 JinYuManTang E June 3, 2024, 5:16 p.m. OK PyPy 3-64 TESTS 18 484 59699200
264083530 zhengyi20thu E June 4, 2024, 5:22 a.m. OK PyPy 3-64 TESTS 18 593 91955200
264039712 Mohamed_Hamed E June 3, 2024, 5:38 p.m. OK PyPy 3-64 TESTS 18 624 70758400
264039661 Muhammad_Hamed E June 3, 2024, 5:38 p.m. OK PyPy 3-64 TESTS 18 624 70758400
264050034 melke_mk E June 3, 2024, 7:16 p.m. OK PyPy 3-64 TESTS 18 686 166604800
264042530 MTA9402 E June 3, 2024, 6:04 p.m. OK Python 3 TESTS 18 889 88371200
264042011 FREEDOMTOFAIL E June 3, 2024, 5:59 p.m. OK Python 3 TESTS 18 889 88371200
264044102 MTA9402 E June 3, 2024, 6:18 p.m. OK Python 3 TESTS 18 953 87449600
264044492 yashwanth_111 E June 3, 2024, 6:21 p.m. OK Python 3 TESTS 18 1155 75776000
264048198 OLOGY E June 3, 2024, 6:57 p.m. OK Python 3 TESTS 18 1155 95232000
264084384 retinue E June 4, 2024, 5:31 a.m. OK Python 3 TESTS 18 1499 112742400
264079910 ___a_s_1_2___ E June 4, 2024, 4:40 a.m. OK Python 3 TESTS 18 1968 62566400
264042993 _skb_ E June 3, 2024, 6:08 p.m. OK Python 3 TESTS 18 2280 98406400
264035911 oviyan_gandhi E June 3, 2024, 5:12 p.m. OK Python 3 TESTS 18 2296 101478400
264036480 oviyan_gandhi E June 3, 2024, 5:15 p.m. OK Python 3 TESTS 18 2374 101580800
264054754 0x81 E June 3, 2024, 8:12 p.m. OK Ruby 3 TESTS 18 1265 72704000
264054433 0x81 E June 3, 2024, 8:08 p.m. OK Ruby 3 TESTS 18 1343 59494400
264054566 0x81 E June 3, 2024, 8:10 p.m. OK Ruby 3 TESTS 18 1358 59596800
264051317 0x81 E June 3, 2024, 7:30 p.m. OK Ruby 3 TESTS 18 1437 71884800
264051570 0x81 E June 3, 2024, 7:33 p.m. OK Ruby 3 TESTS 18 1452 61132800
264051466 0x81 E June 3, 2024, 7:32 p.m. OK Ruby 3 TESTS 18 1468 74137600
264049024 0x81 E June 3, 2024, 7:06 p.m. OK Ruby 3 TESTS 18 1640 65331200
264048600 0x81 E June 3, 2024, 7:01 p.m. OK Ruby 3 TESTS 18 2546 193843200
264062416 PlaceOrientedProgrammer E June 3, 2024, 10:35 p.m. OK Rust 2021 TESTS 18 171 24576000
264043914 _skb_ E June 3, 2024, 6:16 p.m. OK Rust 2021 TESTS 18 218 28057600
264060913 vstiff E June 3, 2024, 9:58 p.m. OK Rust 2021 TESTS 18 483 62976000

remove filters

Back to search problems