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 |
|---|---|---|---|---|---|---|
| 72 | Unknown Language Round 2 | FINISHED | False | 10800 | 475768223 | March 20, 2011, 4:10 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 117 ) | B | INI-file | PROGRAMMING | *special implementation | 2500 |
The INI file format is a de facto standard for configuration files. INI files are simple text files with a basic structure. They are commonly associated with Microsoft Windows, but are also used on other platforms. Each line in INI-file stands for key-value mapping or defines new section. A key-value line has a format " key=value ",where key — is the name of some property, and value — it's value. It is possible that it will be spaces from the both sides of key and/or value , the spaces should be ignored. A section line has a format " section ". It means that all key-value lines after it define properties of the specified section. Of cause, the following section line changes the current section. A section line may have spaces around any of brackets. Also you should ignore comment lines — the first non-space character of comment line is " ; ". You task is to write the program which will format given INI-file in a special way: first, print key-value lines which do not belong to any section; print all the sections in the lexicographical (alphabetical) order of their names; inside each of two previous items, order key-value lines lexicographically by " key "; if there are more than one key-value lines with the same key inside a single section (or outside any sections), leave only one line (which appears later in the input data); remove all redundant spaces and lines. The first line contains single integer n ( 1 ≤ n ≤ 510 ) — the number of lines in given INI-file. The rest of the input contains a valid INI-file in n lines. Values of section , key and value contain only Latin letters, digits, " . " and/or " - ". Each line has length not exceeding 255 characters and not less than 1 character. The total length of all the lines does’t exceed 10000. Print formatted INI-file. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 45851250 | yongwhan | B | Nov. 16, 2018, 11:38 p.m. | OK | Io | TESTS | 25 | 186 | 0 | 2500 | |
| 64553463 | steven1029 | B | Nov. 9, 2019, 1:47 a.m. | OK | Io | TESTS | 25 | 186 | 307200 | 2500 | |
| 1124940 | ZhouYuChen | B | Jan. 29, 2012, 7:53 a.m. | OK | Io | TESTS | 25 | 200 | 4608000 | 2500 | |
| 361253 | lyrics | B | March 29, 2011, 2:33 a.m. | OK | Io | TESTS | 25 | 200 | 4608000 | 2500 | |
| 352926 | Booger | B | March 24, 2011, midnight | OK | Io | TESTS | 25 | 200 | 4608000 | 2500 | |
| 351882 | at1 | B | March 23, 2011, 1:24 a.m. | OK | Io | TESTS | 25 | 200 | 4608000 | 2500 | |
| 346722 | cyheuraeth | B | March 20, 2011, 9:34 p.m. | OK | Io | TESTS | 25 | 200 | 4608000 | 2500 | |
| 346610 | ashi009 | B | March 20, 2011, 7:34 p.m. | OK | Io | TESTS | 25 | 200 | 4608000 | 2500 | |
| 346462 | watashi | B | March 20, 2011, 7:02 p.m. | OK | Io | TESTS | 25 | 200 | 4608000 | 2500 | |
| 346212 | nodchip | B | March 20, 2011, 6:29 p.m. | OK | Io | TESTS | 25 | 200 | 4608000 | 2500 |
Back to search problems