Skip to content

Commit 1c93c05

Browse files
authored
Merge branch 'Yawn-Sean:main' into main
2 parents ddf0e83 + dccb512 commit 1c93c05

File tree

1,373 files changed

+61368
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,373 files changed

+61368
-11
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
- Remember to name your submission code file `${problem_code}_{your_name}.{py/cpp/...}`.
1616

17+
- Also, when creating a pull request, please title it `${YYYYMMDD} ${INFO}`.
18+
1719
## Statistics
1820

1921
Here are the current statistics of submissions: [Link](https://yawn-sean.github.io/Daily_CF_Problems/#).
@@ -22,5 +24,5 @@ Here are the current statistics of submissions: [Link](https://yawn-sean.github.
2224

2325
| Difficulty | Problems | Hints | Solution |
2426
| -------- | -------- | -------- | -------- |
25-
| 1500 | [CF891A](https://codeforces.com/problemset/problem/891/A) | You need the first $1$ , and then you can make all the others $1$ . | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0328/solution/cf891a.md) |
26-
| 2100 | [CF1163D](https://codeforces.com/problemset/problem/1163/D) | DP-problem. Think about the status. You don't need the time complexity to be that low. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0328/solution/cf1163d.md) |
27+
| 1600 | [CF1029C](https://codeforces.com/problemset/problem/1029/C) | It's always easier to consider the intersection when you add a segment instead of deleting it. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0426/solution/cf1029c.md) |
28+
| 2100 | [CF1525E](https://codeforces.com/problemset/problem/1525/E) | The conditions for a unlit city is much simpler. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0426/solution/cf1525e.md) |

categories/DP.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22
| -------- | -------- | -------- | -------- |
33
| 1500 | [CF566F](https://codeforces.com/problemset/problem/566/F) | Find out what happens inside a clique, and try using DP to capture it. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0322/solution/cf566f.md) |
44
| 1600 | [CF788A](https://codeforces.com/problemset/problem/788/A) | $a[i]-a[i+1]$ doesn't really matter. How can you use DP to solve a segment-sum-maximum problem? This is similar. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0314/solution/cf788a.md) |
5+
| 1700 | [CF1592C](https://codeforces.com/problemset/problem/1592/C) | The xor-sum of every connected component is fixed. Use this fact. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0411/solution/cf1592c.md) |
56
| 1800 | [CF1083A](https://codeforces.com/problemset/problem/1083/A) | Classic way of thinking a path on the tree: fix the important point. Then consider your DP |[Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0305/solution/cf1083a.md) |
7+
| 1800 | [CF933A](https://codeforces.com/problemset/problem/933/A) | The array only consists of $2$ numbers. Try to find the original structure of the subsequence before reversion | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0415/solution/cf933a.md) |
68
| 2000 | [CF621E](https://codeforces.com/problemset/problem/621/E) | How does the status change after using each block? How to process them quickly? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0306/solution/cf621e.md) |
79
| 2000 | [CF571B](https://codeforces.com/problemset/problem/571/B) | Group the elements, and minimize the sum inside. Design the final DP and control the complexity. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0320/solution/cf571b.md) |
10+
| 2000 | [CF852B](https://codeforces.com/problemset/problem/852/B) | The middle layers are pretty similar. Try solve them first. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0404/solution/cf852b.md) |
11+
| 2000 | [CF1102F](https://codeforces.com/problemset/problem/1102/F) | We only need to consider the order of rows. And we only care about the consecutive rows. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0410/solution/cf1102f.md) |
12+
| 2000 | [CF1010D](https://codeforces.com/problemset/problem/1010/D) | You can find the value first, and then try to figure out which leaves change the answer. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0418/solution/cf1010d.md) |
813
| 2100 | [CF1152D](https://codeforces.com/problemset/problem/1152/D) | Try solving the problem in a smaller tree. What information should be necessary for your DP function? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/02/0228/solution/cf1152d.md) |
914
| 2100 | [CF1163D](https://codeforces.com/problemset/problem/1163/D) | DP-problem. Think about the status. You don't need the time complexity to be that low. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0328/solution/cf1163d.md) |
15+
| 2100 | [CF1201D](https://codeforces.com/problemset/problem/1201/D) | Write a basic DP first. How can you optimize it? Is there any unnecessary status? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0413/solution/cf1201d.md) |
1016
| 2200 | [CF1149B](https://codeforces.com/problemset/problem/1149/B) | Dynamic programming. Solve each query independently first, and then find out how to update the process to complete optimization. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/02/0226/solution/cf1149b.md) |
1117
| 2200 | [CF855E](https://codeforces.com/problemset/problem/855/E) | Classic digit DP. What information should you store to speed up the solution. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0307/solution/cf855e.md) |
18+
| 2200 | [CF743E](https://codeforces.com/problemset/problem/743/E) | We have a limited number of different numbers, so use it in your DP. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0329/solution/cf743e.md) |
19+
| 2400 | [CF744C](https://codeforces.com/problemset/problem/744/C) | Notice that the token spent can't vary too much. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0330/solution/cf744c.md) |

categories/binary_search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
| Difficulty | Problems | Hints | Solution |
22
| -------- | -------- | -------- | -------- |
33
| 1600 | [CF780B](https://codeforces.com/problemset/problem/780/B) | Classic problem. How can you check whether they can gather or not? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0311/solution/cf780b.md) |
4+
| 1800 | [CF492D](https://codeforces.com/problemset/problem/492/D) | Instead of finding the answer directly, you can try finding out when the last hit was made and then check which character made it. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0408/solution/cf492d.md) |
5+
| 1800 | [CF645D](https://codeforces.com/problemset/problem/645/D) | Once the order is decided, it can not be changed. It means something. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0422/solution/cf645d.md) |
6+
| 1900 | [CF739B](https://codeforces.com/problemset/problem/739/B) | The controlling points clearly form a segment in the tree. You just need to find the endpoint. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0402/solution/cf739b.md) |
7+
| 1900 | [CF613B](https://codeforces.com/problemset/problem/613/B) | When considering a function with $2$ variables, fix one first. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0409/solution/cf613b.md) |
8+
| 2000 | [CF749D](https://codeforces.com/problemset/problem/749/D) | What happens before the price is settled? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0424/solution/cf749d.md) |
49
| 2100 | [CF1039B](https://codeforces.com/problemset/problem/1039/B) | It seems like a binary search problem. Why it fails? And what can you do to make up with so many queries? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/02/0227/solution/cf1039b.md) |
510
| 2100 | [CF166B](https://codeforces.com/problemset/problem/166/B) | How to decide a point is inside a convex hull? What about many points? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0313/solution/cf166b.md) |
611
| 2200 | [CF1153E](https://codeforces.com/problemset/problem/1153/E) | We only care about the head and the tail, so how can we tell if they are in the rectangle chosen or not? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0322/solution/cf1153e.md) |

categories/bitmask.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
| Difficulty | Problems | Hints | Solution |
22
| -------- | -------- | -------- | -------- |
3-
| 2200 | [CF855E](https://codeforces.com/problemset/problem/855/E) | Classic digit DP. What information should you store to speed up the solution. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0307/solution/cf855e.md) |
3+
| 1600 | [CF1045I](https://codeforces.com/problemset/problem/1045/I) | Check the conditions of "constructing" a palindrome. Find a way to store the information. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0329/solution/cf1045i.md) |
4+
| 1700 | [CF1592C](https://codeforces.com/problemset/problem/1592/C) | The xor-sum of every connected component is fixed. Use this fact. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0411/solution/cf1592c.md) |
5+
| 1900 | [CF558C](https://codeforces.com/problemset/problem/558/C) | Consider how the binary representation of number changes. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0416/solution/cf558c.md) |
6+
| 2000 | [CF870D](https://codeforces.com/problemset/problem/870/D) | Another brain teaser. Why do you only need $2n$ queries while the answer can't be fully determined? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0403/solution/cf870d.md) |
7+
| 2000 | [CF1102F](https://codeforces.com/problemset/problem/1102/F) | We only need to consider the order of rows. And we only care about the consecutive rows. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0410/solution/cf1102f.md) |
8+
| 2200 | [CF1615D](https://codeforces.com/problemset/problem/1615/D) | How can you calculate the xor-sum of a path on the tree? Then, what kind of information does the conditions offer you? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0420/solution/cf1615d.md) |
9+
| 2200 | [CF855E](https://codeforces.com/problemset/problem/855/E) | Classic digit DP. What information should you store to speed up the solution? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0307/solution/cf855e.md) |
10+
| 2200 | [CF743E](https://codeforces.com/problemset/problem/743/E) | We have a limited number of different numbers, so use it in your DP. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0329/solution/cf743e.md) |
11+
| 2200 | [CF946E](https://codeforces.com/problemset/problem/946/E) | Easy greedy problem. Notice that you can use any digit after the first different character. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0406/solution/cf946e.md) |
12+
| 2400 | [CF744C](https://codeforces.com/problemset/problem/744/C) | Notice that the token spent can't vary too much. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0330/solution/cf744c.md) |

categories/brain_teaser.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
| Difficulty | Problems | Hints | Solution |
22
| -------- | -------- | -------- | -------- |
3+
| 1600 | [CF444A](https://codeforces.com/problemset/problem/444/A) | Maximization: if you adjust your answer slightly, it is no way that the answer gets better. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0405/solution/cf444a.md) |
4+
| 1700 | [CF457A](https://codeforces.com/problemset/problem/457/A) | You should not use float numbers for this problem. How can you compare the two numbers using only integers? Minusing can help. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0403/solution/cf457a.md) |
35
| 1800 | [CF986B](https://codeforces.com/problemset/problem/986/B) | How does a swap change the property of an array? What is the difference between $3n$ and $7n+1$ ? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0325/solution/cf986b.md) |
6+
| 1800 | [CF1016D](https://codeforces.com/problemset/problem/1016/D) | Brain teaser. Two ways of thinking: What is the necessary condition? / How can you try to satisfy more conditions when you already have a partly-right result? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0401/solution/cf1016d.md) |
7+
| 2000 | [CF870D](https://codeforces.com/problemset/problem/870/D) | Another brain teaser. Why do you only need $2n$ queries while the answer can't be fully determined? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0403/solution/cf870d.md) |
8+
| 2000 | [CF1903E](https://codeforces.com/problemset/problem/1903/E) | We only care about the parity of the result. So the sum of the square of the Euclidean distance can be simplified. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0411/solution/cf1903e.md) |

categories/brute_force.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
| Difficulty | Problems | Hints | Solution |
22
| -------- | -------- | -------- | -------- |
33
| 1600 | [CF1025B](https://codeforces.com/problemset/problem/1025/B) | Hmm... At least one element of the pair. Then, which one? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0309/solution/cf1025b.md) |
4-
| 1700 | [CF1185D](https://codeforces.com/problemset/problem/1185/D) | Brain teaser actually. If it is hard to find what's not in the arithmatic progression, is it easier to find what's in it? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0308/solution/cf1185d.md) |
4+
| 1700 | [CF1185D](https://codeforces.com/problemset/problem/1185/D) | Brain teaser actually. If it is hard to find what's not in the arithmatic progression, is it easier to find what's in it? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0308/solution/cf1185d.md) |
5+
| 2000 | [CF870D](https://codeforces.com/problemset/problem/870/D) | Another brain teaser. Why do you only need $2n$ queries while the answer can't be fully determined? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0403/solution/cf870d.md) |

categories/constructive.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@
44
| 1600 | [CF1512E](https://codeforces.com/problemset/problem/1512/E) | Constructive method: find the bounds and slowly adjust your answer. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/02/0227/solution/cf1512e.md) |
55
| 1600 | [CF1098A](https://codeforces.com/problemset/problem/1098/A) | Greedy constructive problem. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0312/solution/cf1098a.md) |
66
| 1600 | [CF375A](https://codeforces.com/problemset/problem/375/A) | Note the strange constraint: its decimal representation quite luckily contains digits 1, 6, 8, 9. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0320/solution/cf375a.md) |
7+
| 1600 | [CF916C](https://codeforces.com/problemset/problem/916/C) | Fix the shape of the spanning tree. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0412/solution/cf916c.md) |
8+
| 1600 | [CF1031C](https://codeforces.com/problemset/problem/1031/C) | Estimate the upper bound first. Can it be reached? Fill up the time in one day first! | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0420/solution/cf1031c.md) |
9+
| 1700 | [CF765D](https://codeforces.com/problemset/problem/765/D) | The problem is about a graph. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0424/solution/cf765d.md) |
710
| 1800 | [CF665D](https://codeforces.com/problemset/problem/665/D) | If the subset contains more than 3 numbers, something strange happens. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0316/solution/cf665d.md) |
811
| 1800 | [CF263D](https://codeforces.com/problemset/problem/263/D) | What are the typical ways of finding cycles in a graph? Which one is appropriate? Prove it! | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0316/solution/cf263d.md) |
12+
| 1800 | [CF1016D](https://codeforces.com/problemset/problem/1016/D) | Brain teaser. Two ways of thinking: What is the necessary condition? / How can you try to satisfy more conditions when you already have a partly-right result? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0401/solution/cf1016d.md) |
13+
| 1800 | [CF1148D](https://codeforces.com/problemset/problem/1148/D) | If you want to satisfy the first condition, what should you want in a chosen pair? Group the pairs by this and try a greedy approach to construct the final answer | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0402/solution/cf1148d.md) |
14+
| 1800 | [CF301A](https://codeforces.com/problemset/problem/301/A) | What can you do with $2$ operations? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0409/solution/cf301a.md) |
15+
| 1900 | [CF226B](https://codeforces.com/problemset/problem/226/B) | Try solving the problem when each pile has only $1$ stone. What can you discover? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0408/solution/cf226b.md) |
916
| 2100 | [CF576B](https://codeforces.com/problemset/problem/576/B) | Construct a graph using the permutation. For the final tree, construct an edge first, what edges should it produce? Summarize and find the necessary conditions. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0311/solution/cf576b.md) |
1017
| 2100 | [CF226D](https://codeforces.com/problemset/problem/226/D) | If the conditions are met, what will flipping cause? What if the opposite happens? | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0312/solution/cf226d.md) |
1118
| 2100 | [CF1599H](https://codeforces.com/problemset/problem/1599/H) | Use queries to rule out the wrong points. Note that the border should contain a point in the target. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0314/solution/cf1599h.md) |
19+
| 2100 | [CF1158C](https://codeforces.com/problemset/problem/1158/C) | Fill in the blanks in a greedy order. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/04/0405/solution/cf1158c.md) |
1220
| 2200 | [CF1231E](https://codeforces.com/problemset/problem/1231/E) | Focus on those un-moved characters. | [Editorial](https://github.com/Yawn-Sean/Daily_CF_Problems/blob/main/daily_problems/2024/03/0309/solution/cf1231e.md) |

0 commit comments

Comments
 (0)