Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
# | User | Rating |
---|---|---|
1 | jiangly | 3677 |
2 | Benq | 3601 |
3 | ecnerwala | 3542 |
4 | maroonrk | 3540 |
5 | cnnfls_csy | 3539 |
6 | orzdevinwang | 3493 |
7 | inaFSTream | 3478 |
8 | Um_nik | 3430 |
9 | Rebelz | 3409 |
10 | Geothermal | 3408 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 174 |
2 | adamant | 164 |
3 | awoo | 162 |
4 | TheScrasse | 161 |
4 | SecondThread | 161 |
6 | nor | 159 |
7 | maroonrk | 158 |
8 | Um_nik | 156 |
9 | BledDest | 145 |
9 | Geothermal | 145 |
Name |
---|
Solution of G with maxflow idea.
http://codeforces.com/contest/978/submission/38193150
Nice!
I also solve it with maxflow like an assignment problem. 38199894
What's the time complexity of your solution?
doesn't matter dude! his sol is over-kill for this problem. just assign days greedily. Whichever exam comes first gets preparation day first.
Very fast! Thank you
Thanks for quick explanation. Is there any solution which works faster than "brute solution" for problem D?
Faster than O(n)? I think, no.
For G you don't need to iterate all the exams every day.
38195700 complexity is O(n*logm) insted of O(n*m)
Excellent thanks for posting
I might be a little late but can you please explain your logic ?
A simple way of understanding 978E - Система видеонаблюдения в автобусе:
Define pre[i] =
Let's take an arbitrary variable initial which could hold all possible initial values.
It is easy to see this inequality holds true:
0 ≤ initial + pre[i] ≤ w,
Which implies:
- pre[i] ≤ initial ≤ w - pre[i]
We can reduce this to:
max(0, - pre[i]) ≤ initial ≤ min(w, w - pre[i])
Solving this inequality and finding the range gives us the final answer.
For F instead of using vectors with quarrels another nice way is to process the quarrels by incrementing an array containing the "number of quarrels with less skilled programmers". Then we can just directly subtract the number in that array at the end.
My solution 38178463 to problem 978E - Система видеонаблюдения в автобусе is O(n).
My solution 38166452 to problem 978B - Имя файла was similar to the one in the tutorial, but easiest, it's how many ocurrences have the string "xxx" in the string s.
fcspartakm I think there was a typo in the tutorial of problem F: "we can user array of pairs" for "we can use array of pairs".
Regexp solution is very easy to write for B :P