Submission #2703550
Source Code Expand
N, K = map(int, input().split()) a = list(map(int, input().split())) a = sorted(a) ans = N t = 0 for i in range(N-1, -1, -1) : if t+a[i] < K : t += a[i] else : ans = min(ans, i) print(ans)
Submission Info
Submission Time | |
---|---|
Task | C - Go Home |
User | ks_y_sk |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 230 Byte |
Status | CE |
Compile Error
./Main.cpp:1:1: error: ‘N’ does not name a type N, K = map(int, input().split()) ^