Submission #1025315

# Submission time Handle Problem Language Result Execution time Memory
1025315 2024-07-16T19:45:50 Z Vanio Segments (IZhO18_segments) C++17
75 / 100
5000 ms 9172 KB
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("avx2")

#include<bits/stdc++.h>
using namespace std;

struct segment{
    int l,r;
};
segment seg[200001],tseg[200001];
bool fff(segment p, segment q){
    return p.r-p.l>q.r-q.l;
}

struct block{
    int mi=INT_MAX,ma=-1;
    vector<int> vl,vr;
};
block b[501];

struct query{
    int qt,id,l,r,k;
};
query qs[200001];

int n,segbr,t,nextSegmentId,lastans,bsz,bbr,qbStart=1;
vector<int> segmentIds;
bool F[200001];

void buildStructure(){
    int i=1;
    segbr=0;
    for(int it : segmentIds){
        if(F[it]==0){tseg[i]=seg[it]; ++i;segbr++;}

    }

    sort(tseg+1,tseg+1+segbr,fff);
    bsz=sqrt(segbr)+1;
    bbr=segbr/bsz;
    if(segbr%bsz>0) bbr++;
    int bindx=0;
    for(i=1;i<=segbr;++i){
        if(i%bsz==1) bindx++;
        b[bindx].mi=INT_MAX;
        b[bindx].ma=-1;
        b[bindx].vl.clear();
        b[bindx].vr.clear();
    }
    bindx=0;
    for(i=1;i<=segbr;++i){
        if(i%bsz==1) bindx++;
        //cout<<bindx<<" "<<seg[i].l<<" "<<seg[i].r<<'\n';
        b[bindx].mi=min(b[bindx].mi,tseg[i].r-tseg[i].l+1);
        b[bindx].ma=max(b[bindx].ma,tseg[i].r-tseg[i].l+1);
        b[bindx].vl.push_back(tseg[i].l);
        b[bindx].vr.push_back(tseg[i].r);
    }

    for(i=1;i<=bbr;++i){
        sort(b[i].vl.begin(),b[i].vl.end());
        sort(b[i].vr.begin(),b[i].vr.end());
    }
}

void handleQt1(int k){
    nextSegmentId++;
    qs[k].qt=1;
    qs[k].id=nextSegmentId;
    cin>>seg[nextSegmentId].l>>seg[nextSegmentId].r;
    seg[nextSegmentId].l^=lastans*t;
    seg[nextSegmentId].r^=lastans*t;
    if(seg[nextSegmentId].l>seg[nextSegmentId].r) swap(seg[nextSegmentId].l,seg[nextSegmentId].r);
    segmentIds.push_back(nextSegmentId);
}

void handleQt2(int k){
    qs[k].qt=2;
    cin>>qs[k].id;
    F[qs[k].id]=1;
}

void handleQt3(int ti){
    int l,r,k,ans=0,j,i;
    cin>>l>>r>>k;

    ans=segbr;
    l^=lastans*t;
    r^=lastans*t;
    if(l>r) swap(l,r);

    //cout<<"qt3 "<<l<<" "<<r<<" "<<k<<endl;
    for(i=1;i<=bbr;++i){
        if(b[i].mi>=k){
            auto it = lower_bound(b[i].vl.begin(),b[i].vl.end(),r-k+2);
            //cout<<"1 "<<b[i].vl.end()-it<<endl;
            ans-=b[i].vl.end()-it;
            auto it2 = upper_bound(b[i].vr.begin(),b[i].vr.end(),l+k-2);
            //cout<<"1 "<<it2-b[i].vr.begin()<<endl;
            ans-=it2-b[i].vr.begin();
        }
        else if(b[i].mi<k && k<=b[i].ma){
            for(j=(i-1)*bsz+1;j<=i*bsz && j<=segbr;++j){
                if(tseg[j].r-tseg[j].l+1<k || tseg[j].l>=r-k+2 || tseg[j].r<=l+k-2){ans--; /*cout<<"2 "<<j<<" "<<seg[j].l<<" "<<seg[j].r<<endl;*/}
            }
        }
        else{
            ans-=segbr-bsz*(i-1);
            //cout<<segbr-bsz*(i-1)<<endl;
            break;
        }
    }

    int segId;
    for(i=ti-1;i>=qbStart;--i){
        if(qs[i].qt==1){
            segId=qs[i].id;
            if(min(r,seg[segId].r)-max(l,seg[segId].l)+1>=k) ans++;
        }
        if(qs[i].qt==2){
            segId=qs[i].id;
            if(min(r,seg[segId].r)-max(l,seg[segId].l)+1>=k) ans--;
        }
    }

    lastans=ans;
    cout<<ans<<'\n';
}

int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);

int i,qt,l,r,id,k,f=0,qbsz;
cin>>n>>t;
qbsz=max((int)sqrt(n)-1,1);

for(i=1;i<=n;++i){
    if(i%qbsz==1){
        buildStructure();
        qbStart=i;
        //cout<<"new query block "<<i<<" "<<segbr<<endl;
    }

    cin>>qt;
    if(qt==1) handleQt1(i);
    if(qt==2) handleQt2(i);
    if(qt==3) handleQt3(i);
}

return 0;
}
/*
6 1
1 1 2
1 3 8
1 5 8
1 2 4
1 8 10
3 3 7 2

25 1
1 97 61
1 21 92
1 57 10
1 77 46
1 60 54
1 34 35
1 7 66
1 71 61
1 64 19
1 22 80
1 81 39
1 57 52
1 9 4
1 17 28
1 16 51
1 67 2
1 25 51
1 42 83
1 61 65
1 37 45
3 31 34 2
3 36 37 1
3 44 62 8
3 65 67 3
3 84 92 6

8   8
11  11
16  11
3   6
2   2
*/

Compilation message

segments.cpp:3:28: warning: bad option '-favx2' to pragma 'optimize' [-Wpragmas]
    3 | #pragma GCC optimize("avx2")
      |                            ^
segments.cpp:12:30: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   12 | bool fff(segment p, segment q){
      |                              ^
segments.cpp:31:21: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   31 | void buildStructure(){
      |                     ^
segments.cpp:67:21: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   67 | void handleQt1(int k){
      |                     ^
segments.cpp:78:21: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   78 | void handleQt2(int k){
      |                     ^
segments.cpp:84:22: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
   84 | void handleQt3(int ti){
      |                      ^
segments.cpp:131:10: warning: bad option '-favx2' to attribute 'optimize' [-Wattributes]
  131 | int main()
      |          ^
segments.cpp: In function 'int main()':
segments.cpp:137:10: warning: unused variable 'l' [-Wunused-variable]
  137 | int i,qt,l,r,id,k,f=0,qbsz;
      |          ^
segments.cpp:137:12: warning: unused variable 'r' [-Wunused-variable]
  137 | int i,qt,l,r,id,k,f=0,qbsz;
      |            ^
segments.cpp:137:14: warning: unused variable 'id' [-Wunused-variable]
  137 | int i,qt,l,r,id,k,f=0,qbsz;
      |              ^~
segments.cpp:137:17: warning: unused variable 'k' [-Wunused-variable]
  137 | int i,qt,l,r,id,k,f=0,qbsz;
      |                 ^
segments.cpp:137:19: warning: unused variable 'f' [-Wunused-variable]
  137 | int i,qt,l,r,id,k,f=0,qbsz;
      |                   ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 2 ms 6492 KB Output is correct
4 Correct 2 ms 6492 KB Output is correct
5 Correct 20 ms 6492 KB Output is correct
6 Correct 21 ms 6676 KB Output is correct
7 Correct 7 ms 6648 KB Output is correct
8 Correct 17 ms 6492 KB Output is correct
9 Correct 16 ms 6492 KB Output is correct
10 Correct 19 ms 6676 KB Output is correct
11 Correct 16 ms 6684 KB Output is correct
12 Correct 16 ms 6492 KB Output is correct
13 Correct 19 ms 6676 KB Output is correct
14 Correct 16 ms 6676 KB Output is correct
15 Correct 2 ms 6492 KB Output is correct
16 Correct 2 ms 6492 KB Output is correct
17 Correct 12 ms 6636 KB Output is correct
18 Correct 19 ms 6488 KB Output is correct
19 Correct 11 ms 6492 KB Output is correct
20 Correct 10 ms 6680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1777 ms 7560 KB Output is correct
2 Correct 1699 ms 7456 KB Output is correct
3 Correct 1705 ms 7528 KB Output is correct
4 Correct 1858 ms 7380 KB Output is correct
5 Correct 1907 ms 8356 KB Output is correct
6 Correct 1847 ms 8396 KB Output is correct
7 Correct 1776 ms 7376 KB Output is correct
8 Correct 1655 ms 7372 KB Output is correct
9 Correct 1688 ms 7376 KB Output is correct
10 Correct 960 ms 7312 KB Output is correct
11 Correct 1209 ms 7508 KB Output is correct
12 Correct 1939 ms 8120 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 39 ms 6996 KB Output is correct
2 Correct 34 ms 6996 KB Output is correct
3 Correct 52 ms 6996 KB Output is correct
4 Correct 32 ms 6876 KB Output is correct
5 Correct 2134 ms 8280 KB Output is correct
6 Correct 2032 ms 7400 KB Output is correct
7 Correct 2165 ms 8108 KB Output is correct
8 Correct 1998 ms 8492 KB Output is correct
9 Correct 2017 ms 8192 KB Output is correct
10 Correct 1867 ms 7692 KB Output is correct
11 Correct 216 ms 6992 KB Output is correct
12 Correct 1868 ms 7880 KB Output is correct
13 Correct 1725 ms 7644 KB Output is correct
14 Correct 1093 ms 7312 KB Output is correct
15 Correct 934 ms 7336 KB Output is correct
16 Correct 707 ms 7280 KB Output is correct
17 Correct 1985 ms 7548 KB Output is correct
18 Correct 2015 ms 7376 KB Output is correct
19 Correct 2032 ms 7376 KB Output is correct
20 Correct 2033 ms 7628 KB Output is correct
21 Correct 304 ms 7280 KB Output is correct
22 Correct 1317 ms 7556 KB Output is correct
23 Correct 1587 ms 7672 KB Output is correct
24 Correct 1407 ms 7372 KB Output is correct
25 Correct 47 ms 6996 KB Output is correct
26 Correct 35 ms 6996 KB Output is correct
27 Correct 40 ms 6992 KB Output is correct
28 Correct 37 ms 6992 KB Output is correct
29 Correct 1664 ms 7628 KB Output is correct
30 Correct 1675 ms 7520 KB Output is correct
31 Correct 1975 ms 8328 KB Output is correct
32 Correct 1843 ms 7632 KB Output is correct
33 Correct 1754 ms 7572 KB Output is correct
34 Correct 929 ms 7248 KB Output is correct
35 Correct 1593 ms 7444 KB Output is correct
36 Correct 1861 ms 7632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 33 ms 6996 KB Output is correct
2 Correct 34 ms 6996 KB Output is correct
3 Correct 34 ms 7000 KB Output is correct
4 Correct 36 ms 7052 KB Output is correct
5 Correct 2051 ms 7992 KB Output is correct
6 Correct 799 ms 7052 KB Output is correct
7 Correct 2068 ms 8180 KB Output is correct
8 Correct 1066 ms 7504 KB Output is correct
9 Correct 1246 ms 7272 KB Output is correct
10 Correct 1859 ms 7936 KB Output is correct
11 Correct 555 ms 7064 KB Output is correct
12 Correct 1976 ms 8396 KB Output is correct
13 Correct 1694 ms 7684 KB Output is correct
14 Correct 1170 ms 7368 KB Output is correct
15 Correct 1992 ms 8204 KB Output is correct
16 Correct 1746 ms 7624 KB Output is correct
17 Correct 1854 ms 7376 KB Output is correct
18 Correct 1906 ms 7488 KB Output is correct
19 Correct 1826 ms 7372 KB Output is correct
20 Correct 1781 ms 7376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 2 ms 6492 KB Output is correct
4 Correct 2 ms 6492 KB Output is correct
5 Correct 20 ms 6492 KB Output is correct
6 Correct 21 ms 6676 KB Output is correct
7 Correct 7 ms 6648 KB Output is correct
8 Correct 17 ms 6492 KB Output is correct
9 Correct 16 ms 6492 KB Output is correct
10 Correct 19 ms 6676 KB Output is correct
11 Correct 16 ms 6684 KB Output is correct
12 Correct 16 ms 6492 KB Output is correct
13 Correct 19 ms 6676 KB Output is correct
14 Correct 16 ms 6676 KB Output is correct
15 Correct 2 ms 6492 KB Output is correct
16 Correct 2 ms 6492 KB Output is correct
17 Correct 12 ms 6636 KB Output is correct
18 Correct 19 ms 6488 KB Output is correct
19 Correct 11 ms 6492 KB Output is correct
20 Correct 10 ms 6680 KB Output is correct
21 Correct 1777 ms 7560 KB Output is correct
22 Correct 1699 ms 7456 KB Output is correct
23 Correct 1705 ms 7528 KB Output is correct
24 Correct 1858 ms 7380 KB Output is correct
25 Correct 1907 ms 8356 KB Output is correct
26 Correct 1847 ms 8396 KB Output is correct
27 Correct 1776 ms 7376 KB Output is correct
28 Correct 1655 ms 7372 KB Output is correct
29 Correct 1688 ms 7376 KB Output is correct
30 Correct 960 ms 7312 KB Output is correct
31 Correct 1209 ms 7508 KB Output is correct
32 Correct 1939 ms 8120 KB Output is correct
33 Correct 33 ms 6996 KB Output is correct
34 Correct 34 ms 6996 KB Output is correct
35 Correct 34 ms 7000 KB Output is correct
36 Correct 36 ms 7052 KB Output is correct
37 Correct 2051 ms 7992 KB Output is correct
38 Correct 799 ms 7052 KB Output is correct
39 Correct 2068 ms 8180 KB Output is correct
40 Correct 1066 ms 7504 KB Output is correct
41 Correct 1246 ms 7272 KB Output is correct
42 Correct 1859 ms 7936 KB Output is correct
43 Correct 555 ms 7064 KB Output is correct
44 Correct 1976 ms 8396 KB Output is correct
45 Correct 1694 ms 7684 KB Output is correct
46 Correct 1170 ms 7368 KB Output is correct
47 Correct 1992 ms 8204 KB Output is correct
48 Correct 1746 ms 7624 KB Output is correct
49 Correct 1854 ms 7376 KB Output is correct
50 Correct 1906 ms 7488 KB Output is correct
51 Correct 1826 ms 7372 KB Output is correct
52 Correct 1781 ms 7376 KB Output is correct
53 Correct 36 ms 6892 KB Output is correct
54 Correct 49 ms 6996 KB Output is correct
55 Correct 40 ms 7004 KB Output is correct
56 Correct 34 ms 6996 KB Output is correct
57 Correct 1363 ms 7252 KB Output is correct
58 Correct 568 ms 7080 KB Output is correct
59 Correct 1972 ms 7372 KB Output is correct
60 Correct 504 ms 7024 KB Output is correct
61 Correct 1642 ms 7692 KB Output is correct
62 Correct 1958 ms 8136 KB Output is correct
63 Correct 1911 ms 8244 KB Output is correct
64 Correct 1951 ms 8396 KB Output is correct
65 Correct 704 ms 7248 KB Output is correct
66 Correct 618 ms 7116 KB Output is correct
67 Correct 1792 ms 7528 KB Output is correct
68 Correct 1547 ms 7420 KB Output is correct
69 Correct 1800 ms 7564 KB Output is correct
70 Correct 1836 ms 7376 KB Output is correct
71 Correct 1893 ms 7440 KB Output is correct
72 Correct 1763 ms 7372 KB Output is correct
73 Correct 879 ms 7252 KB Output is correct
74 Correct 1496 ms 7480 KB Output is correct
75 Correct 1956 ms 8404 KB Output is correct
76 Correct 1953 ms 8360 KB Output is correct
77 Correct 36 ms 6892 KB Output is correct
78 Correct 35 ms 6948 KB Output is correct
79 Correct 37 ms 6992 KB Output is correct
80 Correct 34 ms 6900 KB Output is correct
81 Correct 1518 ms 7488 KB Output is correct
82 Correct 871 ms 7388 KB Output is correct
83 Correct 525 ms 7100 KB Output is correct
84 Correct 1451 ms 7380 KB Output is correct
85 Correct 1805 ms 7732 KB Output is correct
86 Correct 1774 ms 8140 KB Output is correct
87 Correct 1176 ms 7188 KB Output is correct
88 Correct 545 ms 7196 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 2 ms 6492 KB Output is correct
4 Correct 2 ms 6492 KB Output is correct
5 Correct 20 ms 6492 KB Output is correct
6 Correct 21 ms 6676 KB Output is correct
7 Correct 7 ms 6648 KB Output is correct
8 Correct 17 ms 6492 KB Output is correct
9 Correct 16 ms 6492 KB Output is correct
10 Correct 19 ms 6676 KB Output is correct
11 Correct 16 ms 6684 KB Output is correct
12 Correct 16 ms 6492 KB Output is correct
13 Correct 19 ms 6676 KB Output is correct
14 Correct 16 ms 6676 KB Output is correct
15 Correct 2 ms 6492 KB Output is correct
16 Correct 2 ms 6492 KB Output is correct
17 Correct 12 ms 6636 KB Output is correct
18 Correct 19 ms 6488 KB Output is correct
19 Correct 11 ms 6492 KB Output is correct
20 Correct 10 ms 6680 KB Output is correct
21 Correct 1777 ms 7560 KB Output is correct
22 Correct 1699 ms 7456 KB Output is correct
23 Correct 1705 ms 7528 KB Output is correct
24 Correct 1858 ms 7380 KB Output is correct
25 Correct 1907 ms 8356 KB Output is correct
26 Correct 1847 ms 8396 KB Output is correct
27 Correct 1776 ms 7376 KB Output is correct
28 Correct 1655 ms 7372 KB Output is correct
29 Correct 1688 ms 7376 KB Output is correct
30 Correct 960 ms 7312 KB Output is correct
31 Correct 1209 ms 7508 KB Output is correct
32 Correct 1939 ms 8120 KB Output is correct
33 Correct 39 ms 6996 KB Output is correct
34 Correct 34 ms 6996 KB Output is correct
35 Correct 52 ms 6996 KB Output is correct
36 Correct 32 ms 6876 KB Output is correct
37 Correct 2134 ms 8280 KB Output is correct
38 Correct 2032 ms 7400 KB Output is correct
39 Correct 2165 ms 8108 KB Output is correct
40 Correct 1998 ms 8492 KB Output is correct
41 Correct 2017 ms 8192 KB Output is correct
42 Correct 1867 ms 7692 KB Output is correct
43 Correct 216 ms 6992 KB Output is correct
44 Correct 1868 ms 7880 KB Output is correct
45 Correct 1725 ms 7644 KB Output is correct
46 Correct 1093 ms 7312 KB Output is correct
47 Correct 934 ms 7336 KB Output is correct
48 Correct 707 ms 7280 KB Output is correct
49 Correct 1985 ms 7548 KB Output is correct
50 Correct 2015 ms 7376 KB Output is correct
51 Correct 2032 ms 7376 KB Output is correct
52 Correct 2033 ms 7628 KB Output is correct
53 Correct 304 ms 7280 KB Output is correct
54 Correct 1317 ms 7556 KB Output is correct
55 Correct 1587 ms 7672 KB Output is correct
56 Correct 1407 ms 7372 KB Output is correct
57 Correct 47 ms 6996 KB Output is correct
58 Correct 35 ms 6996 KB Output is correct
59 Correct 40 ms 6992 KB Output is correct
60 Correct 37 ms 6992 KB Output is correct
61 Correct 1664 ms 7628 KB Output is correct
62 Correct 1675 ms 7520 KB Output is correct
63 Correct 1975 ms 8328 KB Output is correct
64 Correct 1843 ms 7632 KB Output is correct
65 Correct 1754 ms 7572 KB Output is correct
66 Correct 929 ms 7248 KB Output is correct
67 Correct 1593 ms 7444 KB Output is correct
68 Correct 1861 ms 7632 KB Output is correct
69 Correct 33 ms 6996 KB Output is correct
70 Correct 34 ms 6996 KB Output is correct
71 Correct 34 ms 7000 KB Output is correct
72 Correct 36 ms 7052 KB Output is correct
73 Correct 2051 ms 7992 KB Output is correct
74 Correct 799 ms 7052 KB Output is correct
75 Correct 2068 ms 8180 KB Output is correct
76 Correct 1066 ms 7504 KB Output is correct
77 Correct 1246 ms 7272 KB Output is correct
78 Correct 1859 ms 7936 KB Output is correct
79 Correct 555 ms 7064 KB Output is correct
80 Correct 1976 ms 8396 KB Output is correct
81 Correct 1694 ms 7684 KB Output is correct
82 Correct 1170 ms 7368 KB Output is correct
83 Correct 1992 ms 8204 KB Output is correct
84 Correct 1746 ms 7624 KB Output is correct
85 Correct 1854 ms 7376 KB Output is correct
86 Correct 1906 ms 7488 KB Output is correct
87 Correct 1826 ms 7372 KB Output is correct
88 Correct 1781 ms 7376 KB Output is correct
89 Correct 36 ms 6892 KB Output is correct
90 Correct 49 ms 6996 KB Output is correct
91 Correct 40 ms 7004 KB Output is correct
92 Correct 34 ms 6996 KB Output is correct
93 Correct 1363 ms 7252 KB Output is correct
94 Correct 568 ms 7080 KB Output is correct
95 Correct 1972 ms 7372 KB Output is correct
96 Correct 504 ms 7024 KB Output is correct
97 Correct 1642 ms 7692 KB Output is correct
98 Correct 1958 ms 8136 KB Output is correct
99 Correct 1911 ms 8244 KB Output is correct
100 Correct 1951 ms 8396 KB Output is correct
101 Correct 704 ms 7248 KB Output is correct
102 Correct 618 ms 7116 KB Output is correct
103 Correct 1792 ms 7528 KB Output is correct
104 Correct 1547 ms 7420 KB Output is correct
105 Correct 1800 ms 7564 KB Output is correct
106 Correct 1836 ms 7376 KB Output is correct
107 Correct 1893 ms 7440 KB Output is correct
108 Correct 1763 ms 7372 KB Output is correct
109 Correct 879 ms 7252 KB Output is correct
110 Correct 1496 ms 7480 KB Output is correct
111 Correct 1956 ms 8404 KB Output is correct
112 Correct 1953 ms 8360 KB Output is correct
113 Correct 36 ms 6892 KB Output is correct
114 Correct 35 ms 6948 KB Output is correct
115 Correct 37 ms 6992 KB Output is correct
116 Correct 34 ms 6900 KB Output is correct
117 Correct 1518 ms 7488 KB Output is correct
118 Correct 871 ms 7388 KB Output is correct
119 Correct 525 ms 7100 KB Output is correct
120 Correct 1451 ms 7380 KB Output is correct
121 Correct 1805 ms 7732 KB Output is correct
122 Correct 1774 ms 8140 KB Output is correct
123 Correct 1176 ms 7188 KB Output is correct
124 Correct 545 ms 7196 KB Output is correct
125 Correct 78 ms 7384 KB Output is correct
126 Correct 78 ms 7376 KB Output is correct
127 Correct 105 ms 7300 KB Output is correct
128 Correct 78 ms 7296 KB Output is correct
129 Correct 66 ms 7380 KB Output is correct
130 Correct 84 ms 7392 KB Output is correct
131 Correct 1729 ms 7784 KB Output is correct
132 Correct 4955 ms 8668 KB Output is correct
133 Execution timed out 5061 ms 9172 KB Time limit exceeded
134 Halted 0 ms 0 KB -