# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
link to question — https://www.codechef.com/problems/CHEFINV
MY APPROACH -
using a mergesort tree
find swaps decreased and increased for A[L] due to L-R
find swaps decreased and increased for A[R] due to L-R
calculate answer
complexity — Mlog^n?
my code — https://ideone.com/tgs2nU
i also tried testing my code against one of the AC codes still couldnt find my mistake. any help would be appreciated!
https://cses.fi/problemset/task/1684 => GIANT PIZZA
I cannot understand how to proceed with this question. Any help will be appreciated.
https://cses.fi/problemset/task/1160
can someone please help me in this question?
I am not getting any ideas as to how i should proceed...
question — Kuroni and Cowsheds
link to question — https://www.codechef.com/LTIME85A/problems/COWSHEDS
can someone please explain the solution?
I couldnt do better than Q*N basically go L to R + dsu
We can rotate a string any number of times
We need to find the minimum possible string lexicographically.
E.g. inp — BCABDADAB op — ABBCABDAD
This is doable by Booth's algorithm in O(n).
I couldnt quite understand the way it is being done...can someone please help?
my code click here im getting runtime error (SIGSEGV) on 11th testcase..why? i have also increased the SIZE significantly as people were saying in the comment section that its more than 10^5.. i dont see a reason for long long as well in the question.. can someone please help??
but that isnt my doubt
so sum of all coprime numbers with n upto n = sum of all numbers part of phi(n) = phi(n)*(n/2)
i wrote the code for it.. apparently my function where i do the above computation was erroneous..
i tried stresstesting...here is my codee
its not giving correct anwer from around 1650... can someone please help? my functionname is phifunc editorial is phi
(P.S. i know that using sieve its n loglog n but both the editorial and my solution are sqrt n to it)
Name |
---|