#include <cstdio>
#include <deque>
#include <vector>
#include <algorithm>
using namespace std;
class SegmentTree{
struct node_t{
long long a,b;///LEAVE a, JOIN b
node_t operator + (const node_t &other)const{
node_t ans;
ans = *this;
ans.b -= other.a;
if(ans.b < 0){
ans.a -= ans.b;
ans.b = 0;
}
ans.b += other.b;
return ans;
}
node_t(){
a = b = 0;
}
node_t(long long a,long long b){
this->a = a;
this->b = b;
}
};
int n;
vector<node_t> aint;
void propagate(int nod,int st,int dr){
if(st == dr){
return ;
}
aint[nod * 2] = aint[nod * 2] + aint[nod];
aint[nod * 2 + 1] = aint[nod * 2 + 1] + aint[nod];
aint[nod] = node_t();
}
void update(int nod,int st,int dr,int l,int r,node_t val){
propagate(nod,st,dr);
if(dr < l || st > r){
return ;
}
if(l <= st && dr <= r){
aint[nod] = aint[nod] + val;
return ;
}
int mid = (st + dr) / 2;
update(nod * 2,st,mid,l,r,val);
update(nod * 2 + 1,mid + 1,dr,l,r,val);
}
node_t access(int nod,int st,int dr,int pos){
propagate(nod,st,dr);
if(dr < pos || st > pos){
return node_t();
}
if(st == dr){
return aint[nod];
}
int mid = (st + dr) / 2;
return access(nod * 2,st,mid,pos) + access(nod * 2 + 1,mid + 1,dr,pos);
}
public:
SegmentTree(int n){
this->n = n;
this->aint = vector<node_t>(4 * n + 5);
}
void add(int l,int r,long long value){
update(1,1,n,l,r,{0,value});
}
void remove(int l,int r,long long value){
update(1,1,n,l,r,{value,0});
}
long long access(int pos){
return access(1,1,n,pos).b;
}
};
class FenwickTree{
int n;
vector<long long> aib;
void update(int pos,long long value){
for(;pos <= n;pos += (-pos) & pos){
aib[pos] += value;
}
}
long long query(int pos){
long long ans = 0;
for(;pos;pos -= (-pos) & pos){
ans += aib[pos];
}
return ans;
}
public:
FenwickTree(int n){
this->n = n;
this->aib = vector<long long>(n + 1);
}
void add(int l,int r,long long value){
update(l,value);
update(r + 1,-value);
}
long long access(int pos){
return query(pos);
}
};
class SegmentTree2{///cause why not
int n;
vector<pair<long long,int> > aint;
vector<long long> lazy;
void propagate(int nod,int st,int dr){
if(lazy[nod] == 0 || st == dr){
return ;
}
lazy[nod * 2] += lazy[nod];
lazy[nod * 2 + 1] += lazy[nod];
aint[nod * 2].first += lazy[nod];
aint[nod * 2 + 1].first += lazy[nod];
lazy[nod] = 0;
}
void build(int nod,int st,int dr){
if(st == dr){
aint[nod] = {0,st};
return ;
}
int mid = (st + dr) / 2;
build(nod * 2,st,mid);
build(nod * 2 + 1,mid + 1,dr);
aint[nod] = min(aint[nod * 2],aint[nod * 2 + 1]);
}
void update_range(int nod,int st,int dr,int l,int r,long long value){
propagate(nod,st,dr);
if(r < st || l > dr){
return ;
}
if(l <= st && dr <= r){
aint[nod].first += value;
lazy[nod] += value;
return ;
}
int mid = (st + dr) / 2;
update_range(nod * 2,st,mid,l,r,value);
update_range(nod * 2 + 1,mid + 1,dr,l,r,value);
aint[nod] = min(aint[nod * 2],aint[nod * 2 + 1]);
}
void update_set(int nod,int st,int dr,int pos,long long value){
propagate(nod,st,dr);
if(dr < pos || st > pos){
return ;
}
if(st == dr){
aint[nod].first = value;
return ;
}
int mid = (st + dr) / 2;
update_set(nod * 2,st,mid,pos,value);
update_set(nod * 2 + 1,mid + 1,dr,pos,value);
aint[nod] = min(aint[nod * 2],aint[nod * 2 + 1]);
}
public:
SegmentTree2(int n){
this->n = n;
aint = vector<pair<long long,int> >(4 * n + 5);
lazy = vector<long long>(4 * n + 5);
build(1,1,n);
}
void update_range(int l,int r,long long value){
update_range(1,1,n,l,r,value);
}
void update_set(int pos,long long value){
update_set(1,1,n,pos,value);
}
pair<long long,int> query(){
return aint[1];
}
};
const int NMAX = 250000;
const int MMAX = 250000;
const int QMAX = 250000;
int n,m,q;
struct query_t{
int l,r,c;
long long k;
};
deque<pair<long long,int> > queries[NMAX + 5];
int answer[QMAX + 5];
int main(){
scanf("%d %d %d",&n,&m,&q);
vector<query_t> query_list;
SegmentTree aint(n);
FenwickTree aib(n);
for(int i = 1;i <= q;i++){
int t;
scanf("%d",&t);
if(t == 1){
int l,r,c;
long long k;
scanf("%d %d %d %lld",&l,&r,&c,&k);
aint.add(l,r,k);
aib.add(l,r,k);
query_list.push_back({l,r,c,k});
}else if(t == 2){
int l,r;
long long k;
scanf("%d %d %lld",&l,&r,&k);
aint.remove(l,r,k);
}else{
int a;
long long b;
scanf("%d %lld",&a,&b);
long long total = aib.access(a);
long long cnt = aint.access(a);
if(cnt >= b){
queries[a].push_back({total - cnt + b,i});
}else{
answer[i] = -1;
}
}
}
SegmentTree2 aint2(n);
for(int i = 1;i <= n;i++){
sort(queries[i].begin(),queries[i].end());
if(queries[i].empty()){
aint2.update_set(i,1e18);
}else{
aint2.update_set(i,queries[i].front().first);
}
}
for(auto it:query_list){
aint2.update_range(it.l,it.r,-it.k);
while(aint2.query().first <= 0){
int pos = aint2.query().second;
answer[queries[pos].front().second] = it.c;
long long last = queries[pos].front().first;
queries[pos].pop_front();
if(queries[pos].empty()){
aint2.update_set(pos,1e18);
}else{
aint2.update_range(pos,pos,queries[pos].front().first - last);
}
}
}
for(int i = 1;i <= q;i++){
if(answer[i] != 0){
printf("%d\n",(answer[i] == -1 ? 0:answer[i]));
}
}
return 0;
}
Compilation message
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:246:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
246 | scanf("%d %d %d",&n,&m,&q);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:255:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
255 | scanf("%d",&t);
| ~~~~~^~~~~~~~~
foodcourt.cpp:260:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
260 | scanf("%d %d %d %lld",&l,&r,&c,&k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:267:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
267 | scanf("%d %d %lld",&l,&r,&k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:272:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
272 | scanf("%d %lld",&a,&b);
| ~~~~~^~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
117 ms |
168808 KB |
Output is correct |
2 |
Correct |
118 ms |
168960 KB |
Output is correct |
3 |
Correct |
115 ms |
168912 KB |
Output is correct |
4 |
Correct |
118 ms |
168900 KB |
Output is correct |
5 |
Correct |
114 ms |
168680 KB |
Output is correct |
6 |
Correct |
112 ms |
168596 KB |
Output is correct |
7 |
Correct |
114 ms |
168900 KB |
Output is correct |
8 |
Correct |
114 ms |
168944 KB |
Output is correct |
9 |
Correct |
115 ms |
169032 KB |
Output is correct |
10 |
Correct |
114 ms |
168900 KB |
Output is correct |
11 |
Correct |
116 ms |
168952 KB |
Output is correct |
12 |
Correct |
114 ms |
168888 KB |
Output is correct |
13 |
Correct |
115 ms |
168864 KB |
Output is correct |
14 |
Correct |
118 ms |
169024 KB |
Output is correct |
15 |
Correct |
116 ms |
168848 KB |
Output is correct |
16 |
Correct |
117 ms |
168880 KB |
Output is correct |
17 |
Correct |
115 ms |
168776 KB |
Output is correct |
18 |
Correct |
119 ms |
168984 KB |
Output is correct |
19 |
Correct |
115 ms |
169000 KB |
Output is correct |
20 |
Correct |
116 ms |
168932 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
117 ms |
168808 KB |
Output is correct |
2 |
Correct |
118 ms |
168960 KB |
Output is correct |
3 |
Correct |
115 ms |
168912 KB |
Output is correct |
4 |
Correct |
118 ms |
168900 KB |
Output is correct |
5 |
Correct |
114 ms |
168680 KB |
Output is correct |
6 |
Correct |
112 ms |
168596 KB |
Output is correct |
7 |
Correct |
114 ms |
168900 KB |
Output is correct |
8 |
Correct |
114 ms |
168944 KB |
Output is correct |
9 |
Correct |
115 ms |
169032 KB |
Output is correct |
10 |
Correct |
114 ms |
168900 KB |
Output is correct |
11 |
Correct |
116 ms |
168952 KB |
Output is correct |
12 |
Correct |
114 ms |
168888 KB |
Output is correct |
13 |
Correct |
115 ms |
168864 KB |
Output is correct |
14 |
Correct |
118 ms |
169024 KB |
Output is correct |
15 |
Correct |
116 ms |
168848 KB |
Output is correct |
16 |
Correct |
117 ms |
168880 KB |
Output is correct |
17 |
Correct |
115 ms |
168776 KB |
Output is correct |
18 |
Correct |
119 ms |
168984 KB |
Output is correct |
19 |
Correct |
115 ms |
169000 KB |
Output is correct |
20 |
Correct |
116 ms |
168932 KB |
Output is correct |
21 |
Correct |
118 ms |
168844 KB |
Output is correct |
22 |
Correct |
116 ms |
168876 KB |
Output is correct |
23 |
Correct |
115 ms |
168852 KB |
Output is correct |
24 |
Correct |
118 ms |
168976 KB |
Output is correct |
25 |
Correct |
113 ms |
168636 KB |
Output is correct |
26 |
Correct |
114 ms |
168556 KB |
Output is correct |
27 |
Correct |
119 ms |
168908 KB |
Output is correct |
28 |
Correct |
117 ms |
168896 KB |
Output is correct |
29 |
Correct |
116 ms |
168900 KB |
Output is correct |
30 |
Correct |
117 ms |
168968 KB |
Output is correct |
31 |
Correct |
116 ms |
168976 KB |
Output is correct |
32 |
Correct |
116 ms |
169028 KB |
Output is correct |
33 |
Correct |
114 ms |
168924 KB |
Output is correct |
34 |
Correct |
115 ms |
168904 KB |
Output is correct |
35 |
Correct |
114 ms |
168784 KB |
Output is correct |
36 |
Correct |
114 ms |
168884 KB |
Output is correct |
37 |
Correct |
114 ms |
168876 KB |
Output is correct |
38 |
Correct |
118 ms |
169024 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
221 ms |
180100 KB |
Output is correct |
2 |
Correct |
241 ms |
180432 KB |
Output is correct |
3 |
Correct |
222 ms |
180176 KB |
Output is correct |
4 |
Correct |
236 ms |
181340 KB |
Output is correct |
5 |
Correct |
235 ms |
181628 KB |
Output is correct |
6 |
Correct |
227 ms |
181712 KB |
Output is correct |
7 |
Correct |
152 ms |
170352 KB |
Output is correct |
8 |
Correct |
148 ms |
170356 KB |
Output is correct |
9 |
Correct |
219 ms |
181592 KB |
Output is correct |
10 |
Correct |
223 ms |
181440 KB |
Output is correct |
11 |
Correct |
226 ms |
181516 KB |
Output is correct |
12 |
Correct |
227 ms |
181484 KB |
Output is correct |
13 |
Correct |
207 ms |
177920 KB |
Output is correct |
14 |
Correct |
233 ms |
181716 KB |
Output is correct |
15 |
Correct |
225 ms |
178772 KB |
Output is correct |
16 |
Correct |
233 ms |
182244 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
852 ms |
208524 KB |
Output is correct |
2 |
Correct |
680 ms |
207292 KB |
Output is correct |
3 |
Correct |
917 ms |
218956 KB |
Output is correct |
4 |
Correct |
772 ms |
216776 KB |
Output is correct |
5 |
Correct |
710 ms |
207172 KB |
Output is correct |
6 |
Correct |
963 ms |
220108 KB |
Output is correct |
7 |
Correct |
246 ms |
176764 KB |
Output is correct |
8 |
Correct |
252 ms |
176652 KB |
Output is correct |
9 |
Execution timed out |
1012 ms |
219900 KB |
Time limit exceeded |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
117 ms |
168808 KB |
Output is correct |
2 |
Correct |
118 ms |
168960 KB |
Output is correct |
3 |
Correct |
115 ms |
168912 KB |
Output is correct |
4 |
Correct |
118 ms |
168900 KB |
Output is correct |
5 |
Correct |
114 ms |
168680 KB |
Output is correct |
6 |
Correct |
112 ms |
168596 KB |
Output is correct |
7 |
Correct |
114 ms |
168900 KB |
Output is correct |
8 |
Correct |
114 ms |
168944 KB |
Output is correct |
9 |
Correct |
115 ms |
169032 KB |
Output is correct |
10 |
Correct |
114 ms |
168900 KB |
Output is correct |
11 |
Correct |
116 ms |
168952 KB |
Output is correct |
12 |
Correct |
114 ms |
168888 KB |
Output is correct |
13 |
Correct |
115 ms |
168864 KB |
Output is correct |
14 |
Correct |
118 ms |
169024 KB |
Output is correct |
15 |
Correct |
116 ms |
168848 KB |
Output is correct |
16 |
Correct |
117 ms |
168880 KB |
Output is correct |
17 |
Correct |
115 ms |
168776 KB |
Output is correct |
18 |
Correct |
119 ms |
168984 KB |
Output is correct |
19 |
Correct |
115 ms |
169000 KB |
Output is correct |
20 |
Correct |
116 ms |
168932 KB |
Output is correct |
21 |
Correct |
221 ms |
180100 KB |
Output is correct |
22 |
Correct |
241 ms |
180432 KB |
Output is correct |
23 |
Correct |
222 ms |
180176 KB |
Output is correct |
24 |
Correct |
236 ms |
181340 KB |
Output is correct |
25 |
Correct |
235 ms |
181628 KB |
Output is correct |
26 |
Correct |
227 ms |
181712 KB |
Output is correct |
27 |
Correct |
152 ms |
170352 KB |
Output is correct |
28 |
Correct |
148 ms |
170356 KB |
Output is correct |
29 |
Correct |
219 ms |
181592 KB |
Output is correct |
30 |
Correct |
223 ms |
181440 KB |
Output is correct |
31 |
Correct |
226 ms |
181516 KB |
Output is correct |
32 |
Correct |
227 ms |
181484 KB |
Output is correct |
33 |
Correct |
207 ms |
177920 KB |
Output is correct |
34 |
Correct |
233 ms |
181716 KB |
Output is correct |
35 |
Correct |
225 ms |
178772 KB |
Output is correct |
36 |
Correct |
233 ms |
182244 KB |
Output is correct |
37 |
Correct |
254 ms |
180020 KB |
Output is correct |
38 |
Correct |
241 ms |
180100 KB |
Output is correct |
39 |
Correct |
150 ms |
170208 KB |
Output is correct |
40 |
Correct |
158 ms |
170184 KB |
Output is correct |
41 |
Correct |
260 ms |
181380 KB |
Output is correct |
42 |
Correct |
264 ms |
181340 KB |
Output is correct |
43 |
Correct |
265 ms |
181356 KB |
Output is correct |
44 |
Correct |
265 ms |
181608 KB |
Output is correct |
45 |
Correct |
265 ms |
181292 KB |
Output is correct |
46 |
Correct |
269 ms |
181448 KB |
Output is correct |
47 |
Correct |
205 ms |
181064 KB |
Output is correct |
48 |
Correct |
253 ms |
181140 KB |
Output is correct |
49 |
Correct |
219 ms |
177600 KB |
Output is correct |
50 |
Correct |
249 ms |
180896 KB |
Output is correct |
51 |
Correct |
269 ms |
181364 KB |
Output is correct |
52 |
Correct |
265 ms |
181432 KB |
Output is correct |
53 |
Correct |
207 ms |
180184 KB |
Output is correct |
54 |
Correct |
233 ms |
182232 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
266 ms |
180284 KB |
Output is correct |
2 |
Correct |
269 ms |
180412 KB |
Output is correct |
3 |
Correct |
285 ms |
182216 KB |
Output is correct |
4 |
Correct |
246 ms |
180692 KB |
Output is correct |
5 |
Correct |
256 ms |
181392 KB |
Output is correct |
6 |
Correct |
286 ms |
182180 KB |
Output is correct |
7 |
Correct |
158 ms |
171088 KB |
Output is correct |
8 |
Correct |
157 ms |
170828 KB |
Output is correct |
9 |
Correct |
220 ms |
182016 KB |
Output is correct |
10 |
Correct |
225 ms |
179960 KB |
Output is correct |
11 |
Correct |
266 ms |
182108 KB |
Output is correct |
12 |
Correct |
269 ms |
182076 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
117 ms |
168808 KB |
Output is correct |
2 |
Correct |
118 ms |
168960 KB |
Output is correct |
3 |
Correct |
115 ms |
168912 KB |
Output is correct |
4 |
Correct |
118 ms |
168900 KB |
Output is correct |
5 |
Correct |
114 ms |
168680 KB |
Output is correct |
6 |
Correct |
112 ms |
168596 KB |
Output is correct |
7 |
Correct |
114 ms |
168900 KB |
Output is correct |
8 |
Correct |
114 ms |
168944 KB |
Output is correct |
9 |
Correct |
115 ms |
169032 KB |
Output is correct |
10 |
Correct |
114 ms |
168900 KB |
Output is correct |
11 |
Correct |
116 ms |
168952 KB |
Output is correct |
12 |
Correct |
114 ms |
168888 KB |
Output is correct |
13 |
Correct |
115 ms |
168864 KB |
Output is correct |
14 |
Correct |
118 ms |
169024 KB |
Output is correct |
15 |
Correct |
116 ms |
168848 KB |
Output is correct |
16 |
Correct |
117 ms |
168880 KB |
Output is correct |
17 |
Correct |
115 ms |
168776 KB |
Output is correct |
18 |
Correct |
119 ms |
168984 KB |
Output is correct |
19 |
Correct |
115 ms |
169000 KB |
Output is correct |
20 |
Correct |
116 ms |
168932 KB |
Output is correct |
21 |
Correct |
118 ms |
168844 KB |
Output is correct |
22 |
Correct |
116 ms |
168876 KB |
Output is correct |
23 |
Correct |
115 ms |
168852 KB |
Output is correct |
24 |
Correct |
118 ms |
168976 KB |
Output is correct |
25 |
Correct |
113 ms |
168636 KB |
Output is correct |
26 |
Correct |
114 ms |
168556 KB |
Output is correct |
27 |
Correct |
119 ms |
168908 KB |
Output is correct |
28 |
Correct |
117 ms |
168896 KB |
Output is correct |
29 |
Correct |
116 ms |
168900 KB |
Output is correct |
30 |
Correct |
117 ms |
168968 KB |
Output is correct |
31 |
Correct |
116 ms |
168976 KB |
Output is correct |
32 |
Correct |
116 ms |
169028 KB |
Output is correct |
33 |
Correct |
114 ms |
168924 KB |
Output is correct |
34 |
Correct |
115 ms |
168904 KB |
Output is correct |
35 |
Correct |
114 ms |
168784 KB |
Output is correct |
36 |
Correct |
114 ms |
168884 KB |
Output is correct |
37 |
Correct |
114 ms |
168876 KB |
Output is correct |
38 |
Correct |
118 ms |
169024 KB |
Output is correct |
39 |
Correct |
221 ms |
180100 KB |
Output is correct |
40 |
Correct |
241 ms |
180432 KB |
Output is correct |
41 |
Correct |
222 ms |
180176 KB |
Output is correct |
42 |
Correct |
236 ms |
181340 KB |
Output is correct |
43 |
Correct |
235 ms |
181628 KB |
Output is correct |
44 |
Correct |
227 ms |
181712 KB |
Output is correct |
45 |
Correct |
152 ms |
170352 KB |
Output is correct |
46 |
Correct |
148 ms |
170356 KB |
Output is correct |
47 |
Correct |
219 ms |
181592 KB |
Output is correct |
48 |
Correct |
223 ms |
181440 KB |
Output is correct |
49 |
Correct |
226 ms |
181516 KB |
Output is correct |
50 |
Correct |
227 ms |
181484 KB |
Output is correct |
51 |
Correct |
207 ms |
177920 KB |
Output is correct |
52 |
Correct |
233 ms |
181716 KB |
Output is correct |
53 |
Correct |
225 ms |
178772 KB |
Output is correct |
54 |
Correct |
233 ms |
182244 KB |
Output is correct |
55 |
Correct |
254 ms |
180020 KB |
Output is correct |
56 |
Correct |
241 ms |
180100 KB |
Output is correct |
57 |
Correct |
150 ms |
170208 KB |
Output is correct |
58 |
Correct |
158 ms |
170184 KB |
Output is correct |
59 |
Correct |
260 ms |
181380 KB |
Output is correct |
60 |
Correct |
264 ms |
181340 KB |
Output is correct |
61 |
Correct |
265 ms |
181356 KB |
Output is correct |
62 |
Correct |
265 ms |
181608 KB |
Output is correct |
63 |
Correct |
265 ms |
181292 KB |
Output is correct |
64 |
Correct |
269 ms |
181448 KB |
Output is correct |
65 |
Correct |
205 ms |
181064 KB |
Output is correct |
66 |
Correct |
253 ms |
181140 KB |
Output is correct |
67 |
Correct |
219 ms |
177600 KB |
Output is correct |
68 |
Correct |
249 ms |
180896 KB |
Output is correct |
69 |
Correct |
269 ms |
181364 KB |
Output is correct |
70 |
Correct |
265 ms |
181432 KB |
Output is correct |
71 |
Correct |
207 ms |
180184 KB |
Output is correct |
72 |
Correct |
233 ms |
182232 KB |
Output is correct |
73 |
Correct |
266 ms |
180284 KB |
Output is correct |
74 |
Correct |
269 ms |
180412 KB |
Output is correct |
75 |
Correct |
285 ms |
182216 KB |
Output is correct |
76 |
Correct |
246 ms |
180692 KB |
Output is correct |
77 |
Correct |
256 ms |
181392 KB |
Output is correct |
78 |
Correct |
286 ms |
182180 KB |
Output is correct |
79 |
Correct |
158 ms |
171088 KB |
Output is correct |
80 |
Correct |
157 ms |
170828 KB |
Output is correct |
81 |
Correct |
220 ms |
182016 KB |
Output is correct |
82 |
Correct |
225 ms |
179960 KB |
Output is correct |
83 |
Correct |
266 ms |
182108 KB |
Output is correct |
84 |
Correct |
269 ms |
182076 KB |
Output is correct |
85 |
Correct |
250 ms |
179268 KB |
Output is correct |
86 |
Correct |
290 ms |
181812 KB |
Output is correct |
87 |
Correct |
260 ms |
181084 KB |
Output is correct |
88 |
Correct |
281 ms |
182128 KB |
Output is correct |
89 |
Correct |
238 ms |
178784 KB |
Output is correct |
90 |
Correct |
266 ms |
181840 KB |
Output is correct |
91 |
Correct |
236 ms |
177884 KB |
Output is correct |
92 |
Correct |
229 ms |
177852 KB |
Output is correct |
93 |
Correct |
269 ms |
181816 KB |
Output is correct |
94 |
Correct |
279 ms |
181832 KB |
Output is correct |
95 |
Correct |
265 ms |
180776 KB |
Output is correct |
96 |
Correct |
267 ms |
181816 KB |
Output is correct |
97 |
Correct |
275 ms |
181780 KB |
Output is correct |
98 |
Correct |
240 ms |
178408 KB |
Output is correct |
99 |
Correct |
208 ms |
181660 KB |
Output is correct |
100 |
Correct |
237 ms |
179740 KB |
Output is correct |
101 |
Correct |
256 ms |
181636 KB |
Output is correct |
102 |
Correct |
249 ms |
182220 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
117 ms |
168808 KB |
Output is correct |
2 |
Correct |
118 ms |
168960 KB |
Output is correct |
3 |
Correct |
115 ms |
168912 KB |
Output is correct |
4 |
Correct |
118 ms |
168900 KB |
Output is correct |
5 |
Correct |
114 ms |
168680 KB |
Output is correct |
6 |
Correct |
112 ms |
168596 KB |
Output is correct |
7 |
Correct |
114 ms |
168900 KB |
Output is correct |
8 |
Correct |
114 ms |
168944 KB |
Output is correct |
9 |
Correct |
115 ms |
169032 KB |
Output is correct |
10 |
Correct |
114 ms |
168900 KB |
Output is correct |
11 |
Correct |
116 ms |
168952 KB |
Output is correct |
12 |
Correct |
114 ms |
168888 KB |
Output is correct |
13 |
Correct |
115 ms |
168864 KB |
Output is correct |
14 |
Correct |
118 ms |
169024 KB |
Output is correct |
15 |
Correct |
116 ms |
168848 KB |
Output is correct |
16 |
Correct |
117 ms |
168880 KB |
Output is correct |
17 |
Correct |
115 ms |
168776 KB |
Output is correct |
18 |
Correct |
119 ms |
168984 KB |
Output is correct |
19 |
Correct |
115 ms |
169000 KB |
Output is correct |
20 |
Correct |
116 ms |
168932 KB |
Output is correct |
21 |
Correct |
118 ms |
168844 KB |
Output is correct |
22 |
Correct |
116 ms |
168876 KB |
Output is correct |
23 |
Correct |
115 ms |
168852 KB |
Output is correct |
24 |
Correct |
118 ms |
168976 KB |
Output is correct |
25 |
Correct |
113 ms |
168636 KB |
Output is correct |
26 |
Correct |
114 ms |
168556 KB |
Output is correct |
27 |
Correct |
119 ms |
168908 KB |
Output is correct |
28 |
Correct |
117 ms |
168896 KB |
Output is correct |
29 |
Correct |
116 ms |
168900 KB |
Output is correct |
30 |
Correct |
117 ms |
168968 KB |
Output is correct |
31 |
Correct |
116 ms |
168976 KB |
Output is correct |
32 |
Correct |
116 ms |
169028 KB |
Output is correct |
33 |
Correct |
114 ms |
168924 KB |
Output is correct |
34 |
Correct |
115 ms |
168904 KB |
Output is correct |
35 |
Correct |
114 ms |
168784 KB |
Output is correct |
36 |
Correct |
114 ms |
168884 KB |
Output is correct |
37 |
Correct |
114 ms |
168876 KB |
Output is correct |
38 |
Correct |
118 ms |
169024 KB |
Output is correct |
39 |
Correct |
221 ms |
180100 KB |
Output is correct |
40 |
Correct |
241 ms |
180432 KB |
Output is correct |
41 |
Correct |
222 ms |
180176 KB |
Output is correct |
42 |
Correct |
236 ms |
181340 KB |
Output is correct |
43 |
Correct |
235 ms |
181628 KB |
Output is correct |
44 |
Correct |
227 ms |
181712 KB |
Output is correct |
45 |
Correct |
152 ms |
170352 KB |
Output is correct |
46 |
Correct |
148 ms |
170356 KB |
Output is correct |
47 |
Correct |
219 ms |
181592 KB |
Output is correct |
48 |
Correct |
223 ms |
181440 KB |
Output is correct |
49 |
Correct |
226 ms |
181516 KB |
Output is correct |
50 |
Correct |
227 ms |
181484 KB |
Output is correct |
51 |
Correct |
207 ms |
177920 KB |
Output is correct |
52 |
Correct |
233 ms |
181716 KB |
Output is correct |
53 |
Correct |
225 ms |
178772 KB |
Output is correct |
54 |
Correct |
233 ms |
182244 KB |
Output is correct |
55 |
Correct |
852 ms |
208524 KB |
Output is correct |
56 |
Correct |
680 ms |
207292 KB |
Output is correct |
57 |
Correct |
917 ms |
218956 KB |
Output is correct |
58 |
Correct |
772 ms |
216776 KB |
Output is correct |
59 |
Correct |
710 ms |
207172 KB |
Output is correct |
60 |
Correct |
963 ms |
220108 KB |
Output is correct |
61 |
Correct |
246 ms |
176764 KB |
Output is correct |
62 |
Correct |
252 ms |
176652 KB |
Output is correct |
63 |
Execution timed out |
1012 ms |
219900 KB |
Time limit exceeded |
64 |
Halted |
0 ms |
0 KB |
- |