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 |
|---|---|---|---|---|---|---|
| 865 | MemSQL Start[c]UP 3.0 - Round 2 (onsite finalists) | FINISHED | False | 10800 | 269614523 | Sept. 30, 2017, 5:05 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 157 ) | E | Hex Dyslexia | PROGRAMMING | bitmasks brute force dp graphs | 2700 |
Copying large hexadecimal (base 16) strings by hand can be error prone, but that doesn't stop people from doing it. You've discovered a bug in the code that was likely caused by someone making a mistake when copying such a string. You suspect that whoever copied the string did not change any of the digits in the string, nor the length of the string, but may have permuted the digits arbitrarily. For example, if the original string was 0 abc they may have changed it to a 0 cb or 0 bca , but not abc or 0 abb . Unfortunately you don't have access to the original string nor the copied string, but you do know the length of the strings and their numerical absolute difference. You will be given this difference as a hexadecimal string S , which has been zero-extended to be equal in length to the original and copied strings. Determine the smallest possible numerical value of the original string. Input will contain a hexadecimal string S consisting only of digits 0 to 9 and lowercase English letters from a to f , with length at most 14 . At least one of the characters is non-zero. If it is not possible, print " NO " (without quotes). Otherwise, print the lowercase hexadecimal string corresponding to the smallest possible numerical value, including any necessary leading zeros for the length to be correct. The numerical value of a hexadecimal string is computed by multiplying each digit by successive powers of 16 , starting with the rightmost digit, which is multiplied by 16 0 . Hexadecimal digits representing values greater than 9 are represented by letters: a = 10, b = 11, c = 12, d = 13, e = 14, f = 15 . For example, the numerical value of 0 f 1 e is 0·16 3 + 15·16 2 + 1·16 1 + 14·16 0 = 3870 , the numerical value of 00 f 1 is 0·16 3 + 0·16 2 + 15·16 1 + 1·16 0 = 241 , and the numerical value of 100 f is 1·16 3 + 0·16 2 + 0·16 1 + 15·16 0 = 4111 . Since 3870 + 241 = 4111 and 00 f 1 is a permutation of 100 f , 00 f 1 is a valid answer to the second test case. |
| MemSQL Start[c]UP 3.0 Round 2 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 33995260 | zhouyuyang | E | Jan. 8, 2018, 12:31 a.m. | OK | GNU C++11 | TESTS | 77 | 499 | 2252800 | 2700 | |
| 65735320 | JCC_ | E | Nov. 26, 2019, 7:29 a.m. | OK | GNU C++11 | TESTS | 77 | 702 | 204800 | 2700 | |
| 57872993 | lopare | E | July 28, 2019, 3:14 a.m. | OK | GNU C++11 | TESTS | 77 | 702 | 204800 | 2700 | |
| 57768924 | py_ultron | E | July 25, 2019, 10:45 p.m. | OK | GNU C++11 | TESTS | 77 | 717 | 204800 | 2700 | |
| 30933294 | Nero | E | Oct. 2, 2017, 5:02 a.m. | OK | GNU C++11 | TESTS | 77 | 889 | 0 | 2700 | |
| 30946383 | krijgertje | E | Oct. 2, 2017, 3:04 p.m. | OK | GNU C++11 | TESTS | 77 | 951 | 204800 | 2700 | |
| 31167356 | Efina | E | Oct. 9, 2017, 12:42 p.m. | OK | GNU C++11 | TESTS | 77 | 967 | 307200 | 2700 | |
| 33444198 | xc01 | E | Dec. 20, 2017, 3:46 a.m. | OK | GNU C++11 | TESTS | 77 | 1326 | 3686400 | 2700 | |
| 30969856 | Los_Angelos_Laycurse | E | Oct. 3, 2017, 2:20 p.m. | OK | GNU C++14 | TESTS | 77 | 436 | 307200 | 2700 | |
| 40979612 | ReaLNero1 | E | July 30, 2018, 5:09 p.m. | OK | GNU C++14 | TESTS | 77 | 451 | 204800 | 2700 | |
| 30969783 | Los_Angelos_Laycurse | E | Oct. 3, 2017, 2:17 p.m. | OK | GNU C++14 | TESTS | 77 | 452 | 307200 | 2700 | |
| 30942856 | Coder | E | Oct. 2, 2017, 12:49 p.m. | OK | GNU C++14 | TESTS | 77 | 467 | 102400 | 2700 | |
| 30969732 | Los_Angelos_Laycurse | E | Oct. 3, 2017, 2:15 p.m. | OK | GNU C++14 | TESTS | 77 | 608 | 307200 | 2700 | |
| 30969506 | Los_Angelos_Laycurse | E | Oct. 3, 2017, 2:06 p.m. | OK | GNU C++14 | TESTS | 77 | 780 | 307200 | 2700 | |
| 30963636 | Los_Angelos_Laycurse | E | Oct. 3, 2017, 9:44 a.m. | OK | GNU C++14 | TESTS | 77 | 2574 | 2867200 | 2700 | |
| 34266674 | riverwalk7 | E | Jan. 18, 2018, 4:54 a.m. | OK | GNU C++14 | TESTS | 77 | 2574 | 54169600 | 2700 | |
| 47516516 | Shayan.P | E | Dec. 26, 2018, 10:18 a.m. | OK | GNU C++17 | TESTS | 77 | 1996 | 204800 | 2700 | |
| 30969541 | Los_Angelos_Laycurse | E | Oct. 3, 2017, 2:07 p.m. | OK | MS C++ | TESTS | 77 | 904 | 307200 | 2700 | |
| 30963695 | Los_Angelos_Laycurse | E | Oct. 3, 2017, 9:47 a.m. | OK | MS C++ | TESTS | 77 | 2636 | 2969600 | 2700 |
Back to search problems