# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
20476 | 2017-02-12T02:35:37 Z | 책상다리황새두렁넘기(#60, khsoo01) | 복불복 (OJUZ11_luck) | C++11 | 1000 ms | 2020 KB |
#include<bits/stdc++.h> using namespace std; int n, k, a[105], b[105], per[105], ans; int main() { scanf("%d%d",&n,&k); for(int i=1;i<=n;i++) { scanf("%d",&a[i]); } for(int i=1;i<=n;i++) { scanf("%d",&b[i]); } sort(a+1, a+1+n); reverse(a+1, a+1+n); for(int i=1;i<=n;i++) per[i] = i; do { int flag = 1; for(int i=1;i<=k;i++) { for(int j=k+1;j<=n;j++) { if(a[i]+b[per[i]] < a[j]+b[per[j]]) { flag = 0; break; } } if(!flag) break; } ans += flag; } while(next_permutation(per+1, per+1+n)); printf("%d\n",ans); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2020 KB | Output is correct |
2 | Correct | 0 ms | 2020 KB | Output is correct |
3 | Correct | 0 ms | 2020 KB | Output is correct |
4 | Correct | 0 ms | 2020 KB | Output is correct |
5 | Correct | 0 ms | 2020 KB | Output is correct |
6 | Correct | 0 ms | 2020 KB | Output is correct |
7 | Correct | 0 ms | 2020 KB | Output is correct |
8 | Correct | 0 ms | 2020 KB | Output is correct |
9 | Correct | 0 ms | 2020 KB | Output is correct |
10 | Correct | 0 ms | 2020 KB | Output is correct |
11 | Correct | 0 ms | 2020 KB | Output is correct |
12 | Correct | 0 ms | 2020 KB | Output is correct |
13 | Correct | 0 ms | 2020 KB | Output is correct |
14 | Correct | 0 ms | 2020 KB | Output is correct |
15 | Correct | 0 ms | 2020 KB | Output is correct |
16 | Correct | 0 ms | 2020 KB | Output is correct |
17 | Correct | 0 ms | 2020 KB | Output is correct |
18 | Correct | 0 ms | 2020 KB | Output is correct |
19 | Correct | 0 ms | 2020 KB | Output is correct |
20 | Correct | 0 ms | 2020 KB | Output is correct |
21 | Correct | 0 ms | 2020 KB | Output is correct |
22 | Correct | 0 ms | 2020 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
2 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
3 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
4 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
5 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
6 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
7 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
8 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
9 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
10 | Correct | 0 ms | 2020 KB | Output is correct |
11 | Correct | 0 ms | 2020 KB | Output is correct |
12 | Correct | 0 ms | 2020 KB | Output is correct |
13 | Correct | 0 ms | 2020 KB | Output is correct |
14 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
15 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
16 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
17 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2020 KB | Output is correct |
2 | Correct | 0 ms | 2020 KB | Output is correct |
3 | Correct | 0 ms | 2020 KB | Output is correct |
4 | Correct | 0 ms | 2020 KB | Output is correct |
5 | Correct | 0 ms | 2020 KB | Output is correct |
6 | Correct | 0 ms | 2020 KB | Output is correct |
7 | Correct | 0 ms | 2020 KB | Output is correct |
8 | Correct | 0 ms | 2020 KB | Output is correct |
9 | Correct | 0 ms | 2020 KB | Output is correct |
10 | Correct | 0 ms | 2020 KB | Output is correct |
11 | Correct | 0 ms | 2020 KB | Output is correct |
12 | Correct | 0 ms | 2020 KB | Output is correct |
13 | Correct | 0 ms | 2020 KB | Output is correct |
14 | Correct | 0 ms | 2020 KB | Output is correct |
15 | Correct | 0 ms | 2020 KB | Output is correct |
16 | Correct | 0 ms | 2020 KB | Output is correct |
17 | Correct | 0 ms | 2020 KB | Output is correct |
18 | Correct | 0 ms | 2020 KB | Output is correct |
19 | Correct | 0 ms | 2020 KB | Output is correct |
20 | Correct | 0 ms | 2020 KB | Output is correct |
21 | Correct | 0 ms | 2020 KB | Output is correct |
22 | Correct | 0 ms | 2020 KB | Output is correct |
23 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
24 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
25 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
26 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
27 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
28 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
29 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
30 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
31 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
32 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
33 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
34 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
35 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
36 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
37 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
38 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
39 | Correct | 33 ms | 2020 KB | Output is correct |
40 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
41 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
42 | Correct | 6 ms | 2020 KB | Output is correct |
43 | Correct | 66 ms | 2020 KB | Output is correct |
44 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
45 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2020 KB | Output is correct |
2 | Correct | 0 ms | 2020 KB | Output is correct |
3 | Correct | 0 ms | 2020 KB | Output is correct |
4 | Correct | 0 ms | 2020 KB | Output is correct |
5 | Correct | 0 ms | 2020 KB | Output is correct |
6 | Correct | 0 ms | 2020 KB | Output is correct |
7 | Correct | 0 ms | 2020 KB | Output is correct |
8 | Correct | 0 ms | 2020 KB | Output is correct |
9 | Correct | 0 ms | 2020 KB | Output is correct |
10 | Correct | 0 ms | 2020 KB | Output is correct |
11 | Correct | 0 ms | 2020 KB | Output is correct |
12 | Correct | 0 ms | 2020 KB | Output is correct |
13 | Correct | 0 ms | 2020 KB | Output is correct |
14 | Correct | 0 ms | 2020 KB | Output is correct |
15 | Correct | 0 ms | 2020 KB | Output is correct |
16 | Correct | 0 ms | 2020 KB | Output is correct |
17 | Correct | 0 ms | 2020 KB | Output is correct |
18 | Correct | 0 ms | 2020 KB | Output is correct |
19 | Correct | 0 ms | 2020 KB | Output is correct |
20 | Correct | 0 ms | 2020 KB | Output is correct |
21 | Correct | 0 ms | 2020 KB | Output is correct |
22 | Correct | 0 ms | 2020 KB | Output is correct |
23 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
24 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
25 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
26 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
27 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
28 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
29 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
30 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
31 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
32 | Correct | 0 ms | 2020 KB | Output is correct |
33 | Correct | 0 ms | 2020 KB | Output is correct |
34 | Correct | 0 ms | 2020 KB | Output is correct |
35 | Correct | 0 ms | 2020 KB | Output is correct |
36 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
37 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
38 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
39 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
40 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
41 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
42 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
43 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
44 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
45 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
46 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
47 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
48 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
49 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
50 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
51 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
52 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
53 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
54 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
55 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
56 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
57 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
58 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
59 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2020 KB | Output is correct |
2 | Correct | 0 ms | 2020 KB | Output is correct |
3 | Correct | 0 ms | 2020 KB | Output is correct |
4 | Correct | 0 ms | 2020 KB | Output is correct |
5 | Correct | 0 ms | 2020 KB | Output is correct |
6 | Correct | 0 ms | 2020 KB | Output is correct |
7 | Correct | 0 ms | 2020 KB | Output is correct |
8 | Correct | 0 ms | 2020 KB | Output is correct |
9 | Correct | 0 ms | 2020 KB | Output is correct |
10 | Correct | 0 ms | 2020 KB | Output is correct |
11 | Correct | 0 ms | 2020 KB | Output is correct |
12 | Correct | 0 ms | 2020 KB | Output is correct |
13 | Correct | 0 ms | 2020 KB | Output is correct |
14 | Correct | 0 ms | 2020 KB | Output is correct |
15 | Correct | 0 ms | 2020 KB | Output is correct |
16 | Correct | 0 ms | 2020 KB | Output is correct |
17 | Correct | 0 ms | 2020 KB | Output is correct |
18 | Correct | 0 ms | 2020 KB | Output is correct |
19 | Correct | 0 ms | 2020 KB | Output is correct |
20 | Correct | 0 ms | 2020 KB | Output is correct |
21 | Correct | 0 ms | 2020 KB | Output is correct |
22 | Correct | 0 ms | 2020 KB | Output is correct |
23 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
24 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
25 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
26 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
27 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
28 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
29 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
30 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
31 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
32 | Correct | 0 ms | 2020 KB | Output is correct |
33 | Correct | 0 ms | 2020 KB | Output is correct |
34 | Correct | 0 ms | 2020 KB | Output is correct |
35 | Correct | 0 ms | 2020 KB | Output is correct |
36 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
37 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
38 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
39 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
40 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
41 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
42 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
43 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
44 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
45 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
46 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
47 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
48 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
49 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
50 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
51 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
52 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
53 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
54 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
55 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
56 | Correct | 33 ms | 2020 KB | Output is correct |
57 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
58 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
59 | Correct | 6 ms | 2020 KB | Output is correct |
60 | Correct | 66 ms | 2020 KB | Output is correct |
61 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
62 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
63 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
64 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
65 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
66 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
67 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
68 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
69 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
70 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
71 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
72 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
73 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
74 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
75 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
76 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
77 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
78 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
79 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
80 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
81 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
82 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
83 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
84 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
85 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
86 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
87 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
88 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
89 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
90 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
91 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
92 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
93 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
94 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
95 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
96 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
97 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
98 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
99 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
100 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
101 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
102 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
103 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
104 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
105 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
106 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |
107 | Execution timed out | 1000 ms | 2020 KB | Execution timed out |