Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

Tutorial is loading...

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

1 | tourist | 3496 |

2 | moejy0viiiiiv | 3288 |

3 | W4yneb0t | 3218 |

4 | TakanashiRikka | 3178 |

5 | Petr | 3173 |

6 | dotorya | 3117 |

7 | izrak | 3109 |

7 | Um_nik | 3109 |

9 | anta | 3106 |

10 | ershov.stanislav | 3105 |

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

1 | rng_58 | 174 |

2 | csacademy | 169 |

3 | Swistakk | 160 |

4 | tourist | 157 |

5 | Petr | 156 |

6 | Errichto | 153 |

7 | Zlobober | 147 |

8 | matthew99 | 142 |

9 | Endagorion | 141 |

10 | BledDest | 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: Nov/25/2017 05:08:53 (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'.

Can anyone give me a DP solution for Problem B? Why is this approach wrong?