Does anyone know the live standings of IZhO 2022?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
4 | atcoder_official | 161 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Does anyone know the live standings of IZhO 2022?
Can anyone solve this? Problem G
Can anyone solve this?
You are given array a1...n. We want to make a zero-array(array consisting only of zeroes) from it. You have 3 buttons:
1-button) Take an element ai, replace it with integer x such that |x−ai|≤1. The cost of using this button is 1 gold. 2-button) Take a range [l…r], increase all elements in this range by 1. The cost of using this button is X gold. 3-button) Take a range [l…r], decrease all elements in this range by 1. The cost of using this button is X gold. Find the minimum total gold to achieve zero-array. Input The first line contains two numbers n and X (1≤X≤n≤1000000).
The second line contains n numbers a1,a2,…,an(1≤ai≤1000000000) — array a.
Output Print a single integer — the minimum amount of gold to reach the zero-array.
Hi guys. Let's discuss this problem:
An array is good if the maximum element is no longer than the length.
The cost of the array is the length squared.
Divide the given array into several disjoint continuous parts so that each part is good and the total cost of all parts is the lowest possible.
Input In the first line, the positive integer n (1≤n≤100000) — the size of the array.
The next line contains n integers a1,a2,…,an(1≤ai≤n) Output Print the minimum possible total cost of all parts.
Hi guys. Let's discuss IOI 2019 practice problems. How to solve second problem "Job Scheduling" ?
Название |
---|