# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
431273 | 2021-06-17T10:39:19 Z | faresbasbs | 운세 보기 2 (JOI14_fortune_telling2) | C++14 | 3000 ms | 452 KB |
#include <bits/stdc++.h> #pragma GCC optimization ("Ofast") #pragma GCC target ("avx2") using namespace std; int n,k,a[40001],b[40001]; int main(){ cin >> n >> k; for(int i = 1 ; i <= n ; i += 1){ cin >> a[i] >> b[i]; } for(int i = 1 ; i <= k ; i++){ int f; cin >> f; for(int j = 1 ; j <= n ; j++){ if(a[j] <= f){ swap(a[j],b[j]); } } } long long ans = 0; for(int i = 1 ; i <= n ; i += 1){ ans += a[i]; } cout << ans << endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 4 ms | 204 KB | Output is correct |
3 | Correct | 6 ms | 316 KB | Output is correct |
4 | Correct | 5 ms | 204 KB | Output is correct |
5 | Correct | 6 ms | 204 KB | Output is correct |
6 | Correct | 5 ms | 304 KB | Output is correct |
7 | Correct | 5 ms | 204 KB | Output is correct |
8 | Correct | 4 ms | 204 KB | Output is correct |
9 | Correct | 3 ms | 204 KB | Output is correct |
10 | Correct | 2 ms | 204 KB | Output is correct |
11 | Correct | 5 ms | 308 KB | Output is correct |
12 | Correct | 4 ms | 204 KB | Output is correct |
13 | Correct | 5 ms | 204 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 4 ms | 204 KB | Output is correct |
3 | Correct | 6 ms | 316 KB | Output is correct |
4 | Correct | 5 ms | 204 KB | Output is correct |
5 | Correct | 6 ms | 204 KB | Output is correct |
6 | Correct | 5 ms | 304 KB | Output is correct |
7 | Correct | 5 ms | 204 KB | Output is correct |
8 | Correct | 4 ms | 204 KB | Output is correct |
9 | Correct | 3 ms | 204 KB | Output is correct |
10 | Correct | 2 ms | 204 KB | Output is correct |
11 | Correct | 5 ms | 308 KB | Output is correct |
12 | Correct | 4 ms | 204 KB | Output is correct |
13 | Correct | 5 ms | 204 KB | Output is correct |
14 | Correct | 374 ms | 364 KB | Output is correct |
15 | Correct | 1438 ms | 428 KB | Output is correct |
16 | Execution timed out | 3092 ms | 452 KB | Time limit exceeded |
17 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 4 ms | 204 KB | Output is correct |
3 | Correct | 6 ms | 316 KB | Output is correct |
4 | Correct | 5 ms | 204 KB | Output is correct |
5 | Correct | 6 ms | 204 KB | Output is correct |
6 | Correct | 5 ms | 304 KB | Output is correct |
7 | Correct | 5 ms | 204 KB | Output is correct |
8 | Correct | 4 ms | 204 KB | Output is correct |
9 | Correct | 3 ms | 204 KB | Output is correct |
10 | Correct | 2 ms | 204 KB | Output is correct |
11 | Correct | 5 ms | 308 KB | Output is correct |
12 | Correct | 4 ms | 204 KB | Output is correct |
13 | Correct | 5 ms | 204 KB | Output is correct |
14 | Correct | 374 ms | 364 KB | Output is correct |
15 | Correct | 1438 ms | 428 KB | Output is correct |
16 | Execution timed out | 3092 ms | 452 KB | Time limit exceeded |
17 | Halted | 0 ms | 0 KB | - |