답안 #986281

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
986281 2024-05-20T08:37:51 Z alexdd Interval Collection (CCO20_day2problem2) C++17
25 / 25
3230 ms 307136 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 1e9;
const int maxv = 1000010;
struct node
{
    int rez;
    int tole,tori;
};
node combine(node x, node y)
{
    node aux;
    aux.rez = min(min(x.rez,y.rez),x.tole+y.tori);
    aux.tori = min(y.tori, x.tori);
    aux.tole = min(x.tole, y.tole);
    return aux;
}
node aint[2100000];
void build(int nod, int st, int dr)
{
    aint[nod].rez = aint[nod].tole = aint[nod].tori = INF;
    if(st==dr)
        return;
    int mij=(st+dr)/2;
    build(nod*2,st,mij);
    build(nod*2+1,mij+1,dr);
}
void upd(int nod, int st, int dr, int poz, int tip, int newv)
{
    if(st==dr)
    {
        if(tip==0)
        {
            aint[nod].tori = newv;
        }
        else
        {
            aint[nod].tole = -newv;
        }
        return;
    }
    int mij=(st+dr)/2;
    if(poz<=mij) upd(nod*2,st,mij,poz,tip,newv);
    else upd(nod*2+1,mij+1,dr,poz,tip,newv);
    aint[nod] = combine(aint[nod*2], aint[nod*2+1]);
}

set<pair<int,int>> sle[1000005],sri[1000005];
set<pair<int,int>> caple,capri,slun;
signed main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);
    int t;
    cin>>t;
    char tip;
    int le,ri;
    build(1,0,maxv);
    while(t--)
    {
        cin>>tip>>le>>ri;
        le++;ri++;
        upd(1,0,maxv,ri-1,1,-INF);
        upd(1,0,maxv,le,0,INF);
        if(tip=='A')
        {
            sle[ri].insert({le,t});
            sri[le].insert({ri,t});
            caple.insert({le,t});
            capri.insert({ri,t});
            slun.insert({ri-le,t});
        }
        else
        {
            sle[ri].erase(sle[ri].lower_bound({le,0}));
            sri[le].erase(sri[le].lower_bound({ri,0}));
            caple.erase(caple.lower_bound({le,0}));
            capri.erase(capri.lower_bound({ri,0}));
            slun.erase(slun.lower_bound({ri-le,0}));
        }
        if(!sle[ri].empty()) upd(1,0,maxv,ri-1,1,(*prev(sle[ri].end())).first);
        if(!sri[le].empty()) upd(1,0,maxv,le,0,(*sri[le].begin()).first);

        int maxle = (*prev(caple.end())).first;
        int minri = (*capri.begin()).first;

        if(maxle>=minri)
        {
            cout<<aint[1].rez<<"\n";
        }
        else
        {
            int cv=0;
            cv += (*sri[maxle].begin()).first;
            cv -= (*prev(sle[minri].end())).first;
            cout<<cv<<"\n";
        }
    }
    return 0;
}
/**
5
A 1 5
A 2 7
A 4 6
A 6 8
R 4 6
*/
# 결과 실행 시간 메모리 Grader output
1 Correct 35 ms 143708 KB Output is correct
2 Correct 35 ms 143448 KB Output is correct
3 Correct 34 ms 143456 KB Output is correct
4 Correct 32 ms 143440 KB Output is correct
5 Correct 33 ms 143708 KB Output is correct
6 Correct 32 ms 143580 KB Output is correct
7 Correct 33 ms 143452 KB Output is correct
8 Correct 31 ms 143444 KB Output is correct
9 Correct 33 ms 143696 KB Output is correct
10 Correct 32 ms 143696 KB Output is correct
11 Correct 32 ms 143700 KB Output is correct
12 Correct 32 ms 143708 KB Output is correct
13 Correct 34 ms 143544 KB Output is correct
14 Correct 33 ms 143672 KB Output is correct
15 Correct 33 ms 143700 KB Output is correct
16 Correct 33 ms 143700 KB Output is correct
17 Correct 34 ms 143692 KB Output is correct
18 Correct 32 ms 143612 KB Output is correct
19 Correct 33 ms 143700 KB Output is correct
20 Correct 31 ms 143440 KB Output is correct
21 Correct 38 ms 143700 KB Output is correct
22 Correct 31 ms 143448 KB Output is correct
23 Correct 31 ms 143444 KB Output is correct
24 Correct 32 ms 143452 KB Output is correct
25 Correct 32 ms 143736 KB Output is correct
26 Correct 33 ms 143724 KB Output is correct
27 Correct 33 ms 143600 KB Output is correct
28 Correct 32 ms 143700 KB Output is correct
29 Correct 32 ms 143704 KB Output is correct
30 Correct 32 ms 143704 KB Output is correct
31 Correct 33 ms 143816 KB Output is correct
32 Correct 34 ms 143592 KB Output is correct
33 Correct 33 ms 143448 KB Output is correct
34 Correct 36 ms 143700 KB Output is correct
35 Correct 31 ms 143448 KB Output is correct
36 Correct 31 ms 143452 KB Output is correct
37 Correct 33 ms 143452 KB Output is correct
38 Correct 32 ms 143740 KB Output is correct
39 Correct 32 ms 143452 KB Output is correct
40 Correct 31 ms 143624 KB Output is correct
41 Correct 34 ms 143708 KB Output is correct
42 Correct 36 ms 143704 KB Output is correct
43 Correct 32 ms 143452 KB Output is correct
44 Correct 32 ms 143444 KB Output is correct
45 Correct 33 ms 143692 KB Output is correct
46 Correct 33 ms 143444 KB Output is correct
47 Correct 31 ms 143580 KB Output is correct
48 Correct 31 ms 143636 KB Output is correct
49 Correct 33 ms 143700 KB Output is correct
50 Correct 33 ms 143704 KB Output is correct
51 Correct 32 ms 143708 KB Output is correct
52 Correct 32 ms 143576 KB Output is correct
53 Correct 32 ms 143708 KB Output is correct
54 Correct 32 ms 143552 KB Output is correct
55 Correct 34 ms 143708 KB Output is correct
56 Correct 35 ms 143708 KB Output is correct
57 Correct 32 ms 143708 KB Output is correct
58 Correct 32 ms 143472 KB Output is correct
59 Correct 32 ms 143708 KB Output is correct
60 Correct 32 ms 143708 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 35 ms 143708 KB Output is correct
2 Correct 35 ms 143448 KB Output is correct
3 Correct 34 ms 143456 KB Output is correct
4 Correct 32 ms 143440 KB Output is correct
5 Correct 33 ms 143708 KB Output is correct
6 Correct 32 ms 143580 KB Output is correct
7 Correct 33 ms 143452 KB Output is correct
8 Correct 31 ms 143444 KB Output is correct
9 Correct 33 ms 143696 KB Output is correct
10 Correct 32 ms 143696 KB Output is correct
11 Correct 32 ms 143700 KB Output is correct
12 Correct 32 ms 143708 KB Output is correct
13 Correct 34 ms 143544 KB Output is correct
14 Correct 33 ms 143672 KB Output is correct
15 Correct 33 ms 143700 KB Output is correct
16 Correct 33 ms 143700 KB Output is correct
17 Correct 34 ms 143692 KB Output is correct
18 Correct 32 ms 143612 KB Output is correct
19 Correct 33 ms 143700 KB Output is correct
20 Correct 31 ms 143440 KB Output is correct
21 Correct 38 ms 143700 KB Output is correct
22 Correct 31 ms 143448 KB Output is correct
23 Correct 31 ms 143444 KB Output is correct
24 Correct 32 ms 143452 KB Output is correct
25 Correct 32 ms 143736 KB Output is correct
26 Correct 33 ms 143724 KB Output is correct
27 Correct 33 ms 143600 KB Output is correct
28 Correct 32 ms 143700 KB Output is correct
29 Correct 32 ms 143704 KB Output is correct
30 Correct 32 ms 143704 KB Output is correct
31 Correct 33 ms 143816 KB Output is correct
32 Correct 34 ms 143592 KB Output is correct
33 Correct 33 ms 143448 KB Output is correct
34 Correct 36 ms 143700 KB Output is correct
35 Correct 31 ms 143448 KB Output is correct
36 Correct 31 ms 143452 KB Output is correct
37 Correct 33 ms 143452 KB Output is correct
38 Correct 32 ms 143740 KB Output is correct
39 Correct 32 ms 143452 KB Output is correct
40 Correct 31 ms 143624 KB Output is correct
41 Correct 34 ms 143708 KB Output is correct
42 Correct 36 ms 143704 KB Output is correct
43 Correct 32 ms 143452 KB Output is correct
44 Correct 32 ms 143444 KB Output is correct
45 Correct 33 ms 143692 KB Output is correct
46 Correct 33 ms 143444 KB Output is correct
47 Correct 31 ms 143580 KB Output is correct
48 Correct 31 ms 143636 KB Output is correct
49 Correct 33 ms 143700 KB Output is correct
50 Correct 33 ms 143704 KB Output is correct
51 Correct 32 ms 143708 KB Output is correct
52 Correct 32 ms 143576 KB Output is correct
53 Correct 32 ms 143708 KB Output is correct
54 Correct 32 ms 143552 KB Output is correct
55 Correct 34 ms 143708 KB Output is correct
56 Correct 35 ms 143708 KB Output is correct
57 Correct 32 ms 143708 KB Output is correct
58 Correct 32 ms 143472 KB Output is correct
59 Correct 32 ms 143708 KB Output is correct
60 Correct 32 ms 143708 KB Output is correct
61 Correct 32 ms 143452 KB Output is correct
62 Correct 32 ms 143452 KB Output is correct
63 Correct 33 ms 143440 KB Output is correct
64 Correct 58 ms 145744 KB Output is correct
65 Correct 51 ms 144212 KB Output is correct
66 Correct 47 ms 143816 KB Output is correct
67 Correct 45 ms 143888 KB Output is correct
68 Correct 59 ms 145748 KB Output is correct
69 Correct 61 ms 144468 KB Output is correct
70 Correct 49 ms 143856 KB Output is correct
71 Correct 47 ms 143948 KB Output is correct
72 Correct 64 ms 146752 KB Output is correct
73 Correct 61 ms 146040 KB Output is correct
74 Correct 60 ms 146000 KB Output is correct
75 Correct 59 ms 146080 KB Output is correct
76 Correct 64 ms 147536 KB Output is correct
77 Correct 65 ms 147456 KB Output is correct
78 Correct 67 ms 147540 KB Output is correct
79 Correct 82 ms 147792 KB Output is correct
80 Correct 59 ms 145748 KB Output is correct
81 Correct 54 ms 144228 KB Output is correct
82 Correct 47 ms 143692 KB Output is correct
83 Correct 47 ms 143832 KB Output is correct
84 Correct 59 ms 145764 KB Output is correct
85 Correct 52 ms 144212 KB Output is correct
86 Correct 50 ms 143952 KB Output is correct
87 Correct 48 ms 143880 KB Output is correct
88 Correct 62 ms 146768 KB Output is correct
89 Correct 60 ms 146180 KB Output is correct
90 Correct 59 ms 146040 KB Output is correct
91 Correct 61 ms 145996 KB Output is correct
92 Correct 65 ms 147536 KB Output is correct
93 Correct 66 ms 147444 KB Output is correct
94 Correct 63 ms 147536 KB Output is correct
95 Correct 67 ms 147536 KB Output is correct
96 Correct 45 ms 143852 KB Output is correct
97 Correct 44 ms 143700 KB Output is correct
98 Correct 44 ms 143700 KB Output is correct
99 Correct 46 ms 143696 KB Output is correct
100 Correct 54 ms 143808 KB Output is correct
101 Correct 45 ms 144168 KB Output is correct
102 Correct 48 ms 143728 KB Output is correct
103 Correct 45 ms 143708 KB Output is correct
104 Correct 60 ms 145580 KB Output is correct
105 Correct 49 ms 144048 KB Output is correct
106 Correct 46 ms 143832 KB Output is correct
107 Correct 45 ms 143696 KB Output is correct
108 Correct 55 ms 145748 KB Output is correct
109 Correct 49 ms 144216 KB Output is correct
110 Correct 47 ms 143696 KB Output is correct
111 Correct 45 ms 143704 KB Output is correct
112 Correct 47 ms 145744 KB Output is correct
113 Correct 49 ms 145764 KB Output is correct
114 Correct 48 ms 145768 KB Output is correct
115 Correct 47 ms 145756 KB Output is correct
116 Correct 53 ms 145900 KB Output is correct
117 Correct 51 ms 145624 KB Output is correct
118 Correct 45 ms 145744 KB Output is correct
119 Correct 48 ms 145756 KB Output is correct
120 Correct 46 ms 145608 KB Output is correct
121 Correct 53 ms 145760 KB Output is correct
122 Correct 53 ms 147536 KB Output is correct
123 Correct 52 ms 147540 KB Output is correct
124 Correct 46 ms 144220 KB Output is correct
125 Correct 45 ms 143940 KB Output is correct
126 Correct 44 ms 143952 KB Output is correct
127 Correct 48 ms 144468 KB Output is correct
128 Correct 45 ms 144244 KB Output is correct
129 Correct 44 ms 143952 KB Output is correct
130 Correct 48 ms 144724 KB Output is correct
131 Correct 45 ms 143956 KB Output is correct
132 Correct 45 ms 143956 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 35 ms 143708 KB Output is correct
2 Correct 35 ms 143448 KB Output is correct
3 Correct 34 ms 143456 KB Output is correct
4 Correct 32 ms 143440 KB Output is correct
5 Correct 33 ms 143708 KB Output is correct
6 Correct 32 ms 143580 KB Output is correct
7 Correct 33 ms 143452 KB Output is correct
8 Correct 31 ms 143444 KB Output is correct
9 Correct 33 ms 143696 KB Output is correct
10 Correct 32 ms 143696 KB Output is correct
11 Correct 32 ms 143700 KB Output is correct
12 Correct 32 ms 143708 KB Output is correct
13 Correct 34 ms 143544 KB Output is correct
14 Correct 33 ms 143672 KB Output is correct
15 Correct 33 ms 143700 KB Output is correct
16 Correct 33 ms 143700 KB Output is correct
17 Correct 34 ms 143692 KB Output is correct
18 Correct 32 ms 143612 KB Output is correct
19 Correct 33 ms 143700 KB Output is correct
20 Correct 31 ms 143440 KB Output is correct
21 Correct 38 ms 143700 KB Output is correct
22 Correct 31 ms 143448 KB Output is correct
23 Correct 31 ms 143444 KB Output is correct
24 Correct 32 ms 143452 KB Output is correct
25 Correct 32 ms 143736 KB Output is correct
26 Correct 33 ms 143724 KB Output is correct
27 Correct 33 ms 143600 KB Output is correct
28 Correct 32 ms 143700 KB Output is correct
29 Correct 32 ms 143704 KB Output is correct
30 Correct 32 ms 143704 KB Output is correct
31 Correct 33 ms 143816 KB Output is correct
32 Correct 34 ms 143592 KB Output is correct
33 Correct 33 ms 143448 KB Output is correct
34 Correct 36 ms 143700 KB Output is correct
35 Correct 31 ms 143448 KB Output is correct
36 Correct 31 ms 143452 KB Output is correct
37 Correct 33 ms 143452 KB Output is correct
38 Correct 32 ms 143740 KB Output is correct
39 Correct 32 ms 143452 KB Output is correct
40 Correct 31 ms 143624 KB Output is correct
41 Correct 34 ms 143708 KB Output is correct
42 Correct 36 ms 143704 KB Output is correct
43 Correct 32 ms 143452 KB Output is correct
44 Correct 32 ms 143444 KB Output is correct
45 Correct 33 ms 143692 KB Output is correct
46 Correct 33 ms 143444 KB Output is correct
47 Correct 31 ms 143580 KB Output is correct
48 Correct 31 ms 143636 KB Output is correct
49 Correct 33 ms 143700 KB Output is correct
50 Correct 33 ms 143704 KB Output is correct
51 Correct 32 ms 143708 KB Output is correct
52 Correct 32 ms 143576 KB Output is correct
53 Correct 32 ms 143708 KB Output is correct
54 Correct 32 ms 143552 KB Output is correct
55 Correct 34 ms 143708 KB Output is correct
56 Correct 35 ms 143708 KB Output is correct
57 Correct 32 ms 143708 KB Output is correct
58 Correct 32 ms 143472 KB Output is correct
59 Correct 32 ms 143708 KB Output is correct
60 Correct 32 ms 143708 KB Output is correct
61 Correct 32 ms 143452 KB Output is correct
62 Correct 32 ms 143452 KB Output is correct
63 Correct 33 ms 143440 KB Output is correct
64 Correct 58 ms 145744 KB Output is correct
65 Correct 51 ms 144212 KB Output is correct
66 Correct 47 ms 143816 KB Output is correct
67 Correct 45 ms 143888 KB Output is correct
68 Correct 59 ms 145748 KB Output is correct
69 Correct 61 ms 144468 KB Output is correct
70 Correct 49 ms 143856 KB Output is correct
71 Correct 47 ms 143948 KB Output is correct
72 Correct 64 ms 146752 KB Output is correct
73 Correct 61 ms 146040 KB Output is correct
74 Correct 60 ms 146000 KB Output is correct
75 Correct 59 ms 146080 KB Output is correct
76 Correct 64 ms 147536 KB Output is correct
77 Correct 65 ms 147456 KB Output is correct
78 Correct 67 ms 147540 KB Output is correct
79 Correct 82 ms 147792 KB Output is correct
80 Correct 59 ms 145748 KB Output is correct
81 Correct 54 ms 144228 KB Output is correct
82 Correct 47 ms 143692 KB Output is correct
83 Correct 47 ms 143832 KB Output is correct
84 Correct 59 ms 145764 KB Output is correct
85 Correct 52 ms 144212 KB Output is correct
86 Correct 50 ms 143952 KB Output is correct
87 Correct 48 ms 143880 KB Output is correct
88 Correct 62 ms 146768 KB Output is correct
89 Correct 60 ms 146180 KB Output is correct
90 Correct 59 ms 146040 KB Output is correct
91 Correct 61 ms 145996 KB Output is correct
92 Correct 65 ms 147536 KB Output is correct
93 Correct 66 ms 147444 KB Output is correct
94 Correct 63 ms 147536 KB Output is correct
95 Correct 67 ms 147536 KB Output is correct
96 Correct 45 ms 143852 KB Output is correct
97 Correct 44 ms 143700 KB Output is correct
98 Correct 44 ms 143700 KB Output is correct
99 Correct 46 ms 143696 KB Output is correct
100 Correct 54 ms 143808 KB Output is correct
101 Correct 45 ms 144168 KB Output is correct
102 Correct 48 ms 143728 KB Output is correct
103 Correct 45 ms 143708 KB Output is correct
104 Correct 60 ms 145580 KB Output is correct
105 Correct 49 ms 144048 KB Output is correct
106 Correct 46 ms 143832 KB Output is correct
107 Correct 45 ms 143696 KB Output is correct
108 Correct 55 ms 145748 KB Output is correct
109 Correct 49 ms 144216 KB Output is correct
110 Correct 47 ms 143696 KB Output is correct
111 Correct 45 ms 143704 KB Output is correct
112 Correct 47 ms 145744 KB Output is correct
113 Correct 49 ms 145764 KB Output is correct
114 Correct 48 ms 145768 KB Output is correct
115 Correct 47 ms 145756 KB Output is correct
116 Correct 53 ms 145900 KB Output is correct
117 Correct 51 ms 145624 KB Output is correct
118 Correct 45 ms 145744 KB Output is correct
119 Correct 48 ms 145756 KB Output is correct
120 Correct 46 ms 145608 KB Output is correct
121 Correct 53 ms 145760 KB Output is correct
122 Correct 53 ms 147536 KB Output is correct
123 Correct 52 ms 147540 KB Output is correct
124 Correct 46 ms 144220 KB Output is correct
125 Correct 45 ms 143940 KB Output is correct
126 Correct 44 ms 143952 KB Output is correct
127 Correct 48 ms 144468 KB Output is correct
128 Correct 45 ms 144244 KB Output is correct
129 Correct 44 ms 143952 KB Output is correct
130 Correct 48 ms 144724 KB Output is correct
131 Correct 45 ms 143956 KB Output is correct
132 Correct 45 ms 143956 KB Output is correct
133 Correct 183 ms 152356 KB Output is correct
134 Correct 129 ms 145748 KB Output is correct
135 Correct 108 ms 144464 KB Output is correct
136 Correct 91 ms 144304 KB Output is correct
137 Correct 176 ms 152260 KB Output is correct
138 Correct 133 ms 146004 KB Output is correct
139 Correct 127 ms 144664 KB Output is correct
140 Correct 107 ms 144372 KB Output is correct
141 Correct 190 ms 156752 KB Output is correct
142 Correct 208 ms 154140 KB Output is correct
143 Correct 177 ms 153932 KB Output is correct
144 Correct 168 ms 153668 KB Output is correct
145 Correct 203 ms 159828 KB Output is correct
146 Correct 229 ms 159832 KB Output is correct
147 Correct 208 ms 159824 KB Output is correct
148 Correct 215 ms 160080 KB Output is correct
149 Correct 168 ms 152148 KB Output is correct
150 Correct 131 ms 145732 KB Output is correct
151 Correct 114 ms 144468 KB Output is correct
152 Correct 86 ms 144384 KB Output is correct
153 Correct 170 ms 152180 KB Output is correct
154 Correct 129 ms 146040 KB Output is correct
155 Correct 109 ms 144468 KB Output is correct
156 Correct 109 ms 144604 KB Output is correct
157 Correct 193 ms 156752 KB Output is correct
158 Correct 185 ms 154196 KB Output is correct
159 Correct 179 ms 153684 KB Output is correct
160 Correct 168 ms 153564 KB Output is correct
161 Correct 207 ms 159992 KB Output is correct
162 Correct 214 ms 159968 KB Output is correct
163 Correct 206 ms 159828 KB Output is correct
164 Correct 225 ms 159824 KB Output is correct
165 Correct 91 ms 144532 KB Output is correct
166 Correct 86 ms 144468 KB Output is correct
167 Correct 85 ms 144344 KB Output is correct
168 Correct 85 ms 144384 KB Output is correct
169 Correct 107 ms 144692 KB Output is correct
170 Correct 100 ms 144472 KB Output is correct
171 Correct 95 ms 144464 KB Output is correct
172 Correct 100 ms 144440 KB Output is correct
173 Correct 166 ms 152400 KB Output is correct
174 Correct 125 ms 145748 KB Output is correct
175 Correct 106 ms 144544 KB Output is correct
176 Correct 90 ms 144324 KB Output is correct
177 Correct 151 ms 152060 KB Output is correct
178 Correct 125 ms 145776 KB Output is correct
179 Correct 108 ms 144448 KB Output is correct
180 Correct 96 ms 144776 KB Output is correct
181 Correct 104 ms 152404 KB Output is correct
182 Correct 120 ms 152504 KB Output is correct
183 Correct 96 ms 152408 KB Output is correct
184 Correct 124 ms 152548 KB Output is correct
185 Correct 123 ms 152396 KB Output is correct
186 Correct 126 ms 152404 KB Output is correct
187 Correct 96 ms 152336 KB Output is correct
188 Correct 115 ms 152404 KB Output is correct
189 Correct 103 ms 152400 KB Output is correct
190 Correct 122 ms 152400 KB Output is correct
191 Correct 119 ms 160256 KB Output is correct
192 Correct 117 ms 159920 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 365 ms 208492 KB Output is correct
2 Correct 379 ms 208304 KB Output is correct
3 Correct 703 ms 273236 KB Output is correct
4 Correct 686 ms 272988 KB Output is correct
5 Correct 855 ms 305408 KB Output is correct
6 Correct 862 ms 305280 KB Output is correct
7 Correct 768 ms 152764 KB Output is correct
8 Correct 622 ms 149384 KB Output is correct
9 Correct 593 ms 149024 KB Output is correct
10 Correct 919 ms 158396 KB Output is correct
11 Correct 614 ms 149260 KB Output is correct
12 Correct 628 ms 148864 KB Output is correct
13 Correct 920 ms 160848 KB Output is correct
14 Correct 613 ms 149328 KB Output is correct
15 Correct 588 ms 148788 KB Output is correct
16 Correct 545 ms 149588 KB Output is correct
17 Correct 537 ms 149412 KB Output is correct
18 Correct 586 ms 149332 KB Output is correct
19 Correct 535 ms 149304 KB Output is correct
20 Correct 560 ms 149640 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 35 ms 143708 KB Output is correct
2 Correct 35 ms 143448 KB Output is correct
3 Correct 34 ms 143456 KB Output is correct
4 Correct 32 ms 143440 KB Output is correct
5 Correct 33 ms 143708 KB Output is correct
6 Correct 32 ms 143580 KB Output is correct
7 Correct 33 ms 143452 KB Output is correct
8 Correct 31 ms 143444 KB Output is correct
9 Correct 33 ms 143696 KB Output is correct
10 Correct 32 ms 143696 KB Output is correct
11 Correct 32 ms 143700 KB Output is correct
12 Correct 32 ms 143708 KB Output is correct
13 Correct 34 ms 143544 KB Output is correct
14 Correct 33 ms 143672 KB Output is correct
15 Correct 33 ms 143700 KB Output is correct
16 Correct 33 ms 143700 KB Output is correct
17 Correct 34 ms 143692 KB Output is correct
18 Correct 32 ms 143612 KB Output is correct
19 Correct 33 ms 143700 KB Output is correct
20 Correct 31 ms 143440 KB Output is correct
21 Correct 38 ms 143700 KB Output is correct
22 Correct 31 ms 143448 KB Output is correct
23 Correct 31 ms 143444 KB Output is correct
24 Correct 32 ms 143452 KB Output is correct
25 Correct 32 ms 143736 KB Output is correct
26 Correct 33 ms 143724 KB Output is correct
27 Correct 33 ms 143600 KB Output is correct
28 Correct 32 ms 143700 KB Output is correct
29 Correct 32 ms 143704 KB Output is correct
30 Correct 32 ms 143704 KB Output is correct
31 Correct 33 ms 143816 KB Output is correct
32 Correct 34 ms 143592 KB Output is correct
33 Correct 33 ms 143448 KB Output is correct
34 Correct 36 ms 143700 KB Output is correct
35 Correct 31 ms 143448 KB Output is correct
36 Correct 31 ms 143452 KB Output is correct
37 Correct 33 ms 143452 KB Output is correct
38 Correct 32 ms 143740 KB Output is correct
39 Correct 32 ms 143452 KB Output is correct
40 Correct 31 ms 143624 KB Output is correct
41 Correct 34 ms 143708 KB Output is correct
42 Correct 36 ms 143704 KB Output is correct
43 Correct 32 ms 143452 KB Output is correct
44 Correct 32 ms 143444 KB Output is correct
45 Correct 33 ms 143692 KB Output is correct
46 Correct 33 ms 143444 KB Output is correct
47 Correct 31 ms 143580 KB Output is correct
48 Correct 31 ms 143636 KB Output is correct
49 Correct 33 ms 143700 KB Output is correct
50 Correct 33 ms 143704 KB Output is correct
51 Correct 32 ms 143708 KB Output is correct
52 Correct 32 ms 143576 KB Output is correct
53 Correct 32 ms 143708 KB Output is correct
54 Correct 32 ms 143552 KB Output is correct
55 Correct 34 ms 143708 KB Output is correct
56 Correct 35 ms 143708 KB Output is correct
57 Correct 32 ms 143708 KB Output is correct
58 Correct 32 ms 143472 KB Output is correct
59 Correct 32 ms 143708 KB Output is correct
60 Correct 32 ms 143708 KB Output is correct
61 Correct 32 ms 143452 KB Output is correct
62 Correct 32 ms 143452 KB Output is correct
63 Correct 33 ms 143440 KB Output is correct
64 Correct 58 ms 145744 KB Output is correct
65 Correct 51 ms 144212 KB Output is correct
66 Correct 47 ms 143816 KB Output is correct
67 Correct 45 ms 143888 KB Output is correct
68 Correct 59 ms 145748 KB Output is correct
69 Correct 61 ms 144468 KB Output is correct
70 Correct 49 ms 143856 KB Output is correct
71 Correct 47 ms 143948 KB Output is correct
72 Correct 64 ms 146752 KB Output is correct
73 Correct 61 ms 146040 KB Output is correct
74 Correct 60 ms 146000 KB Output is correct
75 Correct 59 ms 146080 KB Output is correct
76 Correct 64 ms 147536 KB Output is correct
77 Correct 65 ms 147456 KB Output is correct
78 Correct 67 ms 147540 KB Output is correct
79 Correct 82 ms 147792 KB Output is correct
80 Correct 59 ms 145748 KB Output is correct
81 Correct 54 ms 144228 KB Output is correct
82 Correct 47 ms 143692 KB Output is correct
83 Correct 47 ms 143832 KB Output is correct
84 Correct 59 ms 145764 KB Output is correct
85 Correct 52 ms 144212 KB Output is correct
86 Correct 50 ms 143952 KB Output is correct
87 Correct 48 ms 143880 KB Output is correct
88 Correct 62 ms 146768 KB Output is correct
89 Correct 60 ms 146180 KB Output is correct
90 Correct 59 ms 146040 KB Output is correct
91 Correct 61 ms 145996 KB Output is correct
92 Correct 65 ms 147536 KB Output is correct
93 Correct 66 ms 147444 KB Output is correct
94 Correct 63 ms 147536 KB Output is correct
95 Correct 67 ms 147536 KB Output is correct
96 Correct 45 ms 143852 KB Output is correct
97 Correct 44 ms 143700 KB Output is correct
98 Correct 44 ms 143700 KB Output is correct
99 Correct 46 ms 143696 KB Output is correct
100 Correct 54 ms 143808 KB Output is correct
101 Correct 45 ms 144168 KB Output is correct
102 Correct 48 ms 143728 KB Output is correct
103 Correct 45 ms 143708 KB Output is correct
104 Correct 60 ms 145580 KB Output is correct
105 Correct 49 ms 144048 KB Output is correct
106 Correct 46 ms 143832 KB Output is correct
107 Correct 45 ms 143696 KB Output is correct
108 Correct 55 ms 145748 KB Output is correct
109 Correct 49 ms 144216 KB Output is correct
110 Correct 47 ms 143696 KB Output is correct
111 Correct 45 ms 143704 KB Output is correct
112 Correct 47 ms 145744 KB Output is correct
113 Correct 49 ms 145764 KB Output is correct
114 Correct 48 ms 145768 KB Output is correct
115 Correct 47 ms 145756 KB Output is correct
116 Correct 53 ms 145900 KB Output is correct
117 Correct 51 ms 145624 KB Output is correct
118 Correct 45 ms 145744 KB Output is correct
119 Correct 48 ms 145756 KB Output is correct
120 Correct 46 ms 145608 KB Output is correct
121 Correct 53 ms 145760 KB Output is correct
122 Correct 53 ms 147536 KB Output is correct
123 Correct 52 ms 147540 KB Output is correct
124 Correct 46 ms 144220 KB Output is correct
125 Correct 45 ms 143940 KB Output is correct
126 Correct 44 ms 143952 KB Output is correct
127 Correct 48 ms 144468 KB Output is correct
128 Correct 45 ms 144244 KB Output is correct
129 Correct 44 ms 143952 KB Output is correct
130 Correct 48 ms 144724 KB Output is correct
131 Correct 45 ms 143956 KB Output is correct
132 Correct 45 ms 143956 KB Output is correct
133 Correct 183 ms 152356 KB Output is correct
134 Correct 129 ms 145748 KB Output is correct
135 Correct 108 ms 144464 KB Output is correct
136 Correct 91 ms 144304 KB Output is correct
137 Correct 176 ms 152260 KB Output is correct
138 Correct 133 ms 146004 KB Output is correct
139 Correct 127 ms 144664 KB Output is correct
140 Correct 107 ms 144372 KB Output is correct
141 Correct 190 ms 156752 KB Output is correct
142 Correct 208 ms 154140 KB Output is correct
143 Correct 177 ms 153932 KB Output is correct
144 Correct 168 ms 153668 KB Output is correct
145 Correct 203 ms 159828 KB Output is correct
146 Correct 229 ms 159832 KB Output is correct
147 Correct 208 ms 159824 KB Output is correct
148 Correct 215 ms 160080 KB Output is correct
149 Correct 168 ms 152148 KB Output is correct
150 Correct 131 ms 145732 KB Output is correct
151 Correct 114 ms 144468 KB Output is correct
152 Correct 86 ms 144384 KB Output is correct
153 Correct 170 ms 152180 KB Output is correct
154 Correct 129 ms 146040 KB Output is correct
155 Correct 109 ms 144468 KB Output is correct
156 Correct 109 ms 144604 KB Output is correct
157 Correct 193 ms 156752 KB Output is correct
158 Correct 185 ms 154196 KB Output is correct
159 Correct 179 ms 153684 KB Output is correct
160 Correct 168 ms 153564 KB Output is correct
161 Correct 207 ms 159992 KB Output is correct
162 Correct 214 ms 159968 KB Output is correct
163 Correct 206 ms 159828 KB Output is correct
164 Correct 225 ms 159824 KB Output is correct
165 Correct 91 ms 144532 KB Output is correct
166 Correct 86 ms 144468 KB Output is correct
167 Correct 85 ms 144344 KB Output is correct
168 Correct 85 ms 144384 KB Output is correct
169 Correct 107 ms 144692 KB Output is correct
170 Correct 100 ms 144472 KB Output is correct
171 Correct 95 ms 144464 KB Output is correct
172 Correct 100 ms 144440 KB Output is correct
173 Correct 166 ms 152400 KB Output is correct
174 Correct 125 ms 145748 KB Output is correct
175 Correct 106 ms 144544 KB Output is correct
176 Correct 90 ms 144324 KB Output is correct
177 Correct 151 ms 152060 KB Output is correct
178 Correct 125 ms 145776 KB Output is correct
179 Correct 108 ms 144448 KB Output is correct
180 Correct 96 ms 144776 KB Output is correct
181 Correct 104 ms 152404 KB Output is correct
182 Correct 120 ms 152504 KB Output is correct
183 Correct 96 ms 152408 KB Output is correct
184 Correct 124 ms 152548 KB Output is correct
185 Correct 123 ms 152396 KB Output is correct
186 Correct 126 ms 152404 KB Output is correct
187 Correct 96 ms 152336 KB Output is correct
188 Correct 115 ms 152404 KB Output is correct
189 Correct 103 ms 152400 KB Output is correct
190 Correct 122 ms 152400 KB Output is correct
191 Correct 119 ms 160256 KB Output is correct
192 Correct 117 ms 159920 KB Output is correct
193 Correct 365 ms 208492 KB Output is correct
194 Correct 379 ms 208304 KB Output is correct
195 Correct 703 ms 273236 KB Output is correct
196 Correct 686 ms 272988 KB Output is correct
197 Correct 855 ms 305408 KB Output is correct
198 Correct 862 ms 305280 KB Output is correct
199 Correct 768 ms 152764 KB Output is correct
200 Correct 622 ms 149384 KB Output is correct
201 Correct 593 ms 149024 KB Output is correct
202 Correct 919 ms 158396 KB Output is correct
203 Correct 614 ms 149260 KB Output is correct
204 Correct 628 ms 148864 KB Output is correct
205 Correct 920 ms 160848 KB Output is correct
206 Correct 613 ms 149328 KB Output is correct
207 Correct 588 ms 148788 KB Output is correct
208 Correct 545 ms 149588 KB Output is correct
209 Correct 537 ms 149412 KB Output is correct
210 Correct 586 ms 149332 KB Output is correct
211 Correct 535 ms 149304 KB Output is correct
212 Correct 560 ms 149640 KB Output is correct
213 Correct 2610 ms 227864 KB Output is correct
214 Correct 1687 ms 165712 KB Output is correct
215 Correct 1016 ms 152400 KB Output is correct
216 Correct 674 ms 150976 KB Output is correct
217 Correct 2616 ms 228376 KB Output is correct
218 Correct 1721 ms 165968 KB Output is correct
219 Correct 1033 ms 152956 KB Output is correct
220 Correct 787 ms 150868 KB Output is correct
221 Correct 2869 ms 275376 KB Output is correct
222 Correct 2634 ms 250216 KB Output is correct
223 Correct 2749 ms 244200 KB Output is correct
224 Correct 2567 ms 243644 KB Output is correct
225 Correct 3002 ms 306352 KB Output is correct
226 Correct 3003 ms 306148 KB Output is correct
227 Correct 3084 ms 306424 KB Output is correct
228 Correct 3008 ms 307136 KB Output is correct
229 Correct 2677 ms 228036 KB Output is correct
230 Correct 1646 ms 165648 KB Output is correct
231 Correct 1002 ms 152588 KB Output is correct
232 Correct 683 ms 150992 KB Output is correct
233 Correct 2594 ms 228204 KB Output is correct
234 Correct 1728 ms 165516 KB Output is correct
235 Correct 1032 ms 153024 KB Output is correct
236 Correct 761 ms 151120 KB Output is correct
237 Correct 2959 ms 275252 KB Output is correct
238 Correct 2989 ms 251856 KB Output is correct
239 Correct 2804 ms 246816 KB Output is correct
240 Correct 2701 ms 245716 KB Output is correct
241 Correct 3214 ms 306244 KB Output is correct
242 Correct 3224 ms 306012 KB Output is correct
243 Correct 3230 ms 306024 KB Output is correct
244 Correct 3179 ms 306060 KB Output is correct
245 Correct 564 ms 151520 KB Output is correct
246 Correct 568 ms 150976 KB Output is correct
247 Correct 556 ms 151120 KB Output is correct
248 Correct 583 ms 151188 KB Output is correct
249 Correct 730 ms 151096 KB Output is correct
250 Correct 768 ms 150932 KB Output is correct
251 Correct 774 ms 151096 KB Output is correct
252 Correct 650 ms 151160 KB Output is correct
253 Correct 2554 ms 228192 KB Output is correct
254 Correct 1786 ms 165940 KB Output is correct
255 Correct 1057 ms 152624 KB Output is correct
256 Correct 745 ms 151112 KB Output is correct
257 Correct 2554 ms 228128 KB Output is correct
258 Correct 1864 ms 165824 KB Output is correct
259 Correct 1142 ms 152500 KB Output is correct
260 Correct 760 ms 151168 KB Output is correct
261 Correct 1086 ms 229516 KB Output is correct
262 Correct 1644 ms 229276 KB Output is correct
263 Correct 703 ms 228864 KB Output is correct
264 Correct 1242 ms 228788 KB Output is correct
265 Correct 1093 ms 229492 KB Output is correct
266 Correct 1692 ms 229280 KB Output is correct
267 Correct 699 ms 228932 KB Output is correct
268 Correct 1183 ms 228940 KB Output is correct
269 Correct 870 ms 305052 KB Output is correct
270 Correct 896 ms 305280 KB Output is correct
271 Correct 929 ms 154408 KB Output is correct
272 Correct 658 ms 149144 KB Output is correct
273 Correct 1010 ms 160464 KB Output is correct
274 Correct 621 ms 149332 KB Output is correct
275 Correct 726 ms 228336 KB Output is correct