Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Time Exceeded.
Please double check your code to solve this problem and try again.
Your Answer
0 Delete key is 1449 ***End*** 1 Insert key is 2157, value is 67 ***End*** 2 Insert key is 1747, value is 1225 ***End*** 3 Insert key is 2451, value is 1605 ***End*** 4 Insert key is 26, value is 537 ***End*** 5 Insert key is 1458, value is 1603 ***End*** 6 Delete key is 1601 ***End*** 7 Insert key is 348, value is 1168 ***End*** 8 Delete key is 1740 ***End*** 9 Delete key is 311 ***End*** 10 Insert key is 1941, value is 1263 ***End*** 11 Delete key is 2285 ***End*** 12 Delete key is 2966 ***End*** 13 Insert key is 1647, value is 1387 ***End*** 14 Delete key is 2715 ***End*** 15 Insert key is 288, value is 1479 ***End*** 16 Insert key is 707, value is 2046 ***End*** 17 Delete key is 975 ***End*** 18 Insert key is 1236, value is 2202 ***End*** 19 Insert key is 1783, value is 2425 ***End*** 20 Delete key is 1593 ***End*** 21 Delete key is 1569 ***End*** 22 Delete key is 1578 ***End*** 23 Delete key is 41 ***End*** 24 Insert key is 2214, value is 1613 ***End*** 25 Delete key is 1668 ***End*** 26 Insert key is 22
JOJ Answer
0 ***End*** 1 ***End*** 2 ***End*** 3 ***End*** 4 ***End*** 5 ***End*** 6 ***End*** 7 ***End*** 8 ***End*** 9 ***End*** 10 ***End*** 11 ***End*** 12 ***End*** 13 ***End*** 14 ***End*** 15 ***End*** 16 ***End*** 17 ***End*** 18 ***End*** 19 ***End*** 20 ***End*** 21 ***End*** 22 ***End*** 23 ***End*** 24 ***End*** 25 ***End*** 26 ***End*** 27 ***End*** 28 ***End*** 29 ***End*** 30 ***End*** 31 ***End*** 32 ***End*** 33 ***End*** 34 ***End*** 35 ***End*** 36 ***End*** 37 ***End*** 38 ***End*** 39 ***End*** 40 ***End*** 41 ***End*** 42 ***End*** 43 ***End*** 44 ***End*** 45 ***End*** 46 ***End*** 47 ***End*** 48 ***End*** 49 ***End*** 50 ***End*** 51 ***End*** 52 ***End*** 53 ***End*** 54 ***End*** 55 ***End*** 56 ***End*** 57 ***End*** 58 ***End*** 59 ***End*** 60 ***End*** 61 ***End*** 62 ***End*** 63 ***End*** 64 ***End*** 65 ***End*** 66 ***End*** 67 ***End*** 68 ***End*** 69 ***End*** 70 ***End*** 71 ***End*** 72 ***End*** 73 ***End*** 74 ***End*** 75 ***End*** 76 ***End*** 77 ***End*** 78 ***End*** 79 ***E