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 |
|---|---|---|---|---|---|---|
| 64 | Unknown Language Round 1 | FINISHED | False | 9000 | 478101623 | Feb. 21, 2011, 4 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 129 ) | G | Path Canonization | PROGRAMMING | *special | 2300 |
A path in some Unix-similar file system is given. The path consists of elements separated with characters " / ". For example: " /usr/share/mysql/../tomcat6/conf/server.xml ". The path starts with the root directory (i.e. starts with the character " / "). Each element means a name of file or directory, or it is one of two special elements: " . " или " .. ". First of them stands for the current directory (for example, path " /./usr/././share " is equal to " /usr/share "). The second element " .. " stands for the moving to the parent directory (for example, path " /usr/share/../lib " is equal to " /usr/lib "). You task is to convert the given path to such a path, which doesn't contain special elements " . " and/or " .. ". If it is impossible, print " -1 ". The only reason for it is an attempt to move to the parent directory from the root. The only line contains the given path. The path starts with " / " and consists of elements separated with " / ". No two " / " follow one after another (consecutively). The only path which can end with " / " is the root directory path equal to " / ". Each element may contain " a "-" z ", " 0 "-" 9 " and dots. Any element different from specials " . " and " .. " contains at least one character different from the dots. The path length is between 1 and 1000 inclusively. Print the required path or " -1 ". |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 732117 | shinian | G | Sept. 30, 2011, 6:03 p.m. | OK | Tcl | TESTS | 30 | 30 | 2457600 | 2300 | |
| 331073 | dreamoon_love_AA | G | March 11, 2011, 5:27 p.m. | OK | Tcl | TESTS | 30 | 30 | 2457600 | 2300 | |
| 295924 | emli | G | Feb. 22, 2011, 3:54 a.m. | OK | Tcl | TESTS | 30 | 30 | 2457600 | 2300 | |
| 295873 | lyrics | G | Feb. 22, 2011, 1:18 a.m. | OK | Tcl | TESTS | 30 | 30 | 2457600 | 2300 | |
| 3818132 | yermak0v | G | June 3, 2013, 9:20 a.m. | OK | Tcl | TESTS | 30 | 31 | 0 | 2300 | |
| 1708089 | tmt514 | G | May 21, 2012, 2:23 p.m. | OK | Tcl | TESTS | 30 | 50 | 2457600 | 2300 | |
| 1374292 | random.johnnyh | G | March 18, 2012, 1:35 a.m. | OK | Tcl | TESTS | 30 | 50 | 2457600 | 2300 | |
| 1044002 | ashi009 | G | Jan. 13, 2012, 5:03 p.m. | OK | Tcl | TESTS | 30 | 50 | 2457600 | 2300 | |
| 824817 | tec | G | Nov. 2, 2011, 2:05 p.m. | OK | Tcl | TESTS | 30 | 50 | 2457600 | 2300 | |
| 668989 | ZhouYuChen | G | Sept. 5, 2011, 10:22 a.m. | OK | Tcl | TESTS | 30 | 50 | 2457600 | 2300 |
Back to search problems