# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
62033 | 2018-07-27T09:23:43 Z | mahmoudbadawy | 운세 보기 2 (JOI14_fortune_telling2) | C++17 | 3000 ms | 808 KB |
#include <bits/stdc++.h> using namespace std; const int N=200005; int a[N],b[N]; int n,k; int main() { scanf("%d %d",&n,&k); for(int i=0;i<n;i++) scanf("%d %d",&a[i],&b[i]); for(int i=0;i<k;i++) { int x; scanf("%d",&x); for(int j=0;j<n;j++) if(a[j]<=x) swap(a[j],b[j]); } long long sum=0; for(int i=0;i<n;i++) sum+=a[i]; cout << sum << endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 128 KB | Output is correct |
2 | Correct | 6 ms | 248 KB | Output is correct |
3 | Correct | 7 ms | 324 KB | Output is correct |
4 | Correct | 7 ms | 528 KB | Output is correct |
5 | Correct | 7 ms | 528 KB | Output is correct |
6 | Correct | 7 ms | 528 KB | Output is correct |
7 | Correct | 7 ms | 528 KB | Output is correct |
8 | Correct | 6 ms | 552 KB | Output is correct |
9 | Correct | 4 ms | 552 KB | Output is correct |
10 | Correct | 4 ms | 552 KB | Output is correct |
11 | Correct | 7 ms | 552 KB | Output is correct |
12 | Correct | 6 ms | 552 KB | Output is correct |
13 | Correct | 7 ms | 552 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 128 KB | Output is correct |
2 | Correct | 6 ms | 248 KB | Output is correct |
3 | Correct | 7 ms | 324 KB | Output is correct |
4 | Correct | 7 ms | 528 KB | Output is correct |
5 | Correct | 7 ms | 528 KB | Output is correct |
6 | Correct | 7 ms | 528 KB | Output is correct |
7 | Correct | 7 ms | 528 KB | Output is correct |
8 | Correct | 6 ms | 552 KB | Output is correct |
9 | Correct | 4 ms | 552 KB | Output is correct |
10 | Correct | 4 ms | 552 KB | Output is correct |
11 | Correct | 7 ms | 552 KB | Output is correct |
12 | Correct | 6 ms | 552 KB | Output is correct |
13 | Correct | 7 ms | 552 KB | Output is correct |
14 | Correct | 412 ms | 552 KB | Output is correct |
15 | Correct | 1544 ms | 808 KB | Output is correct |
16 | Execution timed out | 3024 ms | 808 KB | Time limit exceeded |
17 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 128 KB | Output is correct |
2 | Correct | 6 ms | 248 KB | Output is correct |
3 | Correct | 7 ms | 324 KB | Output is correct |
4 | Correct | 7 ms | 528 KB | Output is correct |
5 | Correct | 7 ms | 528 KB | Output is correct |
6 | Correct | 7 ms | 528 KB | Output is correct |
7 | Correct | 7 ms | 528 KB | Output is correct |
8 | Correct | 6 ms | 552 KB | Output is correct |
9 | Correct | 4 ms | 552 KB | Output is correct |
10 | Correct | 4 ms | 552 KB | Output is correct |
11 | Correct | 7 ms | 552 KB | Output is correct |
12 | Correct | 6 ms | 552 KB | Output is correct |
13 | Correct | 7 ms | 552 KB | Output is correct |
14 | Correct | 412 ms | 552 KB | Output is correct |
15 | Correct | 1544 ms | 808 KB | Output is correct |
16 | Execution timed out | 3024 ms | 808 KB | Time limit exceeded |
17 | Halted | 0 ms | 0 KB | - |