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 |
|---|---|---|---|---|---|---|
| 59 | Codeforces Beta Round 55 (Div. 2) | FINISHED | False | 7200 | 478965623 | Feb. 11, 2011, 4 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 744 ) | D | Team Arrangement | PROGRAMMING | constructive algorithms greedy implementation | 2200 |
Recently personal training sessions have finished in the Berland State University Olympiad Programmer Training Centre. By the results of these training sessions teams are composed for the oncoming team contest season. Each team consists of three people. All the students of the Centre possess numbers from 1 to 3 n , and all the teams possess numbers from 1 to n . The splitting of students into teams is performed in the following manner: while there are people who are not part of a team, a person with the best total score is chosen among them (the captain of a new team), this person chooses for himself two teammates from those who is left according to his list of priorities. The list of every person's priorities is represented as a permutation from the rest of 3 n - 1 students who attend the centre, besides himself. You are given the results of personal training sessions which are a permutation of numbers from 1 to 3 n , where the i -th number is the number of student who has won the i -th place. No two students share a place. You are also given the arrangement of the already formed teams in the order in which they has been created. Your task is to determine the list of priorities for the student number k . If there are several priority lists, choose the lexicographically minimal one. The first line contains an integer n ( 1 ≤ n ≤ 10 5 ) which is the number of resulting teams. The second line contains 3 n space-separated integers from 1 to 3 n which are the results of personal training sessions. It is guaranteed that every student appears in the results exactly once. Then follow n lines each containing three integers from 1 to 3 n — each line describes the members of a given team. The members of one team can be listed in any order, but the teams themselves are listed in the order in which they were created. It is guaranteed that the arrangement is correct, that is that every student is a member of exactly one team and those teams could really be created from |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 40993114 | ReaLNero1 | D | July 31, 2018, 1:46 a.m. | OK | Delphi | TESTS | 51 | 280 | 4915200 | 2200 | |
| 45459862 | luogu_bot1 | D | Nov. 8, 2018, 11:25 p.m. | OK | FPC | TESTS | 51 | 1964 | 12492800 | 2200 | |
| 22398662 | Jin_Haonan | D | Nov. 22, 2016, 7:52 a.m. | OK | GNU C++ | TESTS | 51 | 248 | 3686400 | 2200 | |
| 21667331 | lys1280023 | D | Oct. 22, 2016, 12:58 p.m. | OK | GNU C++ | TESTS | 51 | 342 | 3891200 | 2200 | |
| 16802734 | vjudge2 | D | March 19, 2016, 6:18 a.m. | OK | GNU C++ | TESTS | 51 | 374 | 7270400 | 2200 | |
| 14141728 | vjudge1 | D | Nov. 8, 2015, 1:44 p.m. | OK | GNU C++ | TESTS | 51 | 374 | 27238400 | 2200 | |
| 14143458 | vjudge5 | D | Nov. 8, 2015, 3:36 p.m. | OK | GNU C++ | TESTS | 51 | 404 | 3584000 | 2200 | |
| 16802766 | hnuRoshan | D | March 19, 2016, 6:20 a.m. | OK | GNU C++ | TESTS | 51 | 404 | 7270400 | 2200 | |
| 20756094 | gawry | D | Sept. 19, 2016, 1:13 p.m. | OK | GNU C++ | TESTS | 51 | 404 | 7987200 | 2200 | |
| 17468616 | vjudge5 | D | April 23, 2016, 11 a.m. | OK | GNU C++ | TESTS | 51 | 404 | 8192000 | 2200 | |
| 17465768 | vjudge3 | D | April 23, 2016, 6:40 a.m. | OK | GNU C++ | TESTS | 51 | 436 | 27340800 | 2200 | |
| 29445577 | ojtrans1 | D | Aug. 14, 2017, 1:02 a.m. | OK | GNU C++ | TESTS | 51 | 466 | 5734400 | 2200 | |
| 60240651 | rainboy | D | Sept. 7, 2019, 9:04 p.m. | OK | GNU C11 | TESTS | 51 | 2246 | 7475200 | 2200 | |
| 14817877 | yarak | D | Dec. 15, 2015, 4:11 p.m. | OK | GNU C++11 | TESTS | 51 | 156 | 6451200 | 2200 | |
| 69180785 | _ShadowSong | D | Jan. 20, 2020, 10:03 a.m. | OK | GNU C++11 | TESTS | 51 | 342 | 6348800 | 2200 | |
| 27581821 | 423555290 | D | June 5, 2017, 11:33 a.m. | OK | GNU C++11 | TESTS | 51 | 372 | 5427200 | 2200 | |
| 22905347 | ProjectDE | D | Dec. 12, 2016, 1:50 p.m. | OK | GNU C++11 | TESTS | 51 | 374 | 7577600 | 2200 | |
| 14144065 | 2360 | D | Nov. 8, 2015, 4:15 p.m. | OK | GNU C++11 | TESTS | 51 | 374 | 27238400 | 2200 | |
| 38422818 | ruo | D | May 19, 2018, 8:11 a.m. | OK | GNU C++11 | TESTS | 51 | 404 | 7168000 | 2200 | |
| 36277889 | McGinn | D | March 14, 2018, 1:50 p.m. | OK | GNU C++11 | TESTS | 51 | 404 | 7577600 | 2200 | |
| 14198187 | allahrbanda | D | Nov. 11, 2015, 3:25 p.m. | OK | GNU C++11 | TESTS | 51 | 404 | 8806400 | 2200 | |
| 14198205 | dariwala | D | Nov. 11, 2015, 3:26 p.m. | OK | GNU C++11 | TESTS | 51 | 404 | 8806400 | 2200 | |
| 15771551 | tenshi_kanade | D | Feb. 3, 2016, 3:06 p.m. | OK | GNU C++11 | TESTS | 51 | 404 | 10649600 | 2200 | |
| 34615302 | Qumair | D | Jan. 27, 2018, 6:56 p.m. | OK | GNU C++14 | TESTS | 51 | 404 | 9830400 | 2200 | |
| 53934416 | NuM | D | May 9, 2019, 8:30 p.m. | OK | GNU C++14 | TESTS | 51 | 404 | 10956800 | 2200 | |
| 34494975 | kefaa2 | D | Jan. 23, 2018, 7:50 p.m. | OK | GNU C++14 | TESTS | 51 | 436 | 9625600 | 2200 | |
| 29445757 | 2772486661 | D | Aug. 14, 2017, 1:18 a.m. | OK | GNU C++14 | TESTS | 51 | 436 | 10444800 | 2200 | |
| 29434699 | Marris | D | Aug. 13, 2017, 1:17 p.m. | OK | GNU C++14 | TESTS | 51 | 498 | 5529600 | 2200 | |
| 21431846 | 2016 | D | Oct. 14, 2016, 7:33 p.m. | OK | GNU C++14 | TESTS | 51 | 498 | 13926400 | 2200 | |
| 42867556 | Mr_Emrul | D | Sept. 14, 2018, 4:39 p.m. | OK | GNU C++14 | TESTS | 51 | 498 | 80179200 | 2200 | |
| 29434999 | Marris | D | Aug. 13, 2017, 1:30 p.m. | OK | GNU C++14 | TESTS | 51 | 530 | 5529600 | 2200 | |
| 38930895 | mredigonda | D | June 3, 2018, 9:45 p.m. | OK | GNU C++14 | TESTS | 51 | 530 | 14950400 | 2200 | |
| 52959117 | drastogi21 | D | April 18, 2019, 3:02 p.m. | OK | GNU C++14 | TESTS | 51 | 530 | 22118400 | 2200 | |
| 45096215 | HappyEnd | D | Oct. 30, 2018, 11:57 a.m. | OK | GNU C++17 | TESTS | 51 | 374 | 3891200 | 2200 | |
| 49390190 | kenimo | D | Feb. 3, 2019, 9:26 a.m. | OK | GNU C++17 | TESTS | 51 | 404 | 7065600 | 2200 | |
| 59681120 | Eran | D | Aug. 29, 2019, 8:42 p.m. | OK | GNU C++17 | TESTS | 51 | 436 | 7372800 | 2200 | |
| 59681000 | platypus179 | D | Aug. 29, 2019, 8:38 p.m. | OK | GNU C++17 | TESTS | 51 | 436 | 8396800 | 2200 | |
| 53702794 | igba | D | May 3, 2019, 11:31 a.m. | OK | GNU C++17 | TESTS | 51 | 436 | 9113600 | 2200 | |
| 60755722 | lijinpei | D | Sept. 18, 2019, 8:47 a.m. | OK | GNU C++17 | TESTS | 51 | 498 | 2457600 | 2200 | |
| 42864130 | vjudge3 | D | Sept. 14, 2018, 2:35 p.m. | OK | GNU C++17 | TESTS | 51 | 528 | 80179200 | 2200 | |
| 49863723 | deadRabbit | D | Feb. 13, 2019, 11:02 a.m. | OK | GNU C++17 | TESTS | 51 | 1278 | 23859200 | 2200 | |
| 53705028 | rianradeck | D | May 3, 2019, 12:47 p.m. | OK | GNU C++17 | TESTS | 51 | 1964 | 14950400 | 2200 | |
| 65710063 | WangJialei | D | Nov. 25, 2019, 2:01 p.m. | OK | Go | TESTS | 51 | 2744 | 13107200 | 2200 | |
| 65710119 | vjudge5 | D | Nov. 25, 2019, 2:03 p.m. | OK | Go | TESTS | 51 | 2806 | 13107200 | 2200 | |
| 20553312 | Ahmad_Elsagheer | D | Sept. 12, 2016, 5:10 p.m. | OK | Java 8 | TESTS | 51 | 966 | 9523200 | 2200 | |
| 24528832 | MedoN11 | D | Feb. 8, 2017, 2:17 p.m. | OK | Java 8 | TESTS | 51 | 1122 | 29900800 | 2200 | |
| 60240650 | Dukkha | D | Sept. 7, 2019, 9:04 p.m. | OK | Java 8 | TESTS | 51 | 1684 | 0 | 2200 | |
| 57851113 | WashRoom | D | July 27, 2019, 1:10 p.m. | OK | Java 8 | TESTS | 51 | 1870 | 72704000 | 2200 | |
| 36109618 | lehar_11 | D | March 9, 2018, 10:10 a.m. | OK | Java 8 | TESTS | 51 | 2400 | 42291200 | 2200 | |
| 24338500 | lessmeaning | D | Feb. 1, 2017, 9:38 a.m. | OK | Java 8 | TESTS | 51 | 2526 | 42086400 | 2200 | |
| 32358272 | Mem | D | Nov. 16, 2017, 2:46 p.m. | OK | MS C# | TESTS | 51 | 778 | 34201600 | 2200 | |
| 27947899 | Tampere | D | June 21, 2017, 2:30 p.m. | OK | MS C++ | TESTS | 51 | 1248 | 7782400 | 2200 | |
| 15142559 | HappyNewYearMike | D | Dec. 31, 2015, 10:35 p.m. | OK | MS C++ | TESTS | 51 | 1402 | 9011200 | 2200 | |
| 24354289 | Ferume | D | Feb. 1, 2017, 8:15 p.m. | OK | PyPy 3 | TESTS | 51 | 2152 | 69324800 | 2200 | |
| 56016169 | sorry_im_smurfing | D | June 24, 2019, 9:23 p.m. | OK | Python 2 | TESTS | 51 | 1528 | 40857600 | 2200 | |
| 35895756 | _____k_____ | D | March 3, 2018, 4:52 p.m. | OK | Python 2 | TESTS | 51 | 1590 | 45568000 | 2200 | |
| 35895158 | ______n______ | D | March 3, 2018, 4:36 p.m. | OK | Python 2 | TESTS | 51 | 1590 | 45568000 | 2200 | |
| 35894854 | ______u______ | D | March 3, 2018, 4:30 p.m. | OK | Python 2 | TESTS | 51 | 1590 | 45568000 | 2200 | |
| 35894810 | _____i_____ | D | March 3, 2018, 4:30 p.m. | OK | Python 2 | TESTS | 51 | 1590 | 45568000 | 2200 | |
| 35886352 | ______h______ | D | March 3, 2018, 1:44 p.m. | OK | Python 2 | TESTS | 51 | 1590 | 45568000 | 2200 | |
| 35885956 | ______k______ | D | March 3, 2018, 1:38 p.m. | OK | Python 2 | TESTS | 51 | 1590 | 45568000 | 2200 | |
| 35885049 | ______i______ | D | March 3, 2018, 1:21 p.m. | OK | Python 2 | TESTS | 51 | 1590 | 45568000 | 2200 | |
| 35883149 | ______M______ | D | March 3, 2018, 12:50 p.m. | OK | Python 2 | TESTS | 51 | 1590 | 45568000 | 2200 |
Back to search problems