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 | 3265 |

3 | Um_nik | 3183 |

4 | ainta | 3174 |

5 | Radewoosh | 3163 |

6 | W4yneb0t | 3148 |

7 | LHiC | 3139 |

8 | izrak | 3109 |

9 | RomaWhite | 3053 |

10 | moejy0viiiiiv | 3051 |

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

1 | rng_58 | 180 |

2 | Errichto | 172 |

3 | Petr | 162 |

4 | csacademy | 161 |

5 | tourist | 158 |

6 | Swistakk | 155 |

7 | Zlobober | 151 |

8 | GlebsHP | 149 |

9 | zscoder | 145 |

10 | matthew99 | 140 |

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: Jun/22/2017 19:25:33 (p1).

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'.