답안 #757796

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
757796 2023-06-13T18:34:14 Z raysh07 Arcade (NOI20_arcade) C++17
100 / 100
163 ms 28204 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define INF (int)1e18
#define f first
#define s second

mt19937_64 RNG(chrono::steady_clock::now().time_since_epoch().count());
int n, m;
const int maxn = 5e5 + 69;

int lis(vector<int> a) {
    vector<int> d(n+1, INF);
    d[0] = -INF;

    for (int i = 0; i < n; i++) {
        int l = upper_bound(d.begin(), d.end(), a[i]) - d.begin();
        if (d[l-1] < a[i] && a[i] < d[l])
            d[l] = a[i];
    }

    int ans = 0;
    for (int l = 0; l <= n; l++) {
        if (d[l] < INF)
            ans = l;
    }
    return ans;
}

void Solve() 
{
    cin>>m>>n;
    pair <int, int> a[maxn];
    for (int i=1; i<=n; i++){
        int x; cin>>x;
        a[i].f += x;
        a[i].s -= x;
    }
    
    for (int i=1; i<=n; i++){
        int x; cin>>x;
        a[i].f += x;
        a[i].s += x;
        a[i].s = -a[i].s;
    }
    
    sort(a+1, a+n+1);
    vector <int> v;
    
    for (int i=1; i<=n; i++){
        v.push_back(-a[i].s);
    }
    
    // for (auto x: v)
    // cout<<x<<" ";
    
    cout<<lis(v)<<"\n";
}

int32_t main() 
{
    auto begin = std::chrono::high_resolution_clock::now();
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int t = 1;
    //cin >> t;
    for(int i = 1; i <= t; i++) 
    {
        //cout << "Case #" << i << ": ";
        Solve();
    }
    auto end = std::chrono::high_resolution_clock::now();
    auto elapsed = std::chrono::duration_cast<std::chrono::nanoseconds>(end - begin);
    cerr << "Time measured: " << elapsed.count() * 1e-9 << " seconds.\n"; 
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 8148 KB Output is correct
2 Correct 4 ms 8148 KB Output is correct
3 Correct 5 ms 8144 KB Output is correct
4 Correct 5 ms 8148 KB Output is correct
5 Correct 4 ms 8148 KB Output is correct
6 Correct 5 ms 8148 KB Output is correct
7 Correct 5 ms 8144 KB Output is correct
8 Correct 4 ms 8144 KB Output is correct
9 Correct 5 ms 8036 KB Output is correct
10 Correct 4 ms 8148 KB Output is correct
11 Correct 4 ms 8148 KB Output is correct
12 Correct 4 ms 8148 KB Output is correct
13 Correct 5 ms 8144 KB Output is correct
14 Correct 4 ms 8148 KB Output is correct
15 Correct 4 ms 8056 KB Output is correct
16 Correct 6 ms 8148 KB Output is correct
17 Correct 4 ms 8148 KB Output is correct
18 Correct 4 ms 8148 KB Output is correct
19 Correct 5 ms 8148 KB Output is correct
20 Correct 4 ms 8148 KB Output is correct
21 Correct 5 ms 8148 KB Output is correct
22 Correct 4 ms 8144 KB Output is correct
23 Correct 4 ms 8144 KB Output is correct
24 Correct 4 ms 8144 KB Output is correct
25 Correct 4 ms 8148 KB Output is correct
26 Correct 4 ms 8148 KB Output is correct
27 Correct 4 ms 8148 KB Output is correct
28 Correct 4 ms 8148 KB Output is correct
29 Correct 4 ms 8144 KB Output is correct
30 Correct 4 ms 8144 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 8148 KB Output is correct
2 Correct 4 ms 8148 KB Output is correct
3 Correct 5 ms 8144 KB Output is correct
4 Correct 5 ms 8148 KB Output is correct
5 Correct 4 ms 8148 KB Output is correct
6 Correct 5 ms 8148 KB Output is correct
7 Correct 5 ms 8144 KB Output is correct
8 Correct 4 ms 8144 KB Output is correct
9 Correct 5 ms 8036 KB Output is correct
10 Correct 4 ms 8148 KB Output is correct
11 Correct 4 ms 8148 KB Output is correct
12 Correct 4 ms 8148 KB Output is correct
13 Correct 5 ms 8144 KB Output is correct
14 Correct 4 ms 8148 KB Output is correct
15 Correct 4 ms 8056 KB Output is correct
16 Correct 6 ms 8148 KB Output is correct
17 Correct 4 ms 8148 KB Output is correct
18 Correct 4 ms 8148 KB Output is correct
19 Correct 5 ms 8148 KB Output is correct
20 Correct 4 ms 8148 KB Output is correct
21 Correct 5 ms 8148 KB Output is correct
22 Correct 4 ms 8144 KB Output is correct
23 Correct 4 ms 8144 KB Output is correct
24 Correct 4 ms 8144 KB Output is correct
25 Correct 4 ms 8148 KB Output is correct
26 Correct 4 ms 8148 KB Output is correct
27 Correct 4 ms 8148 KB Output is correct
28 Correct 4 ms 8148 KB Output is correct
29 Correct 4 ms 8144 KB Output is correct
30 Correct 4 ms 8144 KB Output is correct
31 Correct 4 ms 8148 KB Output is correct
32 Correct 4 ms 8148 KB Output is correct
33 Correct 4 ms 8148 KB Output is correct
34 Correct 4 ms 8148 KB Output is correct
35 Correct 5 ms 8148 KB Output is correct
36 Correct 4 ms 8148 KB Output is correct
37 Correct 4 ms 8148 KB Output is correct
38 Correct 4 ms 8148 KB Output is correct
39 Correct 4 ms 8148 KB Output is correct
40 Correct 4 ms 8148 KB Output is correct
41 Correct 4 ms 8152 KB Output is correct
42 Correct 5 ms 8148 KB Output is correct
43 Correct 4 ms 8152 KB Output is correct
44 Correct 4 ms 8148 KB Output is correct
45 Correct 5 ms 8088 KB Output is correct
46 Correct 6 ms 8148 KB Output is correct
47 Correct 4 ms 8148 KB Output is correct
48 Correct 4 ms 8136 KB Output is correct
49 Correct 4 ms 8148 KB Output is correct
50 Correct 5 ms 8140 KB Output is correct
51 Correct 5 ms 8148 KB Output is correct
52 Correct 4 ms 8148 KB Output is correct
53 Correct 5 ms 8148 KB Output is correct
54 Correct 5 ms 8144 KB Output is correct
55 Correct 4 ms 8152 KB Output is correct
56 Correct 5 ms 8148 KB Output is correct
57 Correct 5 ms 8148 KB Output is correct
58 Correct 5 ms 8148 KB Output is correct
59 Correct 4 ms 8148 KB Output is correct
60 Correct 4 ms 8148 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 8148 KB Output is correct
2 Correct 4 ms 8148 KB Output is correct
3 Correct 5 ms 8144 KB Output is correct
4 Correct 5 ms 8148 KB Output is correct
5 Correct 4 ms 8148 KB Output is correct
6 Correct 5 ms 8148 KB Output is correct
7 Correct 5 ms 8144 KB Output is correct
8 Correct 4 ms 8144 KB Output is correct
9 Correct 5 ms 8036 KB Output is correct
10 Correct 4 ms 8148 KB Output is correct
11 Correct 4 ms 8148 KB Output is correct
12 Correct 4 ms 8148 KB Output is correct
13 Correct 5 ms 8144 KB Output is correct
14 Correct 4 ms 8148 KB Output is correct
15 Correct 4 ms 8056 KB Output is correct
16 Correct 6 ms 8148 KB Output is correct
17 Correct 4 ms 8148 KB Output is correct
18 Correct 4 ms 8148 KB Output is correct
19 Correct 5 ms 8148 KB Output is correct
20 Correct 4 ms 8148 KB Output is correct
21 Correct 5 ms 8148 KB Output is correct
22 Correct 4 ms 8144 KB Output is correct
23 Correct 4 ms 8144 KB Output is correct
24 Correct 4 ms 8144 KB Output is correct
25 Correct 4 ms 8148 KB Output is correct
26 Correct 4 ms 8148 KB Output is correct
27 Correct 4 ms 8148 KB Output is correct
28 Correct 4 ms 8148 KB Output is correct
29 Correct 4 ms 8144 KB Output is correct
30 Correct 4 ms 8144 KB Output is correct
31 Correct 4 ms 8148 KB Output is correct
32 Correct 4 ms 8148 KB Output is correct
33 Correct 4 ms 8148 KB Output is correct
34 Correct 4 ms 8148 KB Output is correct
35 Correct 5 ms 8148 KB Output is correct
36 Correct 4 ms 8148 KB Output is correct
37 Correct 4 ms 8148 KB Output is correct
38 Correct 4 ms 8148 KB Output is correct
39 Correct 4 ms 8148 KB Output is correct
40 Correct 4 ms 8148 KB Output is correct
41 Correct 4 ms 8152 KB Output is correct
42 Correct 5 ms 8148 KB Output is correct
43 Correct 4 ms 8152 KB Output is correct
44 Correct 4 ms 8148 KB Output is correct
45 Correct 5 ms 8088 KB Output is correct
46 Correct 6 ms 8148 KB Output is correct
47 Correct 4 ms 8148 KB Output is correct
48 Correct 4 ms 8136 KB Output is correct
49 Correct 4 ms 8148 KB Output is correct
50 Correct 5 ms 8140 KB Output is correct
51 Correct 5 ms 8148 KB Output is correct
52 Correct 4 ms 8148 KB Output is correct
53 Correct 5 ms 8148 KB Output is correct
54 Correct 5 ms 8144 KB Output is correct
55 Correct 4 ms 8152 KB Output is correct
56 Correct 5 ms 8148 KB Output is correct
57 Correct 5 ms 8148 KB Output is correct
58 Correct 5 ms 8148 KB Output is correct
59 Correct 4 ms 8148 KB Output is correct
60 Correct 4 ms 8148 KB Output is correct
61 Correct 4 ms 8148 KB Output is correct
62 Correct 4 ms 8152 KB Output is correct
63 Correct 5 ms 8148 KB Output is correct
64 Correct 4 ms 8148 KB Output is correct
65 Correct 4 ms 8148 KB Output is correct
66 Correct 5 ms 8148 KB Output is correct
67 Correct 5 ms 8148 KB Output is correct
68 Correct 5 ms 8144 KB Output is correct
69 Correct 4 ms 8148 KB Output is correct
70 Correct 5 ms 8148 KB Output is correct
71 Correct 4 ms 8148 KB Output is correct
72 Correct 5 ms 8152 KB Output is correct
73 Correct 5 ms 8148 KB Output is correct
74 Correct 5 ms 8148 KB Output is correct
75 Correct 5 ms 8148 KB Output is correct
76 Correct 5 ms 8148 KB Output is correct
77 Correct 5 ms 8020 KB Output is correct
78 Correct 4 ms 8148 KB Output is correct
79 Correct 5 ms 8148 KB Output is correct
80 Correct 4 ms 8148 KB Output is correct
81 Correct 4 ms 8148 KB Output is correct
82 Correct 4 ms 8148 KB Output is correct
83 Correct 5 ms 8144 KB Output is correct
84 Correct 4 ms 8152 KB Output is correct
85 Correct 5 ms 8148 KB Output is correct
86 Correct 4 ms 8148 KB Output is correct
87 Correct 4 ms 8152 KB Output is correct
88 Correct 4 ms 8148 KB Output is correct
89 Correct 4 ms 8148 KB Output is correct
90 Correct 4 ms 8148 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 8148 KB Output is correct
2 Correct 4 ms 8148 KB Output is correct
3 Correct 5 ms 8144 KB Output is correct
4 Correct 5 ms 8148 KB Output is correct
5 Correct 4 ms 8148 KB Output is correct
6 Correct 5 ms 8148 KB Output is correct
7 Correct 5 ms 8144 KB Output is correct
8 Correct 4 ms 8144 KB Output is correct
9 Correct 5 ms 8036 KB Output is correct
10 Correct 4 ms 8148 KB Output is correct
11 Correct 4 ms 8148 KB Output is correct
12 Correct 4 ms 8148 KB Output is correct
13 Correct 5 ms 8144 KB Output is correct
14 Correct 4 ms 8148 KB Output is correct
15 Correct 4 ms 8056 KB Output is correct
16 Correct 6 ms 8148 KB Output is correct
17 Correct 4 ms 8148 KB Output is correct
18 Correct 4 ms 8148 KB Output is correct
19 Correct 5 ms 8148 KB Output is correct
20 Correct 4 ms 8148 KB Output is correct
21 Correct 5 ms 8148 KB Output is correct
22 Correct 4 ms 8144 KB Output is correct
23 Correct 4 ms 8144 KB Output is correct
24 Correct 4 ms 8144 KB Output is correct
25 Correct 4 ms 8148 KB Output is correct
26 Correct 4 ms 8148 KB Output is correct
27 Correct 4 ms 8148 KB Output is correct
28 Correct 4 ms 8148 KB Output is correct
29 Correct 4 ms 8144 KB Output is correct
30 Correct 4 ms 8144 KB Output is correct
31 Correct 4 ms 8148 KB Output is correct
32 Correct 4 ms 8148 KB Output is correct
33 Correct 4 ms 8148 KB Output is correct
34 Correct 4 ms 8148 KB Output is correct
35 Correct 5 ms 8148 KB Output is correct
36 Correct 4 ms 8148 KB Output is correct
37 Correct 4 ms 8148 KB Output is correct
38 Correct 4 ms 8148 KB Output is correct
39 Correct 4 ms 8148 KB Output is correct
40 Correct 4 ms 8148 KB Output is correct
41 Correct 4 ms 8152 KB Output is correct
42 Correct 5 ms 8148 KB Output is correct
43 Correct 4 ms 8152 KB Output is correct
44 Correct 4 ms 8148 KB Output is correct
45 Correct 5 ms 8088 KB Output is correct
46 Correct 6 ms 8148 KB Output is correct
47 Correct 4 ms 8148 KB Output is correct
48 Correct 4 ms 8136 KB Output is correct
49 Correct 4 ms 8148 KB Output is correct
50 Correct 5 ms 8140 KB Output is correct
51 Correct 5 ms 8148 KB Output is correct
52 Correct 4 ms 8148 KB Output is correct
53 Correct 5 ms 8148 KB Output is correct
54 Correct 5 ms 8144 KB Output is correct
55 Correct 4 ms 8152 KB Output is correct
56 Correct 5 ms 8148 KB Output is correct
57 Correct 5 ms 8148 KB Output is correct
58 Correct 5 ms 8148 KB Output is correct
59 Correct 4 ms 8148 KB Output is correct
60 Correct 4 ms 8148 KB Output is correct
61 Correct 4 ms 8148 KB Output is correct
62 Correct 4 ms 8152 KB Output is correct
63 Correct 5 ms 8148 KB Output is correct
64 Correct 4 ms 8148 KB Output is correct
65 Correct 4 ms 8148 KB Output is correct
66 Correct 5 ms 8148 KB Output is correct
67 Correct 5 ms 8148 KB Output is correct
68 Correct 5 ms 8144 KB Output is correct
69 Correct 4 ms 8148 KB Output is correct
70 Correct 5 ms 8148 KB Output is correct
71 Correct 4 ms 8148 KB Output is correct
72 Correct 5 ms 8152 KB Output is correct
73 Correct 5 ms 8148 KB Output is correct
74 Correct 5 ms 8148 KB Output is correct
75 Correct 5 ms 8148 KB Output is correct
76 Correct 5 ms 8148 KB Output is correct
77 Correct 5 ms 8020 KB Output is correct
78 Correct 4 ms 8148 KB Output is correct
79 Correct 5 ms 8148 KB Output is correct
80 Correct 4 ms 8148 KB Output is correct
81 Correct 4 ms 8148 KB Output is correct
82 Correct 4 ms 8148 KB Output is correct
83 Correct 5 ms 8144 KB Output is correct
84 Correct 4 ms 8152 KB Output is correct
85 Correct 5 ms 8148 KB Output is correct
86 Correct 4 ms 8148 KB Output is correct
87 Correct 4 ms 8152 KB Output is correct
88 Correct 4 ms 8148 KB Output is correct
89 Correct 4 ms 8148 KB Output is correct
90 Correct 4 ms 8148 KB Output is correct
91 Correct 4 ms 8148 KB Output is correct
92 Correct 4 ms 8156 KB Output is correct
93 Correct 4 ms 8148 KB Output is correct
94 Correct 5 ms 8148 KB Output is correct
95 Correct 4 ms 8140 KB Output is correct
96 Correct 4 ms 8148 KB Output is correct
97 Correct 4 ms 8148 KB Output is correct
98 Correct 5 ms 8148 KB Output is correct
99 Correct 4 ms 8148 KB Output is correct
100 Correct 4 ms 8148 KB Output is correct
101 Correct 4 ms 8148 KB Output is correct
102 Correct 4 ms 8148 KB Output is correct
103 Correct 5 ms 8144 KB Output is correct
104 Correct 5 ms 8148 KB Output is correct
105 Correct 4 ms 8148 KB Output is correct
106 Correct 4 ms 8148 KB Output is correct
107 Correct 6 ms 8096 KB Output is correct
108 Correct 5 ms 8148 KB Output is correct
109 Correct 5 ms 8148 KB Output is correct
110 Correct 4 ms 8148 KB Output is correct
111 Correct 6 ms 8148 KB Output is correct
112 Correct 4 ms 8148 KB Output is correct
113 Correct 6 ms 8148 KB Output is correct
114 Correct 5 ms 8148 KB Output is correct
115 Correct 5 ms 8148 KB Output is correct
116 Correct 5 ms 8148 KB Output is correct
117 Correct 4 ms 8148 KB Output is correct
118 Correct 5 ms 8148 KB Output is correct
119 Correct 4 ms 8148 KB Output is correct
120 Correct 4 ms 8148 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 8148 KB Output is correct
2 Correct 4 ms 8148 KB Output is correct
3 Correct 5 ms 8144 KB Output is correct
4 Correct 5 ms 8148 KB Output is correct
5 Correct 4 ms 8148 KB Output is correct
6 Correct 5 ms 8148 KB Output is correct
7 Correct 5 ms 8144 KB Output is correct
8 Correct 4 ms 8144 KB Output is correct
9 Correct 5 ms 8036 KB Output is correct
10 Correct 4 ms 8148 KB Output is correct
11 Correct 4 ms 8148 KB Output is correct
12 Correct 4 ms 8148 KB Output is correct
13 Correct 5 ms 8144 KB Output is correct
14 Correct 4 ms 8148 KB Output is correct
15 Correct 4 ms 8056 KB Output is correct
16 Correct 6 ms 8148 KB Output is correct
17 Correct 4 ms 8148 KB Output is correct
18 Correct 4 ms 8148 KB Output is correct
19 Correct 5 ms 8148 KB Output is correct
20 Correct 4 ms 8148 KB Output is correct
21 Correct 5 ms 8148 KB Output is correct
22 Correct 4 ms 8144 KB Output is correct
23 Correct 4 ms 8144 KB Output is correct
24 Correct 4 ms 8144 KB Output is correct
25 Correct 4 ms 8148 KB Output is correct
26 Correct 4 ms 8148 KB Output is correct
27 Correct 4 ms 8148 KB Output is correct
28 Correct 4 ms 8148 KB Output is correct
29 Correct 4 ms 8144 KB Output is correct
30 Correct 4 ms 8144 KB Output is correct
31 Correct 4 ms 8148 KB Output is correct
32 Correct 4 ms 8148 KB Output is correct
33 Correct 4 ms 8148 KB Output is correct
34 Correct 4 ms 8148 KB Output is correct
35 Correct 5 ms 8148 KB Output is correct
36 Correct 4 ms 8148 KB Output is correct
37 Correct 4 ms 8148 KB Output is correct
38 Correct 4 ms 8148 KB Output is correct
39 Correct 4 ms 8148 KB Output is correct
40 Correct 4 ms 8148 KB Output is correct
41 Correct 4 ms 8152 KB Output is correct
42 Correct 5 ms 8148 KB Output is correct
43 Correct 4 ms 8152 KB Output is correct
44 Correct 4 ms 8148 KB Output is correct
45 Correct 5 ms 8088 KB Output is correct
46 Correct 6 ms 8148 KB Output is correct
47 Correct 4 ms 8148 KB Output is correct
48 Correct 4 ms 8136 KB Output is correct
49 Correct 4 ms 8148 KB Output is correct
50 Correct 5 ms 8140 KB Output is correct
51 Correct 5 ms 8148 KB Output is correct
52 Correct 4 ms 8148 KB Output is correct
53 Correct 5 ms 8148 KB Output is correct
54 Correct 5 ms 8144 KB Output is correct
55 Correct 4 ms 8152 KB Output is correct
56 Correct 5 ms 8148 KB Output is correct
57 Correct 5 ms 8148 KB Output is correct
58 Correct 5 ms 8148 KB Output is correct
59 Correct 4 ms 8148 KB Output is correct
60 Correct 4 ms 8148 KB Output is correct
61 Correct 4 ms 8148 KB Output is correct
62 Correct 4 ms 8152 KB Output is correct
63 Correct 5 ms 8148 KB Output is correct
64 Correct 4 ms 8148 KB Output is correct
65 Correct 4 ms 8148 KB Output is correct
66 Correct 5 ms 8148 KB Output is correct
67 Correct 5 ms 8148 KB Output is correct
68 Correct 5 ms 8144 KB Output is correct
69 Correct 4 ms 8148 KB Output is correct
70 Correct 5 ms 8148 KB Output is correct
71 Correct 4 ms 8148 KB Output is correct
72 Correct 5 ms 8152 KB Output is correct
73 Correct 5 ms 8148 KB Output is correct
74 Correct 5 ms 8148 KB Output is correct
75 Correct 5 ms 8148 KB Output is correct
76 Correct 5 ms 8148 KB Output is correct
77 Correct 5 ms 8020 KB Output is correct
78 Correct 4 ms 8148 KB Output is correct
79 Correct 5 ms 8148 KB Output is correct
80 Correct 4 ms 8148 KB Output is correct
81 Correct 4 ms 8148 KB Output is correct
82 Correct 4 ms 8148 KB Output is correct
83 Correct 5 ms 8144 KB Output is correct
84 Correct 4 ms 8152 KB Output is correct
85 Correct 5 ms 8148 KB Output is correct
86 Correct 4 ms 8148 KB Output is correct
87 Correct 4 ms 8152 KB Output is correct
88 Correct 4 ms 8148 KB Output is correct
89 Correct 4 ms 8148 KB Output is correct
90 Correct 4 ms 8148 KB Output is correct
91 Correct 4 ms 8148 KB Output is correct
92 Correct 4 ms 8156 KB Output is correct
93 Correct 4 ms 8148 KB Output is correct
94 Correct 5 ms 8148 KB Output is correct
95 Correct 4 ms 8140 KB Output is correct
96 Correct 4 ms 8148 KB Output is correct
97 Correct 4 ms 8148 KB Output is correct
98 Correct 5 ms 8148 KB Output is correct
99 Correct 4 ms 8148 KB Output is correct
100 Correct 4 ms 8148 KB Output is correct
101 Correct 4 ms 8148 KB Output is correct
102 Correct 4 ms 8148 KB Output is correct
103 Correct 5 ms 8144 KB Output is correct
104 Correct 5 ms 8148 KB Output is correct
105 Correct 4 ms 8148 KB Output is correct
106 Correct 4 ms 8148 KB Output is correct
107 Correct 6 ms 8096 KB Output is correct
108 Correct 5 ms 8148 KB Output is correct
109 Correct 5 ms 8148 KB Output is correct
110 Correct 4 ms 8148 KB Output is correct
111 Correct 6 ms 8148 KB Output is correct
112 Correct 4 ms 8148 KB Output is correct
113 Correct 6 ms 8148 KB Output is correct
114 Correct 5 ms 8148 KB Output is correct
115 Correct 5 ms 8148 KB Output is correct
116 Correct 5 ms 8148 KB Output is correct
117 Correct 4 ms 8148 KB Output is correct
118 Correct 5 ms 8148 KB Output is correct
119 Correct 4 ms 8148 KB Output is correct
120 Correct 4 ms 8148 KB Output is correct
121 Correct 9 ms 8660 KB Output is correct
122 Correct 8 ms 8644 KB Output is correct
123 Correct 8 ms 8648 KB Output is correct
124 Correct 10 ms 8660 KB Output is correct
125 Correct 9 ms 8644 KB Output is correct
126 Correct 8 ms 8548 KB Output is correct
127 Correct 8 ms 8532 KB Output is correct
128 Correct 8 ms 8532 KB Output is correct
129 Correct 7 ms 8404 KB Output is correct
130 Correct 4 ms 8152 KB Output is correct
131 Correct 7 ms 8544 KB Output is correct
132 Correct 9 ms 8564 KB Output is correct
133 Correct 5 ms 8160 KB Output is correct
134 Correct 8 ms 8672 KB Output is correct
135 Correct 5 ms 8164 KB Output is correct
136 Correct 9 ms 8648 KB Output is correct
137 Correct 9 ms 8660 KB Output is correct
138 Correct 8 ms 8660 KB Output is correct
139 Correct 9 ms 8660 KB Output is correct
140 Correct 9 ms 8620 KB Output is correct
141 Correct 9 ms 8636 KB Output is correct
142 Correct 9 ms 8648 KB Output is correct
143 Correct 8 ms 8640 KB Output is correct
144 Correct 9 ms 8660 KB Output is correct
145 Correct 9 ms 8644 KB Output is correct
146 Correct 8 ms 8676 KB Output is correct
147 Correct 10 ms 8660 KB Output is correct
148 Correct 8 ms 8564 KB Output is correct
149 Correct 9 ms 8660 KB Output is correct
150 Correct 9 ms 8560 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 8148 KB Output is correct
2 Correct 4 ms 8148 KB Output is correct
3 Correct 5 ms 8144 KB Output is correct
4 Correct 5 ms 8148 KB Output is correct
5 Correct 4 ms 8148 KB Output is correct
6 Correct 5 ms 8148 KB Output is correct
7 Correct 5 ms 8144 KB Output is correct
8 Correct 4 ms 8144 KB Output is correct
9 Correct 5 ms 8036 KB Output is correct
10 Correct 4 ms 8148 KB Output is correct
11 Correct 4 ms 8148 KB Output is correct
12 Correct 4 ms 8148 KB Output is correct
13 Correct 5 ms 8144 KB Output is correct
14 Correct 4 ms 8148 KB Output is correct
15 Correct 4 ms 8056 KB Output is correct
16 Correct 6 ms 8148 KB Output is correct
17 Correct 4 ms 8148 KB Output is correct
18 Correct 4 ms 8148 KB Output is correct
19 Correct 5 ms 8148 KB Output is correct
20 Correct 4 ms 8148 KB Output is correct
21 Correct 5 ms 8148 KB Output is correct
22 Correct 4 ms 8144 KB Output is correct
23 Correct 4 ms 8144 KB Output is correct
24 Correct 4 ms 8144 KB Output is correct
25 Correct 4 ms 8148 KB Output is correct
26 Correct 4 ms 8148 KB Output is correct
27 Correct 4 ms 8148 KB Output is correct
28 Correct 4 ms 8148 KB Output is correct
29 Correct 4 ms 8144 KB Output is correct
30 Correct 4 ms 8144 KB Output is correct
31 Correct 4 ms 8148 KB Output is correct
32 Correct 4 ms 8148 KB Output is correct
33 Correct 4 ms 8148 KB Output is correct
34 Correct 4 ms 8148 KB Output is correct
35 Correct 5 ms 8148 KB Output is correct
36 Correct 4 ms 8148 KB Output is correct
37 Correct 4 ms 8148 KB Output is correct
38 Correct 4 ms 8148 KB Output is correct
39 Correct 4 ms 8148 KB Output is correct
40 Correct 4 ms 8148 KB Output is correct
41 Correct 4 ms 8152 KB Output is correct
42 Correct 5 ms 8148 KB Output is correct
43 Correct 4 ms 8152 KB Output is correct
44 Correct 4 ms 8148 KB Output is correct
45 Correct 5 ms 8088 KB Output is correct
46 Correct 6 ms 8148 KB Output is correct
47 Correct 4 ms 8148 KB Output is correct
48 Correct 4 ms 8136 KB Output is correct
49 Correct 4 ms 8148 KB Output is correct
50 Correct 5 ms 8140 KB Output is correct
51 Correct 5 ms 8148 KB Output is correct
52 Correct 4 ms 8148 KB Output is correct
53 Correct 5 ms 8148 KB Output is correct
54 Correct 5 ms 8144 KB Output is correct
55 Correct 4 ms 8152 KB Output is correct
56 Correct 5 ms 8148 KB Output is correct
57 Correct 5 ms 8148 KB Output is correct
58 Correct 5 ms 8148 KB Output is correct
59 Correct 4 ms 8148 KB Output is correct
60 Correct 4 ms 8148 KB Output is correct
61 Correct 4 ms 8148 KB Output is correct
62 Correct 4 ms 8152 KB Output is correct
63 Correct 5 ms 8148 KB Output is correct
64 Correct 4 ms 8148 KB Output is correct
65 Correct 4 ms 8148 KB Output is correct
66 Correct 5 ms 8148 KB Output is correct
67 Correct 5 ms 8148 KB Output is correct
68 Correct 5 ms 8144 KB Output is correct
69 Correct 4 ms 8148 KB Output is correct
70 Correct 5 ms 8148 KB Output is correct
71 Correct 4 ms 8148 KB Output is correct
72 Correct 5 ms 8152 KB Output is correct
73 Correct 5 ms 8148 KB Output is correct
74 Correct 5 ms 8148 KB Output is correct
75 Correct 5 ms 8148 KB Output is correct
76 Correct 5 ms 8148 KB Output is correct
77 Correct 5 ms 8020 KB Output is correct
78 Correct 4 ms 8148 KB Output is correct
79 Correct 5 ms 8148 KB Output is correct
80 Correct 4 ms 8148 KB Output is correct
81 Correct 4 ms 8148 KB Output is correct
82 Correct 4 ms 8148 KB Output is correct
83 Correct 5 ms 8144 KB Output is correct
84 Correct 4 ms 8152 KB Output is correct
85 Correct 5 ms 8148 KB Output is correct
86 Correct 4 ms 8148 KB Output is correct
87 Correct 4 ms 8152 KB Output is correct
88 Correct 4 ms 8148 KB Output is correct
89 Correct 4 ms 8148 KB Output is correct
90 Correct 4 ms 8148 KB Output is correct
91 Correct 4 ms 8148 KB Output is correct
92 Correct 4 ms 8156 KB Output is correct
93 Correct 4 ms 8148 KB Output is correct
94 Correct 5 ms 8148 KB Output is correct
95 Correct 4 ms 8140 KB Output is correct
96 Correct 4 ms 8148 KB Output is correct
97 Correct 4 ms 8148 KB Output is correct
98 Correct 5 ms 8148 KB Output is correct
99 Correct 4 ms 8148 KB Output is correct
100 Correct 4 ms 8148 KB Output is correct
101 Correct 4 ms 8148 KB Output is correct
102 Correct 4 ms 8148 KB Output is correct
103 Correct 5 ms 8144 KB Output is correct
104 Correct 5 ms 8148 KB Output is correct
105 Correct 4 ms 8148 KB Output is correct
106 Correct 4 ms 8148 KB Output is correct
107 Correct 6 ms 8096 KB Output is correct
108 Correct 5 ms 8148 KB Output is correct
109 Correct 5 ms 8148 KB Output is correct
110 Correct 4 ms 8148 KB Output is correct
111 Correct 6 ms 8148 KB Output is correct
112 Correct 4 ms 8148 KB Output is correct
113 Correct 6 ms 8148 KB Output is correct
114 Correct 5 ms 8148 KB Output is correct
115 Correct 5 ms 8148 KB Output is correct
116 Correct 5 ms 8148 KB Output is correct
117 Correct 4 ms 8148 KB Output is correct
118 Correct 5 ms 8148 KB Output is correct
119 Correct 4 ms 8148 KB Output is correct
120 Correct 4 ms 8148 KB Output is correct
121 Correct 9 ms 8660 KB Output is correct
122 Correct 8 ms 8644 KB Output is correct
123 Correct 8 ms 8648 KB Output is correct
124 Correct 10 ms 8660 KB Output is correct
125 Correct 9 ms 8644 KB Output is correct
126 Correct 8 ms 8548 KB Output is correct
127 Correct 8 ms 8532 KB Output is correct
128 Correct 8 ms 8532 KB Output is correct
129 Correct 7 ms 8404 KB Output is correct
130 Correct 4 ms 8152 KB Output is correct
131 Correct 7 ms 8544 KB Output is correct
132 Correct 9 ms 8564 KB Output is correct
133 Correct 5 ms 8160 KB Output is correct
134 Correct 8 ms 8672 KB Output is correct
135 Correct 5 ms 8164 KB Output is correct
136 Correct 9 ms 8648 KB Output is correct
137 Correct 9 ms 8660 KB Output is correct
138 Correct 8 ms 8660 KB Output is correct
139 Correct 9 ms 8660 KB Output is correct
140 Correct 9 ms 8620 KB Output is correct
141 Correct 9 ms 8636 KB Output is correct
142 Correct 9 ms 8648 KB Output is correct
143 Correct 8 ms 8640 KB Output is correct
144 Correct 9 ms 8660 KB Output is correct
145 Correct 9 ms 8644 KB Output is correct
146 Correct 8 ms 8676 KB Output is correct
147 Correct 10 ms 8660 KB Output is correct
148 Correct 8 ms 8564 KB Output is correct
149 Correct 9 ms 8660 KB Output is correct
150 Correct 9 ms 8560 KB Output is correct
151 Correct 41 ms 12232 KB Output is correct
152 Correct 35 ms 12104 KB Output is correct
153 Correct 36 ms 12216 KB Output is correct
154 Correct 38 ms 12488 KB Output is correct
155 Correct 37 ms 12252 KB Output is correct
156 Correct 38 ms 12344 KB Output is correct
157 Correct 39 ms 12340 KB Output is correct
158 Correct 5 ms 8176 KB Output is correct
159 Correct 27 ms 11440 KB Output is correct
160 Correct 29 ms 11848 KB Output is correct
161 Correct 22 ms 10604 KB Output is correct
162 Correct 36 ms 12424 KB Output is correct
163 Correct 18 ms 10140 KB Output is correct
164 Correct 13 ms 9432 KB Output is correct
165 Correct 18 ms 10304 KB Output is correct
166 Correct 36 ms 12232 KB Output is correct
167 Correct 35 ms 12360 KB Output is correct
168 Correct 37 ms 12348 KB Output is correct
169 Correct 40 ms 12320 KB Output is correct
170 Correct 37 ms 12300 KB Output is correct
171 Correct 36 ms 12344 KB Output is correct
172 Correct 34 ms 12360 KB Output is correct
173 Correct 36 ms 12480 KB Output is correct
174 Correct 39 ms 12336 KB Output is correct
175 Correct 36 ms 12460 KB Output is correct
176 Correct 39 ms 12484 KB Output is correct
177 Correct 35 ms 12056 KB Output is correct
178 Correct 35 ms 12068 KB Output is correct
179 Correct 34 ms 12240 KB Output is correct
180 Correct 40 ms 12488 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 8148 KB Output is correct
2 Correct 4 ms 8148 KB Output is correct
3 Correct 5 ms 8144 KB Output is correct
4 Correct 5 ms 8148 KB Output is correct
5 Correct 4 ms 8148 KB Output is correct
6 Correct 5 ms 8148 KB Output is correct
7 Correct 5 ms 8144 KB Output is correct
8 Correct 4 ms 8144 KB Output is correct
9 Correct 5 ms 8036 KB Output is correct
10 Correct 4 ms 8148 KB Output is correct
11 Correct 4 ms 8148 KB Output is correct
12 Correct 4 ms 8148 KB Output is correct
13 Correct 5 ms 8144 KB Output is correct
14 Correct 4 ms 8148 KB Output is correct
15 Correct 4 ms 8056 KB Output is correct
16 Correct 6 ms 8148 KB Output is correct
17 Correct 4 ms 8148 KB Output is correct
18 Correct 4 ms 8148 KB Output is correct
19 Correct 5 ms 8148 KB Output is correct
20 Correct 4 ms 8148 KB Output is correct
21 Correct 5 ms 8148 KB Output is correct
22 Correct 4 ms 8144 KB Output is correct
23 Correct 4 ms 8144 KB Output is correct
24 Correct 4 ms 8144 KB Output is correct
25 Correct 4 ms 8148 KB Output is correct
26 Correct 4 ms 8148 KB Output is correct
27 Correct 4 ms 8148 KB Output is correct
28 Correct 4 ms 8148 KB Output is correct
29 Correct 4 ms 8144 KB Output is correct
30 Correct 4 ms 8144 KB Output is correct
31 Correct 4 ms 8148 KB Output is correct
32 Correct 4 ms 8148 KB Output is correct
33 Correct 4 ms 8148 KB Output is correct
34 Correct 4 ms 8148 KB Output is correct
35 Correct 5 ms 8148 KB Output is correct
36 Correct 4 ms 8148 KB Output is correct
37 Correct 4 ms 8148 KB Output is correct
38 Correct 4 ms 8148 KB Output is correct
39 Correct 4 ms 8148 KB Output is correct
40 Correct 4 ms 8148 KB Output is correct
41 Correct 4 ms 8152 KB Output is correct
42 Correct 5 ms 8148 KB Output is correct
43 Correct 4 ms 8152 KB Output is correct
44 Correct 4 ms 8148 KB Output is correct
45 Correct 5 ms 8088 KB Output is correct
46 Correct 6 ms 8148 KB Output is correct
47 Correct 4 ms 8148 KB Output is correct
48 Correct 4 ms 8136 KB Output is correct
49 Correct 4 ms 8148 KB Output is correct
50 Correct 5 ms 8140 KB Output is correct
51 Correct 5 ms 8148 KB Output is correct
52 Correct 4 ms 8148 KB Output is correct
53 Correct 5 ms 8148 KB Output is correct
54 Correct 5 ms 8144 KB Output is correct
55 Correct 4 ms 8152 KB Output is correct
56 Correct 5 ms 8148 KB Output is correct
57 Correct 5 ms 8148 KB Output is correct
58 Correct 5 ms 8148 KB Output is correct
59 Correct 4 ms 8148 KB Output is correct
60 Correct 4 ms 8148 KB Output is correct
61 Correct 4 ms 8148 KB Output is correct
62 Correct 4 ms 8152 KB Output is correct
63 Correct 5 ms 8148 KB Output is correct
64 Correct 4 ms 8148 KB Output is correct
65 Correct 4 ms 8148 KB Output is correct
66 Correct 5 ms 8148 KB Output is correct
67 Correct 5 ms 8148 KB Output is correct
68 Correct 5 ms 8144 KB Output is correct
69 Correct 4 ms 8148 KB Output is correct
70 Correct 5 ms 8148 KB Output is correct
71 Correct 4 ms 8148 KB Output is correct
72 Correct 5 ms 8152 KB Output is correct
73 Correct 5 ms 8148 KB Output is correct
74 Correct 5 ms 8148 KB Output is correct
75 Correct 5 ms 8148 KB Output is correct
76 Correct 5 ms 8148 KB Output is correct
77 Correct 5 ms 8020 KB Output is correct
78 Correct 4 ms 8148 KB Output is correct
79 Correct 5 ms 8148 KB Output is correct
80 Correct 4 ms 8148 KB Output is correct
81 Correct 4 ms 8148 KB Output is correct
82 Correct 4 ms 8148 KB Output is correct
83 Correct 5 ms 8144 KB Output is correct
84 Correct 4 ms 8152 KB Output is correct
85 Correct 5 ms 8148 KB Output is correct
86 Correct 4 ms 8148 KB Output is correct
87 Correct 4 ms 8152 KB Output is correct
88 Correct 4 ms 8148 KB Output is correct
89 Correct 4 ms 8148 KB Output is correct
90 Correct 4 ms 8148 KB Output is correct
91 Correct 4 ms 8148 KB Output is correct
92 Correct 4 ms 8156 KB Output is correct
93 Correct 4 ms 8148 KB Output is correct
94 Correct 5 ms 8148 KB Output is correct
95 Correct 4 ms 8140 KB Output is correct
96 Correct 4 ms 8148 KB Output is correct
97 Correct 4 ms 8148 KB Output is correct
98 Correct 5 ms 8148 KB Output is correct
99 Correct 4 ms 8148 KB Output is correct
100 Correct 4 ms 8148 KB Output is correct
101 Correct 4 ms 8148 KB Output is correct
102 Correct 4 ms 8148 KB Output is correct
103 Correct 5 ms 8144 KB Output is correct
104 Correct 5 ms 8148 KB Output is correct
105 Correct 4 ms 8148 KB Output is correct
106 Correct 4 ms 8148 KB Output is correct
107 Correct 6 ms 8096 KB Output is correct
108 Correct 5 ms 8148 KB Output is correct
109 Correct 5 ms 8148 KB Output is correct
110 Correct 4 ms 8148 KB Output is correct
111 Correct 6 ms 8148 KB Output is correct
112 Correct 4 ms 8148 KB Output is correct
113 Correct 6 ms 8148 KB Output is correct
114 Correct 5 ms 8148 KB Output is correct
115 Correct 5 ms 8148 KB Output is correct
116 Correct 5 ms 8148 KB Output is correct
117 Correct 4 ms 8148 KB Output is correct
118 Correct 5 ms 8148 KB Output is correct
119 Correct 4 ms 8148 KB Output is correct
120 Correct 4 ms 8148 KB Output is correct
121 Correct 9 ms 8660 KB Output is correct
122 Correct 8 ms 8644 KB Output is correct
123 Correct 8 ms 8648 KB Output is correct
124 Correct 10 ms 8660 KB Output is correct
125 Correct 9 ms 8644 KB Output is correct
126 Correct 8 ms 8548 KB Output is correct
127 Correct 8 ms 8532 KB Output is correct
128 Correct 8 ms 8532 KB Output is correct
129 Correct 7 ms 8404 KB Output is correct
130 Correct 4 ms 8152 KB Output is correct
131 Correct 7 ms 8544 KB Output is correct
132 Correct 9 ms 8564 KB Output is correct
133 Correct 5 ms 8160 KB Output is correct
134 Correct 8 ms 8672 KB Output is correct
135 Correct 5 ms 8164 KB Output is correct
136 Correct 9 ms 8648 KB Output is correct
137 Correct 9 ms 8660 KB Output is correct
138 Correct 8 ms 8660 KB Output is correct
139 Correct 9 ms 8660 KB Output is correct
140 Correct 9 ms 8620 KB Output is correct
141 Correct 9 ms 8636 KB Output is correct
142 Correct 9 ms 8648 KB Output is correct
143 Correct 8 ms 8640 KB Output is correct
144 Correct 9 ms 8660 KB Output is correct
145 Correct 9 ms 8644 KB Output is correct
146 Correct 8 ms 8676 KB Output is correct
147 Correct 10 ms 8660 KB Output is correct
148 Correct 8 ms 8564 KB Output is correct
149 Correct 9 ms 8660 KB Output is correct
150 Correct 9 ms 8560 KB Output is correct
151 Correct 41 ms 12232 KB Output is correct
152 Correct 35 ms 12104 KB Output is correct
153 Correct 36 ms 12216 KB Output is correct
154 Correct 38 ms 12488 KB Output is correct
155 Correct 37 ms 12252 KB Output is correct
156 Correct 38 ms 12344 KB Output is correct
157 Correct 39 ms 12340 KB Output is correct
158 Correct 5 ms 8176 KB Output is correct
159 Correct 27 ms 11440 KB Output is correct
160 Correct 29 ms 11848 KB Output is correct
161 Correct 22 ms 10604 KB Output is correct
162 Correct 36 ms 12424 KB Output is correct
163 Correct 18 ms 10140 KB Output is correct
164 Correct 13 ms 9432 KB Output is correct
165 Correct 18 ms 10304 KB Output is correct
166 Correct 36 ms 12232 KB Output is correct
167 Correct 35 ms 12360 KB Output is correct
168 Correct 37 ms 12348 KB Output is correct
169 Correct 40 ms 12320 KB Output is correct
170 Correct 37 ms 12300 KB Output is correct
171 Correct 36 ms 12344 KB Output is correct
172 Correct 34 ms 12360 KB Output is correct
173 Correct 36 ms 12480 KB Output is correct
174 Correct 39 ms 12336 KB Output is correct
175 Correct 36 ms 12460 KB Output is correct
176 Correct 39 ms 12484 KB Output is correct
177 Correct 35 ms 12056 KB Output is correct
178 Correct 35 ms 12068 KB Output is correct
179 Correct 34 ms 12240 KB Output is correct
180 Correct 40 ms 12488 KB Output is correct
181 Correct 158 ms 24868 KB Output is correct
182 Correct 157 ms 25388 KB Output is correct
183 Correct 163 ms 25516 KB Output is correct
184 Correct 150 ms 24620 KB Output is correct
185 Correct 153 ms 24456 KB Output is correct
186 Correct 154 ms 24528 KB Output is correct
187 Correct 160 ms 25384 KB Output is correct
188 Correct 9 ms 8660 KB Output is correct
189 Correct 8 ms 8660 KB Output is correct
190 Correct 5 ms 8276 KB Output is correct
191 Correct 9 ms 9176 KB Output is correct
192 Correct 154 ms 24756 KB Output is correct
193 Correct 7 ms 8532 KB Output is correct
194 Correct 11 ms 9064 KB Output is correct
195 Correct 6 ms 8288 KB Output is correct
196 Correct 140 ms 27564 KB Output is correct
197 Correct 136 ms 26924 KB Output is correct
198 Correct 142 ms 28080 KB Output is correct
199 Correct 144 ms 27948 KB Output is correct
200 Correct 154 ms 28204 KB Output is correct
201 Correct 144 ms 27312 KB Output is correct
202 Correct 150 ms 27600 KB Output is correct
203 Correct 158 ms 25012 KB Output is correct
204 Correct 139 ms 26928 KB Output is correct
205 Correct 155 ms 25388 KB Output is correct
206 Correct 151 ms 24880 KB Output is correct
207 Correct 149 ms 24628 KB Output is correct
208 Correct 156 ms 25396 KB Output is correct
209 Correct 150 ms 25132 KB Output is correct
210 Correct 155 ms 24872 KB Output is correct