庭園 3 (Garden 3)
Unrated
日本語
Language
Contribute a translation- Time limit
- 4000 ms
- Memory limit
- 1024 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
3 3 5 10 3 3 1 1 5 1 3 1 2 7 1 3 3 3 4 1 1 1 2 12 3 3 3 3 6
Sample output 1
0 1 1 6 9
Sample input 2
9 1 5 1 3 3 1 1 4 5 8 1 1 1 3 5 1 1 3 8 8 1 1 4 8 9 1 1 5
Sample output 2
1 6 6 6 7
Sample input 3
4596 9794 15 141929907 600 3070 2222 8763 472026497 47 2644 3276 6033 930213777 638 945 304 1100 992702990 370 2211 2178 2977 783902937 277 2601 1559 8989 842013671 566 3272 3124 8456 254633541 91 4241 2655 8035 303526265 1342 3662 3909 7175 685435928 1176 4012 2827 8429 614977118 255 2461 1482 5835 794902067 982 2314 941 3952 342731056 1603 2215 6730 7105 332440107 2301 4568 6898 9561 591652619 124 2097 3520 8882 168525684 1845 3599 5592 7145 555656973
Sample output 3
16165282 19783008 25583040 25583040 26266464 28021036 36437770 36437770 36437770 36437770 36437770 36437770 41864676 41864676 41864676
Notes
JOI 2025/2026 庭園 3 · JCIOI · CC BY-SA 4.0
Tags
No tags yet