cf/mirror

Lucky Array

CF
121E2400· grandmaster4s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3 6
2 3 4
count 1 3
count 1 2
add 1 3 2
count 1 3
add 2 3 3
count 1 3
Output
1
0
1
1
Sample 2of 2
Input
4 5
4 4 4 4
count 1 4
add 1 4 3
count 1 4
add 2 3 40
count 1 4
Output
4
4
4
121E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)