Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

# | User | Rating |
---|---|---|

1 | tourist | 3602 |

2 | Petr | 3294 |

3 | moejy0viiiiiv | 3240 |

4 | TakanashiRikka | 3178 |

5 | W4yneb0t | 3162 |

6 | LHiC | 3149 |

7 | Um_nik | 3148 |

8 | izrak | 3109 |

9 | ershov.stanislav | 3105 |

10 | Radewoosh | 3094 |

# | User | Contrib. |
---|---|---|

1 | rng_58 | 182 |

2 | Errichto | 167 |

3 | csacademy | 166 |

4 | Petr | 162 |

5 | tourist | 157 |

6 | Swistakk | 155 |

7 | Zlobober | 147 |

8 | zscoder | 144 |

9 | matthew99 | 141 |

10 | GlebsHP | 138 |

10 | Radewoosh | 138 |

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial of Educational Codeforces Round 19

↑

↓

Codeforces (c) Copyright 2010-2017 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/24/2017 09:41:15 (c2).

Desktop version, switch to mobile version.

User lists

Name |
---|

Can't understand C's explanation.

Alternately F can be solved with Divide and Conquer Optimisation as well.

I seem to get TLE with Divide and Conquer Optimization , was any pruning required to pass the time limit ?

It's Complexity O(n^2logn)?

Problem E can also be solved offline with an O(n) memory complexity, by sorting the queries w.r.t k and solving all queries with the same k together using dynamic programming.

Intuitions about the time complexity:I don't know exactly how to calculate a generalized upper bound for the time complexity, but I had the intuition that it would fit in time using this approach

Implementation:26497630(1/2 + 1/3 + 1/4 + ... + 1/n) = O(logn)

Oh yes you're right, it's logn. I got confused about it. Thanks.

dropped

Note, it's order.

Hint for proof:

I didn't learn integrals in school yet. But I could see that your formula is not correct:

Seems that functions are crossing and lying nearby but not equal.

click

Actually, it's not . And you can see that the difference between (a.k.a harmonic number) and go smaller as n go bigger. It will eventually equal 0 when n big enough. Furthermore, is smaller than and as we can ignore constant, we can say it's O(logn)

Thank you, I thought

`log`

always means`log2`

in informatics, not`ln`

.But the time is worse than using sqrt precalculation..

Look, if all k will be different your code will make this Q times:

`memset(dp, -1, sizeof(dp));`

It is optimized of course but making your complexity bigger.can anyone please explain Problem c editorial

I understand that this contest is quite old but 797C - Minimal string has a typo and says "lexigraphically" instead of "lexicographically". I'm not sure if this is correct way to report typos but don't see any other.

Fixed, thanks.

In Problem C's solution, instead of — 'any letter left in string s' in

"Pop letters from the top of stack and push them to answer while they are less or equal than any letter left in string s."

It should be --- 'while they are less or equal than all the letters left in string s'.