#include<iostream>
#include<stack>
#include<map>
#include<vector>
#include<string>
#include<unordered_map>
#include <queue>
#include<cstring>
#include<limits.h>
#include<cmath>
#include<set>
#include<algorithm>
#include<bitset>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
#define ll long long
#define f first
#define endl "\n"
#define s second
#define pii pair<int,int>
#define ppii pair<pii,int>
#define vi vector<int>
#define pb push_back
//#define p push
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define F(n) for(int i=0;i<n;i++)
#define lb lower_bound
#define ub upper_bound
#define fastio ios::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
#pragma GCC optimize ("03,unroll-lopps")
#pragma GCC target("avx2")
const int mxn=1e6,inf=1e9;
int n,m;
struct seg{
int v[2*mxn+10];
void update(int pos,int val){
pos+=n;
v[pos]=max(v[pos],val);
for(;pos>0;pos>>=1)v[pos>>1]=max(v[pos],v[pos^1]);
}
int qry(int l,int r){
int ans=0;
for(l+=n,r+=n;l<=r;l>>=1,r>>=1){
if(l&1)ans=max(ans,v[l++]);
if(!(r&1))ans=max(ans,v[r--]);
}
return ans;
}
}t;
int32_t main(){
fastio
cin>>n>>m;
vector<int>v(n);
for(int i=0;i<n;i++)cin>>v[i];
vector<ppii>g;
vector<pair<pii,pii>>q(m);
for(int i=0;i<m;i++)cin>>q[i].f.f>>q[i].f.s>>q[i].s.f,q[i].s.s=i,q[i].f.f--,q[i].f.s--;
stack<int>st;
for(int i=0;i<n;i++){
while(!st.empty()&&v[st.top()]<=v[i])st.pop();
if(!st.empty())g.pb({{st.top(),i},v[i]+v[st.top()]});
st.push(i);
}
sort(rall(g));
sort(rall(q));
vector<int>ans(m,0);
int cur=0;
for(int i=0;i<m;i++){
while(cur<g.size()&&g[cur].f.f>=q[i].f.f)t.update(g[cur].f.s,g[cur].s),cur++;
ans[q[i].s.s]=(t.qry(0,q[i].f.s)<=q[i].s.f);
}
for(auto i:ans)cout<<i<<'\n';
}
Compilation message
sortbooks.cpp:35:40: warning: bad option '-funroll-lopps' to pragma 'optimize' [-Wpragmas]
35 | #pragma GCC optimize ("03,unroll-lopps")
| ^
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
36 | #pragma GCC target("avx2")
| ^
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
sortbooks.cpp:36:26: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
2 ms |
584 KB |
Output is correct |
12 |
Correct |
2 ms |
748 KB |
Output is correct |
13 |
Correct |
2 ms |
612 KB |
Output is correct |
14 |
Correct |
3 ms |
852 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
2 ms |
668 KB |
Output is correct |
17 |
Correct |
3 ms |
604 KB |
Output is correct |
18 |
Correct |
2 ms |
604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
588 ms |
61620 KB |
Output is correct |
2 |
Correct |
582 ms |
62308 KB |
Output is correct |
3 |
Correct |
602 ms |
62536 KB |
Output is correct |
4 |
Correct |
581 ms |
62340 KB |
Output is correct |
5 |
Correct |
508 ms |
42420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
56 ms |
6088 KB |
Output is correct |
2 |
Correct |
52 ms |
6132 KB |
Output is correct |
3 |
Correct |
43 ms |
4180 KB |
Output is correct |
4 |
Correct |
44 ms |
4176 KB |
Output is correct |
5 |
Correct |
42 ms |
4176 KB |
Output is correct |
6 |
Correct |
42 ms |
4412 KB |
Output is correct |
7 |
Correct |
41 ms |
4628 KB |
Output is correct |
8 |
Correct |
44 ms |
5328 KB |
Output is correct |
9 |
Correct |
34 ms |
3576 KB |
Output is correct |
10 |
Correct |
47 ms |
5324 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
2 ms |
584 KB |
Output is correct |
12 |
Correct |
2 ms |
748 KB |
Output is correct |
13 |
Correct |
2 ms |
612 KB |
Output is correct |
14 |
Correct |
3 ms |
852 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
2 ms |
668 KB |
Output is correct |
17 |
Correct |
3 ms |
604 KB |
Output is correct |
18 |
Correct |
2 ms |
604 KB |
Output is correct |
19 |
Correct |
115 ms |
12996 KB |
Output is correct |
20 |
Correct |
117 ms |
12992 KB |
Output is correct |
21 |
Correct |
112 ms |
12872 KB |
Output is correct |
22 |
Correct |
112 ms |
13448 KB |
Output is correct |
23 |
Correct |
115 ms |
12996 KB |
Output is correct |
24 |
Correct |
97 ms |
8724 KB |
Output is correct |
25 |
Correct |
102 ms |
9112 KB |
Output is correct |
26 |
Correct |
98 ms |
9080 KB |
Output is correct |
27 |
Correct |
97 ms |
9040 KB |
Output is correct |
28 |
Correct |
98 ms |
9116 KB |
Output is correct |
29 |
Correct |
101 ms |
9144 KB |
Output is correct |
30 |
Correct |
100 ms |
9044 KB |
Output is correct |
31 |
Correct |
99 ms |
9036 KB |
Output is correct |
32 |
Correct |
101 ms |
8980 KB |
Output is correct |
33 |
Correct |
101 ms |
9040 KB |
Output is correct |
34 |
Correct |
96 ms |
8784 KB |
Output is correct |
35 |
Correct |
94 ms |
8788 KB |
Output is correct |
36 |
Correct |
92 ms |
8724 KB |
Output is correct |
37 |
Correct |
100 ms |
8712 KB |
Output is correct |
38 |
Correct |
94 ms |
8784 KB |
Output is correct |
39 |
Correct |
97 ms |
10044 KB |
Output is correct |
40 |
Correct |
82 ms |
8456 KB |
Output is correct |
41 |
Correct |
93 ms |
10376 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
2 ms |
584 KB |
Output is correct |
12 |
Correct |
2 ms |
748 KB |
Output is correct |
13 |
Correct |
2 ms |
612 KB |
Output is correct |
14 |
Correct |
3 ms |
852 KB |
Output is correct |
15 |
Correct |
3 ms |
860 KB |
Output is correct |
16 |
Correct |
2 ms |
668 KB |
Output is correct |
17 |
Correct |
3 ms |
604 KB |
Output is correct |
18 |
Correct |
2 ms |
604 KB |
Output is correct |
19 |
Correct |
588 ms |
61620 KB |
Output is correct |
20 |
Correct |
582 ms |
62308 KB |
Output is correct |
21 |
Correct |
602 ms |
62536 KB |
Output is correct |
22 |
Correct |
581 ms |
62340 KB |
Output is correct |
23 |
Correct |
508 ms |
42420 KB |
Output is correct |
24 |
Correct |
56 ms |
6088 KB |
Output is correct |
25 |
Correct |
52 ms |
6132 KB |
Output is correct |
26 |
Correct |
43 ms |
4180 KB |
Output is correct |
27 |
Correct |
44 ms |
4176 KB |
Output is correct |
28 |
Correct |
42 ms |
4176 KB |
Output is correct |
29 |
Correct |
42 ms |
4412 KB |
Output is correct |
30 |
Correct |
41 ms |
4628 KB |
Output is correct |
31 |
Correct |
44 ms |
5328 KB |
Output is correct |
32 |
Correct |
34 ms |
3576 KB |
Output is correct |
33 |
Correct |
47 ms |
5324 KB |
Output is correct |
34 |
Correct |
115 ms |
12996 KB |
Output is correct |
35 |
Correct |
117 ms |
12992 KB |
Output is correct |
36 |
Correct |
112 ms |
12872 KB |
Output is correct |
37 |
Correct |
112 ms |
13448 KB |
Output is correct |
38 |
Correct |
115 ms |
12996 KB |
Output is correct |
39 |
Correct |
97 ms |
8724 KB |
Output is correct |
40 |
Correct |
102 ms |
9112 KB |
Output is correct |
41 |
Correct |
98 ms |
9080 KB |
Output is correct |
42 |
Correct |
97 ms |
9040 KB |
Output is correct |
43 |
Correct |
98 ms |
9116 KB |
Output is correct |
44 |
Correct |
101 ms |
9144 KB |
Output is correct |
45 |
Correct |
100 ms |
9044 KB |
Output is correct |
46 |
Correct |
99 ms |
9036 KB |
Output is correct |
47 |
Correct |
101 ms |
8980 KB |
Output is correct |
48 |
Correct |
101 ms |
9040 KB |
Output is correct |
49 |
Correct |
96 ms |
8784 KB |
Output is correct |
50 |
Correct |
94 ms |
8788 KB |
Output is correct |
51 |
Correct |
92 ms |
8724 KB |
Output is correct |
52 |
Correct |
100 ms |
8712 KB |
Output is correct |
53 |
Correct |
94 ms |
8784 KB |
Output is correct |
54 |
Correct |
97 ms |
10044 KB |
Output is correct |
55 |
Correct |
82 ms |
8456 KB |
Output is correct |
56 |
Correct |
93 ms |
10376 KB |
Output is correct |
57 |
Correct |
587 ms |
62196 KB |
Output is correct |
58 |
Correct |
595 ms |
62924 KB |
Output is correct |
59 |
Correct |
600 ms |
62392 KB |
Output is correct |
60 |
Correct |
622 ms |
62216 KB |
Output is correct |
61 |
Correct |
600 ms |
62408 KB |
Output is correct |
62 |
Correct |
599 ms |
45392 KB |
Output is correct |
63 |
Correct |
484 ms |
25868 KB |
Output is correct |
64 |
Correct |
480 ms |
25884 KB |
Output is correct |
65 |
Correct |
509 ms |
25912 KB |
Output is correct |
66 |
Correct |
509 ms |
25884 KB |
Output is correct |
67 |
Correct |
509 ms |
25940 KB |
Output is correct |
68 |
Correct |
504 ms |
25916 KB |
Output is correct |
69 |
Correct |
499 ms |
25756 KB |
Output is correct |
70 |
Correct |
529 ms |
25916 KB |
Output is correct |
71 |
Correct |
521 ms |
25908 KB |
Output is correct |
72 |
Correct |
522 ms |
25752 KB |
Output is correct |
73 |
Correct |
470 ms |
29868 KB |
Output is correct |
74 |
Correct |
473 ms |
29900 KB |
Output is correct |
75 |
Correct |
463 ms |
29980 KB |
Output is correct |
76 |
Correct |
474 ms |
30036 KB |
Output is correct |
77 |
Correct |
462 ms |
29964 KB |
Output is correct |
78 |
Correct |
496 ms |
33676 KB |
Output is correct |
79 |
Correct |
401 ms |
26932 KB |
Output is correct |
80 |
Correct |
486 ms |
40628 KB |
Output is correct |