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 |
|---|---|---|---|---|---|---|
| 45 | School Team Contest 3 (Winter Computer School 2010/11) | FINISHED | False | 18000 | 486673180 | Nov. 13, 2010, 11 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 641 ) | E | Director | PROGRAMMING | constructive algorithms greedy | 2100 |
Vasya is a born Berland film director, he is currently working on a new blockbuster, "The Unexpected". Vasya knows from his own experience how important it is to choose the main characters' names and surnames wisely. He made up a list of n names and n surnames that he wants to use. Vasya haven't decided yet how to call characters, so he is free to match any name to any surname. Now he has to make the list of all the main characters in the following format: " Name 1 Surname 1 , Name 2 Surname 2 , ... , Name n Surname n ", i.e. all the name-surname pairs should be separated by exactly one comma and exactly one space, and the name should be separated from the surname by exactly one space. First of all Vasya wants to maximize the number of the pairs, in which the name and the surname start from one letter. If there are several such variants, Vasya wants to get the lexicographically minimal one. Help him. An answer will be verified a line in the format as is shown above, including the needed commas and spaces. It's the lexicographical minimality of such a line that needs to be ensured. The output line shouldn't end with a space or with a comma . The first input line contains number n ( 1 ≤ n ≤ 100 ) — the number of names and surnames. Then follow n lines — the list of names. Then follow n lines — the list of surnames. No two from those 2 n strings match. Every name and surname is a non-empty string consisting of no more than 10 Latin letters. It is guaranteed that the first letter is uppercase and the rest are lowercase. The output data consist of a single line — the needed list. Note that one should follow closely the output data format! |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 194725 | BLIZZARD GR1n map | E | Nov. 13, 2010, 3:24 p.m. | OK | Delphi | TESTS | 100 | 30 | 921600 | 2100 | |
| 193780 | yvasyliv knock-knock Renderhp | E | Nov. 13, 2010, 1:48 p.m. | OK | Delphi | TESTS | 100 | 30 | 921600 | 2100 | |
| 193320 | tourist | E | Nov. 13, 2010, 1:17 p.m. | OK | Delphi | TESTS | 100 | 30 | 921600 | 2100 | |
| 195038 | BrightDays Lapenkov Surogatov_S | E | Nov. 13, 2010, 3:56 p.m. | OK | FPC | TESTS | 100 | 30 | 819200 | 2100 | |
| 194423 | myltik kenny59 Anton_Rodick | E | Nov. 13, 2010, 2:50 p.m. | OK | FPC | TESTS | 100 | 30 | 819200 | 2100 | |
| 194404 | Ministr Georgy Vladl1313 | E | Nov. 13, 2010, 2:49 p.m. | OK | FPC | TESTS | 100 | 30 | 819200 | 2100 | |
| 194731 | Luzan Isachenko Tatyana_Petrashko | E | Nov. 13, 2010, 3:24 p.m. | OK | FPC | TESTS | 100 | 30 | 921600 | 2100 | |
| 193768 | Furko | E | Nov. 13, 2010, 1:47 p.m. | OK | FPC | TESTS | 100 | 30 | 921600 | 2100 | |
| 192868 | ZumZoom taras.klaskovsky iRomchig | E | Nov. 13, 2010, 12:46 p.m. | OK | FPC | TESTS | 100 | 30 | 921600 | 2100 | |
| 192608 | Sereja | E | Nov. 13, 2010, 12:32 p.m. | OK | FPC | TESTS | 100 | 30 | 921600 | 2100 | |
| 194930 | M0sTik | E | Nov. 13, 2010, 3:47 p.m. | OK | FPC | TESTS | 100 | 30 | 1024000 | 2100 | |
| 192926 | LRYBC zzldjk wuyanv1 | E | Nov. 13, 2010, 12:50 p.m. | OK | GNU C | TESTS | 100 | 30 | 1331200 | 2100 | |
| 194505 | Artishok dimad | E | Nov. 13, 2010, 3 p.m. | OK | GNU C++ | TESTS | 100 | 30 | 1331200 | 2100 | |
| 194051 | zpl1 chensqi plokzfadai | E | Nov. 13, 2010, 2:12 p.m. | OK | GNU C++ | TESTS | 100 | 30 | 1331200 | 2100 | |
| 193633 | xelez Seemann Copymaster | E | Nov. 13, 2010, 1:38 p.m. | OK | GNU C++ | TESTS | 100 | 30 | 1331200 | 2100 | |
| 193439 | allocator kate1543 Sender | E | Nov. 13, 2010, 1:24 p.m. | OK | GNU C++ | TESTS | 100 | 30 | 1331200 | 2100 | |
| 193093 | subscriber CherryTree | E | Nov. 13, 2010, 1 p.m. | OK | GNU C++ | TESTS | 100 | 30 | 1331200 | 2100 | |
| 193019 | LGM kyriapelagia AKGMA | E | Nov. 13, 2010, 12:55 p.m. | OK | GNU C++ | TESTS | 100 | 30 | 1331200 | 2100 | |
| 192911 | Matt lala C.sis | E | Nov. 13, 2010, 12:49 p.m. | OK | GNU C++ | TESTS | 100 | 30 | 1331200 | 2100 | |
| 191736 | PavelKunyavskiy slavik Babanin_Ivan | E | Nov. 13, 2010, 11:46 a.m. | OK | GNU C++ | TESTS | 100 | 30 | 1331200 | 2100 | |
| 192936 | AlTimin JOZHEG fadeevs | E | Nov. 13, 2010, 12:50 p.m. | OK | GNU C++ | TESTS | 100 | 30 | 1433600 | 2100 | |
| 193832 | hpfdf ysyshtc | E | Nov. 13, 2010, 1:51 p.m. | OK | GNU C++ | TESTS | 100 | 30 | 1536000 | 2100 |
Back to search problems