코딩 테스트 세트
Time Limit: 1 SecMemory Limit: 1024 MiB
Example Input 1
3 3
2 2 1 1 3
39 31 97 95 24
1000 1000 1000 1000 1000
Example Output 1
3
70
1666
Example Input 2
5 4
60 45 64 92 79 59 17 79 23
79 86 16 69 56 43 30 65 87
60 37 15 77 55 28 58 71 71
61 82 52 77 72 26 83 44 76
Example Output 2
89
106
90
114
Language-Specific Restrictions
© 2023-2025. All rights reserved.
Powered by @Rn
logo