codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

838.md (1108B)


      1 Source: https://codeforces.com/blog/entry/53736
      2 
      3 Hi!
      4 
      5 # Hints
      6 
      7 **A**: Let *Cost*(*k*) the answer if we compress the image with *k*, find *min* *Cost*(*k*).
      8 
      9 **B**: Solve the problem without first query.
     10 
     11 **C**: Let the frequencies of the characters be *a*1, *a*2, ..., *a**k*. Alice loses if and only if ![](https://espresso.codeforces.com/87a044b9d58a62a9dfe8b8482a252bce9eecfb12.png) is odd and *n* is even.
     12 
     13 **D**: Consider adding an extra seat, and the plane is now circular.
     14 
     15 **E**: Let *dp**i*, *j* be the longest path given that we've included segment *i*, *j* in our solution, and we are only considering points to the right of ray *i*, *j* (so *dp**i*, *j* and *dp**j*, *i* may be different).
     16 
     17 **F**: We want to compute *dp**i*, *j*: expected value given we have seen *i* red balls and *j* black balls.
     18 
     19 # Solutions
     20 
     21 Tutorial is loading...
     22 
     23 Tutorial is loading...
     24 
     25 Tutorial is loading...
     26 
     27 Tutorial is loading...
     28 
     29 Tutorial is loading...
     30 
     31 Tutorial is loading...
     32 
     33 [Codes here](https://mega.nz/#F!jlYzSTqL!VzNzR-ZzkeswalgrELuGcQ).
     34 
     35 **P.S.** Please notify me if there are any problems.