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 |
---|---|---|---|---|---|---|
1468 | 2020-2021 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules) | FINISHED | False | 18000 | 128456711 | Dec. 25, 2020, 11:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 970 ) | M | Similar Sets | PROGRAMMING | data structures |
B'You are given n sets of integers. The i -th set contains k_i integers. Two sets are called similar if they share at least two common elements, i. xe2 x80 x89e. there exist two integers x and y such that x ne y , and they both belong to each of the two sets. Your task is to find two similar sets among the given ones, or report that there is no such pair of sets. The first line contains a single integer t ( 1 <= t <= 50000 ) -- the number of test cases. Then t test cases follow. The first line of each test case contains a single integer n ( 2 <= n <= 10^5 ) the number of given sets. The following n lines describe the sets. The i -th line starts with an integer k_i ( 2 <= k_i <= 10^5 ) -- the number of integers in the i -th set. Then k_i integers a_{i,1} , a_{i,2} , ..., a_{i,k_i} ( 1 <= a_{i,j} <= 10^9 ) follow -- the elements of the i -th set. It is guaranteed that all elements in each set are different. The total number of elements in all sets in all test cases is not greater than 2 cdot 10^5 . For each test case, print the answer on a single line. If there is no pair of similar sets, print -1. Otherwise, print two different integers -- the indices of the similar sets. The sets are numbered from 1 to n in the order they are given in the input. If there are multiple answers, print any of them. '... |
Tutorial (PDF) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
102323457 | cbio AzusaCat hs-black | M | Dec. 25, 2020, 2:21 p.m. | OK | GNU C++11 | TESTS | 250 | 171 | 37478400 | ||
102309878 | dengyipeng jz_597 gmh77 | M | Dec. 25, 2020, 12:33 p.m. | OK | GNU C++11 | TESTS | 250 | 234 | 13619200 | ||
102350120 | BigBag | M | Dec. 25, 2020, 7:54 p.m. | OK | GNU C++11 | TESTS | 250 | 451 | 272998400 | ||
102361508 | Yukikaze_ | M | Dec. 26, 2020, 2:46 a.m. | OK | GNU C++11 | TESTS | 250 | 452 | 281190400 | ||
102350146 | BigBag | M | Dec. 25, 2020, 7:55 p.m. | OK | GNU C++11 | TESTS | 250 | 452 | 405401600 | ||
102358267 | aymanrasheed7 | M | Dec. 26, 2020, 12:19 a.m. | OK | GNU C++11 | TESTS | 250 | 608 | 292352000 | ||
102329997 | TrailblazeR_ irri mahdi.hasnat | M | Dec. 25, 2020, 3:15 p.m. | OK | GNU C++11 | TESTS | 250 | 701 | 12288000 | ||
102331023 | TrailblazeR_ irri mahdi.hasnat | M | Dec. 25, 2020, 3:24 p.m. | OK | GNU C++11 | TESTS | 250 | 717 | 12288000 | ||
102327124 | fanache99 | M | Dec. 25, 2020, 2:50 p.m. | OK | GNU C++11 | TESTS | 250 | 779 | 168652800 | ||
102360886 | Grice | M | Dec. 26, 2020, 2:18 a.m. | OK | GNU C++11 | TESTS | 250 | 810 | 126566400 | ||
102311532 | QAQAutoMaton PinkRabbit | M | Dec. 25, 2020, 12:45 p.m. | OK | GNU C++14 | TESTS | 250 | 217 | 24268800 | ||
102328441 | TamimEhsan ramisa.alam MYNAMEISSHARIFUL | M | Dec. 25, 2020, 3:02 p.m. | OK | GNU C++14 | TESTS | 250 | 265 | 28364800 | ||
102344939 | algodoer | M | Dec. 25, 2020, 6:32 p.m. | OK | GNU C++14 | TESTS | 250 | 265 | 33075200 | ||
102343724 | sfiction | M | Dec. 25, 2020, 6:16 p.m. | OK | GNU C++14 | TESTS | 250 | 280 | 10854400 | ||
102331526 | qwqdeco Juanzhang yijan | M | Dec. 25, 2020, 3:29 p.m. | OK | GNU C++14 | TESTS | 250 | 280 | 27340800 | ||
102317282 | C20191629 TiwAirOAO | M | Dec. 25, 2020, 1:31 p.m. | OK | GNU C++14 | TESTS | 250 | 296 | 33075200 | ||
102359714 | YJJ_Konnyaku | M | Dec. 26, 2020, 1:28 a.m. | OK | GNU C++14 | TESTS | 250 | 343 | 12185600 | ||
102316275 | Kalecgos RNG-Ming | M | Dec. 25, 2020, 1:23 p.m. | OK | GNU C++14 | TESTS | 250 | 389 | 116633600 | ||
102313380 | atodo BlueDiamond | M | Dec. 25, 2020, 1 p.m. | OK | GNU C++14 | TESTS | 250 | 436 | 17203200 | ||
102352357 | inder128 | M | Dec. 25, 2020, 8:37 p.m. | OK | GNU C++14 | TESTS | 250 | 530 | 34918400 | ||
102345840 | 4el0ve4ek | M | Dec. 25, 2020, 6:45 p.m. | OK | GNU C++17 | TESTS | 250 | 233 | 33484800 | ||
102345160 | iaNTU | M | Dec. 25, 2020, 6:35 p.m. | OK | GNU C++17 | TESTS | 250 | 249 | 24064000 | ||
102366660 | Alchemist0 | M | Dec. 26, 2020, 5:23 a.m. | OK | GNU C++17 | TESTS | 250 | 265 | 29593600 | ||
102332930 | aleex Quartermelon Paliukh | M | Dec. 25, 2020, 3:41 p.m. | OK | GNU C++17 | TESTS | 250 | 265 | 35328000 | ||
102330305 | LZHlzh q234rty Isrothy | M | Dec. 25, 2020, 3:18 p.m. | OK | GNU C++17 | TESTS | 250 | 295 | 26624000 | ||
102329848 | Mohan_abhyas shubham__36 anonymous_Bunny | M | Dec. 25, 2020, 3:14 p.m. | OK | GNU C++17 | TESTS | 250 | 389 | 19148800 | ||
102352003 | valerikk | M | Dec. 25, 2020, 8:29 p.m. | OK | GNU C++17 | TESTS | 250 | 421 | 15872000 | ||
102328314 | SillyMonSter Roll_Num_56 Iftekhar_Hakim_K | M | Dec. 25, 2020, 3:01 p.m. | OK | GNU C++17 | TESTS | 250 | 483 | 19353600 | ||
102335128 | Swistakk | M | Dec. 25, 2020, 4:02 p.m. | OK | GNU C++17 | TESTS | 250 | 483 | 24268800 | ||
102315324 | Atreus Shayan.P | M | Dec. 25, 2020, 1:15 p.m. | OK | GNU C++17 | TESTS | 250 | 483 | 281088000 | ||
102363610 | Thallium_is_Vegetable | M | Dec. 26, 2020, 4:02 a.m. | OK | GNU C++17 (64) | TESTS | 250 | 171 | 20582400 | ||
102347508 | FlowerOfSorrow | M | Dec. 25, 2020, 7:10 p.m. | OK | GNU C++17 (64) | TESTS | 250 | 171 | 27648000 | ||
102330052 | top34051 RobeZH | M | Dec. 25, 2020, 3:15 p.m. | OK | GNU C++17 (64) | TESTS | 250 | 187 | 16588800 | ||
102336961 | ainta | M | Dec. 25, 2020, 4:25 p.m. | OK | GNU C++17 (64) | TESTS | 250 | 202 | 51200000 | ||
102353199 | noimi | M | Dec. 25, 2020, 8:56 p.m. | OK | GNU C++17 (64) | TESTS | 250 | 249 | 22528000 | ||
102353105 | noimi | M | Dec. 25, 2020, 8:54 p.m. | OK | GNU C++17 (64) | TESTS | 250 | 249 | 22528000 | ||
102328148 | amsen Man Arpa | M | Dec. 25, 2020, 2:59 p.m. | OK | GNU C++17 (64) | TESTS | 250 | 249 | 28160000 | ||
102308762 | 251 jiangly MiFaFaOvO | M | Dec. 25, 2020, 12:25 p.m. | OK | GNU C++17 (64) | TESTS | 250 | 265 | 23449600 | ||
102322817 | Raiden steinum YouKn0wWho | M | Dec. 25, 2020, 2:16 p.m. | OK | GNU C++17 (64) | TESTS | 250 | 265 | 26009600 | ||
102319158 | tempura0224 yamunaku heno239 | M | Dec. 25, 2020, 1:47 p.m. | OK | GNU C++17 (64) | TESTS | 250 | 280 | 18841600 | ||
102332690 | insert_cool_handle | M | Dec. 25, 2020, 3:38 p.m. | OK | Java 11 | TESTS | 250 | 920 | 58880000 | ||
102351008 | conqueror_of_tourist | M | Dec. 25, 2020, 8:11 p.m. | OK | PyPy 2 | TESTS | 250 | 951 | 47513600 | ||
102352818 | sh1194 | M | Dec. 25, 2020, 8:47 p.m. | OK | PyPy 3 | TESTS | 250 | 951 | 47923200 | ||
102350993 | conqueror_of_tourist | M | Dec. 25, 2020, 8:10 p.m. | OK | PyPy 3 | TESTS | 250 | 966 | 47820800 | ||
102352993 | sh1194 | M | Dec. 25, 2020, 8:51 p.m. | OK | PyPy 3 | TESTS | 250 | 967 | 47923200 | ||
102352932 | sh1194 | M | Dec. 25, 2020, 8:50 p.m. | OK | PyPy 3 | TESTS | 250 | 982 | 47820800 | ||
102339266 | sansen | M | Dec. 25, 2020, 5:05 p.m. | OK | Rust | TESTS | 250 | 171 | 13516800 | ||
102342904 | sansen | M | Dec. 25, 2020, 6:05 p.m. | OK | Rust | TESTS | 250 | 389 | 35737600 | ||
102318342 | sansen | M | Dec. 25, 2020, 1:40 p.m. | OK | Rust | TESTS | 250 | 811 | 86118400 |
Back to search problems