i submitted a solution to this question, but i cant understand why i am getting error. here's my code: http://mirror.codeforces.com/contest/598/submission/14241094 any help will be appreciated.
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | adamant | 152 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 144 |
| 5 | errorgorn | 141 |
| 6 | cry | 139 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
i submitted a solution to this question, but i cant understand why i am getting error. here's my code: http://mirror.codeforces.com/contest/598/submission/14241094 any help will be appreciated.
| Name |
|---|



would be much better if u just placed a submition :/ this is ugly i dont think any body can read :)
my submission id is #14241094. how can i place a submit here?
chose submition item from the bar
also give me a good reason why it shouldnt get tl :)
think the querries are all like this
l = 1 , r = n , k = n — 1
|s| <= 10 000; m <= 300
i think it's n ^ 2 * m coz i think getting a substr is o(n) right ? then it would be m * (k % n) * o(n) = o(m * n2 )
my solution passed 14 test cases and is getting timed out in test case #15. i think i have taken the constraints in consideration.
instead of changing the string one by one do this : take the last k elements and put it at the front and then the others after it it would be O(nm)
can you please give me a pseudo code. am unable to comprehend your statement
sure !
14229742
thanks man!
yw