답안 #1089130

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1089130 2024-09-16T05:31:51 Z modwwe 새 집 (APIO18_new_home) C++17
100 / 100
3046 ms 227980 KB
#pragma GCC optimize("Ofast,unroll-loops")
#include<bits/stdc++.h>
//#define int long long
//#define ll long long
#define down cout<<'\n';
#define debug cout<<" cucuucucuuu",down
#define NHP     ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);
#define modwwe  int t;cin>>t; while(t--)
#define bit(i,j) (i>>j&1)
#define sobit(a) __builtin_popcountll(a)
#define task "test"
#define fin(x) freopen(x".inp","r",stdin)
#define fou(x) freopen(x".ans","w",stdout)
#define pb push_back
#define checktime   cerr << (double)clock() / CLOCKS_PER_SEC * 1000  << " ms";
using namespace std;
#define getchar_unlocked getchar

inline int scan()
{
    char c = getchar_unlocked();
    int x = 0;
    while(c<'0'||c>'9')
    {
        c=getchar_unlocked();
    }
    while(c>='0'&&c<='9')
    {
        x=(x<<1)+(x<<3)+c-'0';
        c=getchar_unlocked();
    }
    return x;
}

void phongbeo();
const int inf=1e9;
const int mod2=1e9+9;
const int  mod1=998244353;
struct icd
{
    long double a;
    int b;
};
struct ib
{
    int a;
    int b;
};
struct ic
{
    int a,b,c;
};
struct id
{
    int a,b,c,d;
};
struct ie
{
    int a,b,c,d,e;

};

int n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,dem4,l,r,mid,l2,r2,center;
int  i,s10,s12;
int kk;
int el=19;
main()
{
#ifndef ONLINE_JUDGE
  //  fin(task);
   // fou(task);
#endif
    NHP
    /// cin>>s1;
///modwwe
    phongbeo();
    checktime
}
vector<ic> v[900001];
vector<int> v2,v3;
map<int,int>cnt[300001];
set<int> s[300001];
multiset<int>ss[300001];
vector<ib> ask[900001];
id a[300001];
int ans[300001];
ib b[300001];
struct IT
{
    int t[1200001];
    void upd(int node,int l,int r,int l1)
    {
        if(l==r)
        {
            if(ss[l].size()==0)t[node]=0;
            else    t[node]=*ss[l].rbegin();
            return;
        }
        int mid=l+r>>1;
        if(l1<=mid)    upd(node<<1,l,mid,l1);
        else upd(node<<1|1,mid+1,r,l1);
        t[node]=max(t[node<<1],t[node<<1|1]);
    }
    int get(int node,int l,int r,int l1)
    {
        if(r<=l1) return t[node];
        int mid=l+r>>1;
        if(mid+1<=l1) return max(get(node<<1|1,mid+1,r,l1),get(node<<1,l,mid,l1));
        else return get(node<<1,l,mid,l1);
    }
} st;
void add2(int x,int y)
{
    ss[x].insert(y);
    st.upd(1,1,n,x);
}
void dell2(int x,int y)
{    auto it=ss[x].lower_bound(y);

    ss[x].erase(it);
    st.upd(1,1,n,x);
}
void add(int x,int y)
{
    cnt[y][x]++;
    if(cnt[y][x]>1) return;
    auto it=s[y].lower_bound(x);
    s2=-1;
    if(it!=s[y].end()) add2(x,*it),s2=*it;
    if(it!=s[y].begin())
    {
        it--;
        auto it2=it;
            add2(*it2,x);


        if(s2!=-1){
            dell2(*it2,s2);}
    }
    if(s[y].size()==2)dem++;
    if(cnt[y][x]==1)
        s[y].insert(x);
}
void del(int x,int y)
{
     cnt[y][x]--;
    if(cnt[y][x]==0)
    {

        s[y].erase(x);
        if(s[y].size()==2) dem--;
        auto it=s[y].lower_bound(x);
        s2=-1;
        if(it!=s[y].end()) dell2(x,*it),s2=*it;
        if(it!=s[y].begin())
        {
            it--;
            auto it2=it;
            dell2(*it2,x);
            if(s2!=-1){
                add2(*it2,s2);
                }
        }
    }
}
bool check(int x,int y)
 {
     s2=lower_bound(v2.begin(),v2.end(),x-y)-v2.begin();
     s2=max(s2,1);
 s3=st.get(1,1,n,s2);
 if(s3>v2.size()) return 0;
      return v2[s3-1]<=x+y;
 }
int get(int x)
{
    l=0;
    r=max(s12-x,x);
    while(l<=r)
    {
        int mid=l+r>>1;
 if(check(x,mid))r=mid-1;
 else l=mid+1;
    }
    return r+1;
}
void phongbeo()
{
    n=scan();
    k=scan();
    m=scan();
    v2.pb(0);
    for(int i=1; i<=n; i++)
        l=scan(),r=scan(),s2=scan(),s3=scan(),a[i]= {l,r,s2,s3},v3.pb(s2),v3.pb(s3+1),v2.pb(l),s12=max(s12,l);
    for(int i=1; i<=m; i++)
        l=scan(),r=scan(),b[i]= {l,r},v3.pb(r);
    sort(v2.begin(),v2.end());
    v2.erase(unique(v2.begin(), v2.end()), v2.end());
    sort(v3.begin(),v3.end());
    v3.erase(unique(v3.begin(), v3.end()), v3.end());
    for(int i=1; i<=n; i++)
    {
        s2=lower_bound(v3.begin(),v3.end(),a[i].c)-v3.begin()+1;
        s3=lower_bound(v3.begin(),v3.end(),a[i].d+1)-v3.begin()+1;
        l=lower_bound(v2.begin(),v2.end(),a[i].a)-v2.begin()+1;
        r=a[i].b;
        v[s2].pb({l,r,1}),v[s3].pb({l,r,-1});
    }
      for(int i=1; i<=m; i++)
    {
        l=b[i].a;
        r=b[i].b;
        r=lower_bound(v3.begin(),v3.end(),r)-v3.begin()+1;
        ask[r].pb({l,i});
    }
    for(int i=1; i<=k; i++)
        ss[1].insert(inf),s[i].insert(1),s[i].insert(inf);
        n=v2.size()-1;
    st.upd(1,1,n,1);
    dem=0;
    for(int i=1; i<=v3.size(); i++)
    {
        for(auto f:v[i])
        {
            if(f.c==1)
            {
                add(f.a,f.b);
            }
            else
        del(f.a,f.b);
        }
        for(auto f:ask[i])
        {
            if(dem==k)
                ans[f.b]=get(f.a);
            else ans[f.b]=-1;
        }
    }
    for(int i=1; i<=m; i++){
            printf("%d",ans[i]),
               printf("\n");
               }

}
/**
3 1 1
4 1 7 8
3 1 1 3
9 1 1 9
2 2
*/

Compilation message

new_home.cpp:67:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   67 | main()
      | ^~~~
new_home.cpp: In member function 'void IT::upd(int, int, int, int)':
new_home.cpp:99:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   99 |         int mid=l+r>>1;
      |                 ~^~
new_home.cpp: In member function 'int IT::get(int, int, int, int)':
new_home.cpp:107:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  107 |         int mid=l+r>>1;
      |                 ~^~
new_home.cpp: In function 'bool check(int, int)':
new_home.cpp:171:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  171 |  if(s3>v2.size()) return 0;
      |     ~~^~~~~~~~~~
new_home.cpp: In function 'int get(int)':
new_home.cpp:180:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  180 |         int mid=l+r>>1;
      |                 ~^~
new_home.cpp: In function 'void phongbeo()':
new_home.cpp:215:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  215 |     for(int i=1; i<=k; i++)
      |     ^~~
new_home.cpp:217:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  217 |         n=v2.size()-1;
      |         ^
new_home.cpp:220:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  220 |     for(int i=1; i<=v3.size(); i++)
      |                  ~^~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 85012 KB Output is correct
2 Correct 41 ms 84824 KB Output is correct
3 Correct 43 ms 84988 KB Output is correct
4 Correct 40 ms 84948 KB Output is correct
5 Correct 40 ms 85072 KB Output is correct
6 Correct 40 ms 85076 KB Output is correct
7 Correct 41 ms 84924 KB Output is correct
8 Correct 42 ms 85072 KB Output is correct
9 Correct 39 ms 85072 KB Output is correct
10 Correct 39 ms 84992 KB Output is correct
11 Correct 38 ms 84864 KB Output is correct
12 Correct 39 ms 85088 KB Output is correct
13 Correct 39 ms 85072 KB Output is correct
14 Correct 39 ms 84988 KB Output is correct
15 Correct 41 ms 84928 KB Output is correct
16 Correct 43 ms 84988 KB Output is correct
17 Correct 41 ms 85076 KB Output is correct
18 Correct 39 ms 85072 KB Output is correct
19 Correct 41 ms 85076 KB Output is correct
20 Correct 42 ms 85072 KB Output is correct
21 Correct 42 ms 85068 KB Output is correct
22 Correct 40 ms 85076 KB Output is correct
23 Correct 41 ms 85080 KB Output is correct
24 Correct 39 ms 85076 KB Output is correct
25 Correct 39 ms 85076 KB Output is correct
26 Correct 42 ms 85012 KB Output is correct
27 Correct 42 ms 85084 KB Output is correct
28 Correct 41 ms 85072 KB Output is correct
29 Correct 44 ms 85068 KB Output is correct
30 Correct 41 ms 85072 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 85012 KB Output is correct
2 Correct 41 ms 84824 KB Output is correct
3 Correct 43 ms 84988 KB Output is correct
4 Correct 40 ms 84948 KB Output is correct
5 Correct 40 ms 85072 KB Output is correct
6 Correct 40 ms 85076 KB Output is correct
7 Correct 41 ms 84924 KB Output is correct
8 Correct 42 ms 85072 KB Output is correct
9 Correct 39 ms 85072 KB Output is correct
10 Correct 39 ms 84992 KB Output is correct
11 Correct 38 ms 84864 KB Output is correct
12 Correct 39 ms 85088 KB Output is correct
13 Correct 39 ms 85072 KB Output is correct
14 Correct 39 ms 84988 KB Output is correct
15 Correct 41 ms 84928 KB Output is correct
16 Correct 43 ms 84988 KB Output is correct
17 Correct 41 ms 85076 KB Output is correct
18 Correct 39 ms 85072 KB Output is correct
19 Correct 41 ms 85076 KB Output is correct
20 Correct 42 ms 85072 KB Output is correct
21 Correct 42 ms 85068 KB Output is correct
22 Correct 40 ms 85076 KB Output is correct
23 Correct 41 ms 85080 KB Output is correct
24 Correct 39 ms 85076 KB Output is correct
25 Correct 39 ms 85076 KB Output is correct
26 Correct 42 ms 85012 KB Output is correct
27 Correct 42 ms 85084 KB Output is correct
28 Correct 41 ms 85072 KB Output is correct
29 Correct 44 ms 85068 KB Output is correct
30 Correct 41 ms 85072 KB Output is correct
31 Correct 405 ms 105540 KB Output is correct
32 Correct 65 ms 90844 KB Output is correct
33 Correct 434 ms 101316 KB Output is correct
34 Correct 372 ms 101316 KB Output is correct
35 Correct 456 ms 105408 KB Output is correct
36 Correct 485 ms 105328 KB Output is correct
37 Correct 370 ms 99976 KB Output is correct
38 Correct 384 ms 99852 KB Output is correct
39 Correct 310 ms 99780 KB Output is correct
40 Correct 347 ms 99784 KB Output is correct
41 Correct 308 ms 100040 KB Output is correct
42 Correct 247 ms 99780 KB Output is correct
43 Correct 69 ms 92868 KB Output is correct
44 Correct 309 ms 100032 KB Output is correct
45 Correct 299 ms 99784 KB Output is correct
46 Correct 318 ms 99704 KB Output is correct
47 Correct 202 ms 99164 KB Output is correct
48 Correct 221 ms 99012 KB Output is correct
49 Correct 259 ms 99548 KB Output is correct
50 Correct 242 ms 99740 KB Output is correct
51 Correct 271 ms 99268 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1908 ms 184392 KB Output is correct
2 Correct 2465 ms 173264 KB Output is correct
3 Correct 1714 ms 218236 KB Output is correct
4 Correct 1800 ms 189928 KB Output is correct
5 Correct 2572 ms 172956 KB Output is correct
6 Correct 2629 ms 173444 KB Output is correct
7 Correct 1631 ms 218132 KB Output is correct
8 Correct 1406 ms 190172 KB Output is correct
9 Correct 1385 ms 179804 KB Output is correct
10 Correct 1993 ms 174512 KB Output is correct
11 Correct 1458 ms 172376 KB Output is correct
12 Correct 1480 ms 174136 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2188 ms 181596 KB Output is correct
2 Correct 156 ms 112952 KB Output is correct
3 Correct 2985 ms 179120 KB Output is correct
4 Correct 1671 ms 221840 KB Output is correct
5 Correct 1525 ms 187828 KB Output is correct
6 Correct 1381 ms 193744 KB Output is correct
7 Correct 2769 ms 177012 KB Output is correct
8 Correct 2841 ms 177572 KB Output is correct
9 Correct 1703 ms 221344 KB Output is correct
10 Correct 1679 ms 189780 KB Output is correct
11 Correct 1847 ms 181492 KB Output is correct
12 Correct 2640 ms 178604 KB Output is correct
13 Correct 1486 ms 174996 KB Output is correct
14 Correct 1390 ms 173968 KB Output is correct
15 Correct 1666 ms 176288 KB Output is correct
16 Correct 1774 ms 177784 KB Output is correct
17 Correct 1782 ms 175760 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 85012 KB Output is correct
2 Correct 41 ms 84824 KB Output is correct
3 Correct 43 ms 84988 KB Output is correct
4 Correct 40 ms 84948 KB Output is correct
5 Correct 40 ms 85072 KB Output is correct
6 Correct 40 ms 85076 KB Output is correct
7 Correct 41 ms 84924 KB Output is correct
8 Correct 42 ms 85072 KB Output is correct
9 Correct 39 ms 85072 KB Output is correct
10 Correct 39 ms 84992 KB Output is correct
11 Correct 38 ms 84864 KB Output is correct
12 Correct 39 ms 85088 KB Output is correct
13 Correct 39 ms 85072 KB Output is correct
14 Correct 39 ms 84988 KB Output is correct
15 Correct 41 ms 84928 KB Output is correct
16 Correct 43 ms 84988 KB Output is correct
17 Correct 41 ms 85076 KB Output is correct
18 Correct 39 ms 85072 KB Output is correct
19 Correct 41 ms 85076 KB Output is correct
20 Correct 42 ms 85072 KB Output is correct
21 Correct 42 ms 85068 KB Output is correct
22 Correct 40 ms 85076 KB Output is correct
23 Correct 41 ms 85080 KB Output is correct
24 Correct 39 ms 85076 KB Output is correct
25 Correct 39 ms 85076 KB Output is correct
26 Correct 42 ms 85012 KB Output is correct
27 Correct 42 ms 85084 KB Output is correct
28 Correct 41 ms 85072 KB Output is correct
29 Correct 44 ms 85068 KB Output is correct
30 Correct 41 ms 85072 KB Output is correct
31 Correct 405 ms 105540 KB Output is correct
32 Correct 65 ms 90844 KB Output is correct
33 Correct 434 ms 101316 KB Output is correct
34 Correct 372 ms 101316 KB Output is correct
35 Correct 456 ms 105408 KB Output is correct
36 Correct 485 ms 105328 KB Output is correct
37 Correct 370 ms 99976 KB Output is correct
38 Correct 384 ms 99852 KB Output is correct
39 Correct 310 ms 99780 KB Output is correct
40 Correct 347 ms 99784 KB Output is correct
41 Correct 308 ms 100040 KB Output is correct
42 Correct 247 ms 99780 KB Output is correct
43 Correct 69 ms 92868 KB Output is correct
44 Correct 309 ms 100032 KB Output is correct
45 Correct 299 ms 99784 KB Output is correct
46 Correct 318 ms 99704 KB Output is correct
47 Correct 202 ms 99164 KB Output is correct
48 Correct 221 ms 99012 KB Output is correct
49 Correct 259 ms 99548 KB Output is correct
50 Correct 242 ms 99740 KB Output is correct
51 Correct 271 ms 99268 KB Output is correct
52 Correct 278 ms 113352 KB Output is correct
53 Correct 259 ms 108996 KB Output is correct
54 Correct 254 ms 107520 KB Output is correct
55 Correct 324 ms 104392 KB Output is correct
56 Correct 325 ms 106692 KB Output is correct
57 Correct 297 ms 100968 KB Output is correct
58 Correct 288 ms 103908 KB Output is correct
59 Correct 285 ms 106156 KB Output is correct
60 Correct 305 ms 100548 KB Output is correct
61 Correct 128 ms 109000 KB Output is correct
62 Correct 302 ms 113432 KB Output is correct
63 Correct 269 ms 107896 KB Output is correct
64 Correct 279 ms 105672 KB Output is correct
65 Correct 282 ms 101548 KB Output is correct
66 Correct 303 ms 99780 KB Output is correct
67 Correct 153 ms 95724 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 85012 KB Output is correct
2 Correct 41 ms 84824 KB Output is correct
3 Correct 43 ms 84988 KB Output is correct
4 Correct 40 ms 84948 KB Output is correct
5 Correct 40 ms 85072 KB Output is correct
6 Correct 40 ms 85076 KB Output is correct
7 Correct 41 ms 84924 KB Output is correct
8 Correct 42 ms 85072 KB Output is correct
9 Correct 39 ms 85072 KB Output is correct
10 Correct 39 ms 84992 KB Output is correct
11 Correct 38 ms 84864 KB Output is correct
12 Correct 39 ms 85088 KB Output is correct
13 Correct 39 ms 85072 KB Output is correct
14 Correct 39 ms 84988 KB Output is correct
15 Correct 41 ms 84928 KB Output is correct
16 Correct 43 ms 84988 KB Output is correct
17 Correct 41 ms 85076 KB Output is correct
18 Correct 39 ms 85072 KB Output is correct
19 Correct 41 ms 85076 KB Output is correct
20 Correct 42 ms 85072 KB Output is correct
21 Correct 42 ms 85068 KB Output is correct
22 Correct 40 ms 85076 KB Output is correct
23 Correct 41 ms 85080 KB Output is correct
24 Correct 39 ms 85076 KB Output is correct
25 Correct 39 ms 85076 KB Output is correct
26 Correct 42 ms 85012 KB Output is correct
27 Correct 42 ms 85084 KB Output is correct
28 Correct 41 ms 85072 KB Output is correct
29 Correct 44 ms 85068 KB Output is correct
30 Correct 41 ms 85072 KB Output is correct
31 Correct 405 ms 105540 KB Output is correct
32 Correct 65 ms 90844 KB Output is correct
33 Correct 434 ms 101316 KB Output is correct
34 Correct 372 ms 101316 KB Output is correct
35 Correct 456 ms 105408 KB Output is correct
36 Correct 485 ms 105328 KB Output is correct
37 Correct 370 ms 99976 KB Output is correct
38 Correct 384 ms 99852 KB Output is correct
39 Correct 310 ms 99780 KB Output is correct
40 Correct 347 ms 99784 KB Output is correct
41 Correct 308 ms 100040 KB Output is correct
42 Correct 247 ms 99780 KB Output is correct
43 Correct 69 ms 92868 KB Output is correct
44 Correct 309 ms 100032 KB Output is correct
45 Correct 299 ms 99784 KB Output is correct
46 Correct 318 ms 99704 KB Output is correct
47 Correct 202 ms 99164 KB Output is correct
48 Correct 221 ms 99012 KB Output is correct
49 Correct 259 ms 99548 KB Output is correct
50 Correct 242 ms 99740 KB Output is correct
51 Correct 271 ms 99268 KB Output is correct
52 Correct 1908 ms 184392 KB Output is correct
53 Correct 2465 ms 173264 KB Output is correct
54 Correct 1714 ms 218236 KB Output is correct
55 Correct 1800 ms 189928 KB Output is correct
56 Correct 2572 ms 172956 KB Output is correct
57 Correct 2629 ms 173444 KB Output is correct
58 Correct 1631 ms 218132 KB Output is correct
59 Correct 1406 ms 190172 KB Output is correct
60 Correct 1385 ms 179804 KB Output is correct
61 Correct 1993 ms 174512 KB Output is correct
62 Correct 1458 ms 172376 KB Output is correct
63 Correct 1480 ms 174136 KB Output is correct
64 Correct 2188 ms 181596 KB Output is correct
65 Correct 156 ms 112952 KB Output is correct
66 Correct 2985 ms 179120 KB Output is correct
67 Correct 1671 ms 221840 KB Output is correct
68 Correct 1525 ms 187828 KB Output is correct
69 Correct 1381 ms 193744 KB Output is correct
70 Correct 2769 ms 177012 KB Output is correct
71 Correct 2841 ms 177572 KB Output is correct
72 Correct 1703 ms 221344 KB Output is correct
73 Correct 1679 ms 189780 KB Output is correct
74 Correct 1847 ms 181492 KB Output is correct
75 Correct 2640 ms 178604 KB Output is correct
76 Correct 1486 ms 174996 KB Output is correct
77 Correct 1390 ms 173968 KB Output is correct
78 Correct 1666 ms 176288 KB Output is correct
79 Correct 1774 ms 177784 KB Output is correct
80 Correct 1782 ms 175760 KB Output is correct
81 Correct 278 ms 113352 KB Output is correct
82 Correct 259 ms 108996 KB Output is correct
83 Correct 254 ms 107520 KB Output is correct
84 Correct 324 ms 104392 KB Output is correct
85 Correct 325 ms 106692 KB Output is correct
86 Correct 297 ms 100968 KB Output is correct
87 Correct 288 ms 103908 KB Output is correct
88 Correct 285 ms 106156 KB Output is correct
89 Correct 305 ms 100548 KB Output is correct
90 Correct 128 ms 109000 KB Output is correct
91 Correct 302 ms 113432 KB Output is correct
92 Correct 269 ms 107896 KB Output is correct
93 Correct 279 ms 105672 KB Output is correct
94 Correct 282 ms 101548 KB Output is correct
95 Correct 303 ms 99780 KB Output is correct
96 Correct 153 ms 95724 KB Output is correct
97 Correct 1757 ms 227468 KB Output is correct
98 Correct 178 ms 114592 KB Output is correct
99 Correct 2934 ms 163112 KB Output is correct
100 Correct 1635 ms 205664 KB Output is correct
101 Correct 1643 ms 199040 KB Output is correct
102 Correct 3046 ms 184904 KB Output is correct
103 Correct 2395 ms 158732 KB Output is correct
104 Correct 2552 ms 157924 KB Output is correct
105 Correct 1926 ms 156756 KB Output is correct
106 Correct 2045 ms 156764 KB Output is correct
107 Correct 1976 ms 181044 KB Output is correct
108 Correct 2164 ms 191912 KB Output is correct
109 Correct 1966 ms 165560 KB Output is correct
110 Correct 1689 ms 179756 KB Output is correct
111 Correct 1813 ms 192064 KB Output is correct
112 Correct 1732 ms 162780 KB Output is correct
113 Correct 528 ms 204160 KB Output is correct
114 Correct 2143 ms 227980 KB Output is correct
115 Correct 2315 ms 200976 KB Output is correct
116 Correct 2290 ms 188764 KB Output is correct
117 Correct 2296 ms 164160 KB Output is correct
118 Correct 2028 ms 155396 KB Output is correct
119 Correct 1161 ms 135648 KB Output is correct
120 Correct 985 ms 148448 KB Output is correct
121 Correct 1276 ms 151364 KB Output is correct
122 Correct 1334 ms 151056 KB Output is correct
123 Correct 1429 ms 152384 KB Output is correct
124 Correct 1390 ms 153052 KB Output is correct
125 Correct 1630 ms 152556 KB Output is correct
126 Correct 1300 ms 153452 KB Output is correct