codeforces-scrape

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

1627.md (4390B)


      1 Source: https://codeforces.com/blog/entry/99067
      2 
      3 Thank you for participating in our contest! We hope you enjoyed it.
      4 
      5 [1627A - Not Shading](/contest/1627/problem/A "Codeforces Round 766 (Div. 2)")
      6 
      7 **Hint 1**
      8 
      9 When is the answer $-1$? When is the answer $0$? When is the answer $1$?
     10 
     11 **Hint 2**
     12 
     13 Can you do all remaining cases in $2$ steps?
     14 
     15 **Solution**
     16 
     17 Tutorial is loading...
     18 
     19 **Implementation (C++)**
     20 
     21 [142882991](/contest/1627/submission/142882991 "Submission 142882991 by flamestorm")
     22 
     23 **Implementation (Java)**
     24 
     25 [142882684](/contest/1627/submission/142882684 "Submission 142882684 by fishy15")
     26 
     27 **Implementation (Python)**
     28 
     29 [142882963](/contest/1627/submission/142882963 "Submission 142882963 by manish.17")
     30 
     31 **Video Editorial**
     32 
     33 <https://www.youtube.com/watch?v=j_oe8DA4hhM>
     34 
     35 [1627B - Not Sitting](/contest/1627/problem/B "Codeforces Round 766 (Div. 2)")
     36 
     37 **Hint**
     38 
     39 If the classroom was one-dimensional, i.e. $n = 1$, where would the best place for Tina to sit be?
     40 
     41 **Hint Solution**
     42 
     43 The best place for Tina to sit a grid where $n = 1$ would be either $(1, 1)$, or $(1, m)$.
     44 
     45 **Solution**
     46 
     47 Tutorial is loading...
     48 
     49 **Implementation (C++)**
     50 
     51 [142882828](/contest/1627/submission/142882828 "Submission 142882828 by ScarletS")
     52 
     53 **Implementation (Java)**
     54 
     55 [142882836](/contest/1627/submission/142882836 "Submission 142882836 by fishy15")
     56 
     57 **Implementation (Python)**
     58 
     59 [142883072](/contest/1627/submission/142883072 "Submission 142883072 by manish.17")
     60 
     61 **Video Editorial**
     62 
     63 <https://www.youtube.com/watch?v=rwSzE-V-2V4>
     64 
     65 [1627C - Not Assigning](/contest/1627/problem/C "Codeforces Round 766 (Div. 2)")
     66 
     67 **Hint**
     68 
     69 When does a valid assignment not exist?
     70 
     71 **Solution**
     72 
     73 Tutorial is loading...
     74 
     75 **Implementation (C++)**
     76 
     77 [142882592](/contest/1627/submission/142882592 "Submission 142882592 by saarang")
     78 
     79 **Implementation (Java)**
     80 
     81 [142882888](/contest/1627/submission/142882888 "Submission 142882888 by fishy15")
     82 
     83 **Implementation (Python)**
     84 
     85 [142883185](/contest/1627/submission/142883185 "Submission 142883185 by manish.17")
     86 
     87 **Video Editorial**
     88 
     89 <https://www.youtube.com/watch?v=0TigYx222pY>
     90 
     91 [1627D - Not Adding](/contest/1627/problem/D "Codeforces Round 766 (Div. 2)")
     92 
     93 **Hint**
     94 
     95 After applying operations, all elements in the array will be between $1$ and $A$ inclusive, where $A$ is the maximum element of the initial array.
     96 
     97 **Solution**
     98 
     99 Tutorial is loading...
    100 
    101 **Implementation (C++)**
    102 
    103 [142883054](/contest/1627/submission/142883054 "Submission 142883054 by saarang")
    104 
    105 **Implementation (Java)**
    106 
    107 [142882944](/contest/1627/submission/142882944 "Submission 142882944 by fishy15")
    108 
    109 **Implementation (Python)**
    110 
    111 [142883356](/contest/1627/submission/142883356 "Submission 142883356 by manish.17")
    112 
    113 **Video Editorial**
    114 
    115 <https://www.youtube.com/watch?v=VdbUkNgjiy0>
    116 
    117 [1627E - Not Escaping](/contest/1627/problem/E "Codeforces Round 766 (Div. 2)")
    118 
    119 **Hint**
    120 
    121 Try solving for $n, m, k \le 1000$.
    122 
    123 **Hint 2**
    124 
    125 Do we need to account for all $n \cdot m$ rooms?
    126 
    127 **Hint 3**
    128 
    129 Solve for each row independently.
    130 
    131 **Solution**
    132 
    133 Tutorial is loading...
    134 
    135 **Implementation (C++)**
    136 
    137 [142882988](/contest/1627/submission/142882988 "Submission 142882988 by ScarletS")
    138 
    139 **Implementation (Java)**
    140 
    141 [142883027](/contest/1627/submission/142883027 "Submission 142883027 by fishy15")
    142 
    143 **Implementation (Python)**
    144 
    145 [142883485](/contest/1627/submission/142883485 "Submission 142883485 by manish.17")
    146 
    147 [1627F - Not Splitting](/contest/1627/problem/F "Codeforces Round 766 (Div. 2)")
    148 
    149 **Hint 1**
    150 
    151 What can you say about all valid cuts?
    152 
    153 **Hint 2**
    154 
    155 The cuts are rotationally symmetric about the center. How do we find the cut that breaks the fewest edges?
    156 
    157 **Hint 3**
    158 
    159 Shortest paths.
    160 
    161 **Solution**
    162 
    163 Tutorial is loading...
    164 
    165 **Implementation (C++)**
    166 
    167 [142882843](/contest/1627/submission/142882843 "Submission 142882843 by flamestorm")
    168 
    169 **Implementation (Java)**
    170 
    171 [142883089](/contest/1627/submission/142883089 "Submission 142883089 by fishy15")
    172 
    173 **Implementation (Python)**
    174 
    175 [142883580](/contest/1627/submission/142883580 "Submission 142883580 by manish.17")
    176 
    177 **Author Notes**
    178 
    179 The problem was originally written as problem E, with a harder F, but we decided that the other F was too hard and moved this problem to F.
    180 
    181 Sorry for the statement of the problem initially. It was correct throughout testing, but during translation it seems that it might have been changed from subsequence to subarray accidentally.