Submission #811250

# Submission time Handle Problem Language Result Execution time Memory
811250 2023-08-07T03:11:51 Z blackyuki Radio Towers (IOI22_towers) C++17
41 / 100
4000 ms 45936 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<P> vp;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define REP(i,k,n) for(ll i=(ll)(k);i<(ll)(n);i++)
#define all(a) a.begin(),a.end()
#define fi first
#define se second
#define pb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
const ll inf=1001001001001;
#include "towers.h"
struct Sparsetable{
    ll n;
    vvi tablema,tablemi;
    vi sz;
    void init(vi v){
        n=v.size();
        tablema=vvi(18,vi(n));tablemi=vvi(18,vi(n));
        tablema[0]=tablemi[0]=v;
        rep(i,17)rep(j,n)if(j+(1<<(i+1))<=n){
            tablema[i+1][j]=max(tablema[i][j],tablema[i][j+(1<<i)]);
            tablemi[i+1][j]=min(tablemi[i][j],tablemi[i][j+(1<<i)]);
        }
        sz=vi(n+1);
        rep(i,18)REP(j,1<<i,1<<(i+1))if(j<=n)sz[j]=i;
    }
    ll getma(ll l,ll r){
        if(l>=r)return -inf;
        ll res=-inf;
        REP(i,l,r)chmax(res,tablema[0][i]);
        return res;
        ///////////////////////////////////////////////////////////
        ll s=sz[r-l];
        return max(tablema[s][l],tablema[s][r-(1<<s)]);
    }
    ll getmi(ll l,ll r){
        if(l>=r)return inf;
        ll res=inf;
        REP(i,l,r)chmin(res,tablemi[0][i]);
        return res;
        ///////////////////////////////////////////////////////////
        ll s=sz[r-l];
        return min(tablemi[s][l],tablemi[s][r-(1<<s)]);
    }
};
vi v,sp,dif;
vvi L,R;
ll n,m;
Sparsetable sps;
void init(int N,vector<int> H){
    for(int x:H)v.pb(-x);
    sps.init(v);
    n=N;
    rep(i,n)if((i==0||v[i-1]>v[i])&&(i==n-1||v[i+1]>v[i]))sp.pb(i);
    m=sp.size();
    L=vvi(18,vi(m,-1));R=vvi(18,vi(m,-1));
    {
        vi st;
        for(int i=m-1;i>=0;i--){
            while(st.size()&&v[sp[st.back()]]>v[sp[i]])st.pop_back();
            if(st.size())R[0][i]=st.back();
            st.pb(i);
        }
    }
    {
        vi st;
        rep(i,m){
            while(st.size()&&v[sp[st.back()]]>v[sp[i]])st.pop_back();
            if(st.size())L[0][i]=st.back();
            st.pb(i);
        }
    }
    rep(i,17)rep(j,m)if(L[i][j]!=-1)L[i+1][j]=L[i][L[i][j]];
    rep(i,17)rep(j,m)if(R[i][j]!=-1)R[i+1][j]=R[i][R[i][j]];
    dif=vi(m);
    rep(i,m){
        P rng;
        rng.fi=(L[0][i]==-1 ? 0 : sp[L[0][i]]+1);
        rng.se=(R[0][i]==-1 ? n-1 : sp[R[0][i]]-1);
        ll ma=min(sps.getma(rng.fi,sp[i]),sps.getma(sp[i]+1,rng.se+1));
        dif[i]=ma-v[sp[i]];
    }
}
int max_towers(int a, int b, int D){
    ll l=lb(sp,a),r=lb(sp,b+1)-1;
    if(l>r)return 1;
    ll l_=l,r_=r;
    {
        int cur=l;
        while(cur!=-1&&cur<=r){
            if(sps.getma(a,sp[cur])>=v[sp[cur]]+D)break;
            l_=cur+1;
            cur=R[0][cur];
        }
    }
    {
        int cur=r;
        while(cur!=-1&&cur>=l){
            if(sps.getma(sp[cur]+1,b+1)>=v[sp[cur]]+D)break;
            r_=cur-1;
            cur=L[0][cur];
        }
    }
    int ans=0;
    REP(i,l_,r_+1)if(dif[i]>=D)ans++;
    return ans+1;
}
# Verdict Execution time Memory Grader output
1 Correct 803 ms 18932 KB Output is correct
2 Correct 1234 ms 31628 KB Output is correct
3 Correct 1008 ms 31640 KB Output is correct
4 Correct 730 ms 31532 KB Output is correct
5 Correct 801 ms 31532 KB Output is correct
6 Correct 860 ms 31628 KB Output is correct
7 Correct 696 ms 31628 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 848 KB Output is correct
10 Correct 1 ms 848 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 464 KB Output is correct
2 Correct 1 ms 1104 KB Output is correct
3 Correct 1 ms 1104 KB Output is correct
4 Correct 1 ms 1104 KB Output is correct
5 Correct 1 ms 1104 KB Output is correct
6 Correct 1 ms 1104 KB Output is correct
7 Correct 1 ms 1104 KB Output is correct
8 Correct 1 ms 848 KB Output is correct
9 Correct 1 ms 848 KB Output is correct
10 Correct 1 ms 936 KB Output is correct
11 Correct 1 ms 848 KB Output is correct
12 Correct 0 ms 208 KB Output is correct
13 Correct 1 ms 848 KB Output is correct
14 Correct 1 ms 848 KB Output is correct
15 Correct 1 ms 1104 KB Output is correct
16 Correct 1 ms 1104 KB Output is correct
17 Correct 1 ms 1104 KB Output is correct
18 Correct 1 ms 848 KB Output is correct
19 Correct 1 ms 848 KB Output is correct
20 Correct 1 ms 1056 KB Output is correct
21 Correct 1 ms 1104 KB Output is correct
22 Correct 1 ms 1104 KB Output is correct
23 Correct 1 ms 848 KB Output is correct
24 Correct 1 ms 848 KB Output is correct
25 Correct 1 ms 592 KB Output is correct
26 Correct 1 ms 1104 KB Output is correct
27 Correct 1 ms 1104 KB Output is correct
28 Correct 1 ms 1104 KB Output is correct
29 Correct 1 ms 1104 KB Output is correct
30 Correct 1 ms 1104 KB Output is correct
31 Correct 1 ms 1104 KB Output is correct
32 Correct 1 ms 848 KB Output is correct
33 Correct 1 ms 848 KB Output is correct
34 Correct 1 ms 848 KB Output is correct
35 Correct 1 ms 940 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 464 KB Output is correct
2 Correct 1 ms 1104 KB Output is correct
3 Correct 1 ms 1104 KB Output is correct
4 Correct 1 ms 1104 KB Output is correct
5 Correct 1 ms 1104 KB Output is correct
6 Correct 1 ms 1104 KB Output is correct
7 Correct 1 ms 1104 KB Output is correct
8 Correct 1 ms 848 KB Output is correct
9 Correct 1 ms 848 KB Output is correct
10 Correct 1 ms 936 KB Output is correct
11 Correct 1 ms 848 KB Output is correct
12 Correct 0 ms 208 KB Output is correct
13 Correct 1 ms 848 KB Output is correct
14 Correct 1 ms 848 KB Output is correct
15 Correct 1 ms 1104 KB Output is correct
16 Correct 1 ms 1104 KB Output is correct
17 Correct 1 ms 1104 KB Output is correct
18 Correct 1 ms 848 KB Output is correct
19 Correct 1 ms 848 KB Output is correct
20 Correct 1 ms 1056 KB Output is correct
21 Correct 1 ms 1104 KB Output is correct
22 Correct 1 ms 1104 KB Output is correct
23 Correct 1 ms 848 KB Output is correct
24 Correct 1 ms 848 KB Output is correct
25 Correct 1 ms 592 KB Output is correct
26 Correct 1 ms 1104 KB Output is correct
27 Correct 1 ms 1104 KB Output is correct
28 Correct 1 ms 1104 KB Output is correct
29 Correct 1 ms 1104 KB Output is correct
30 Correct 1 ms 1104 KB Output is correct
31 Correct 1 ms 1104 KB Output is correct
32 Correct 1 ms 848 KB Output is correct
33 Correct 1 ms 848 KB Output is correct
34 Correct 1 ms 848 KB Output is correct
35 Correct 1 ms 940 KB Output is correct
36 Correct 24 ms 26720 KB Output is correct
37 Correct 32 ms 41076 KB Output is correct
38 Correct 33 ms 40988 KB Output is correct
39 Correct 41 ms 45812 KB Output is correct
40 Correct 35 ms 45860 KB Output is correct
41 Correct 36 ms 45808 KB Output is correct
42 Correct 41 ms 45852 KB Output is correct
43 Correct 31 ms 31564 KB Output is correct
44 Correct 25 ms 31620 KB Output is correct
45 Correct 27 ms 31624 KB Output is correct
46 Correct 27 ms 31572 KB Output is correct
47 Correct 35 ms 40932 KB Output is correct
48 Correct 39 ms 45860 KB Output is correct
49 Correct 36 ms 45832 KB Output is correct
50 Correct 27 ms 31588 KB Output is correct
51 Correct 31 ms 31632 KB Output is correct
52 Correct 33 ms 40964 KB Output is correct
53 Correct 37 ms 45852 KB Output is correct
54 Correct 37 ms 45772 KB Output is correct
55 Correct 27 ms 31532 KB Output is correct
56 Correct 31 ms 31640 KB Output is correct
57 Correct 33 ms 39300 KB Output is correct
58 Correct 39 ms 40984 KB Output is correct
59 Correct 34 ms 41064 KB Output is correct
60 Correct 36 ms 45864 KB Output is correct
61 Correct 36 ms 45804 KB Output is correct
62 Correct 36 ms 45816 KB Output is correct
63 Correct 36 ms 45756 KB Output is correct
64 Correct 31 ms 31640 KB Output is correct
65 Correct 26 ms 31668 KB Output is correct
66 Correct 26 ms 31636 KB Output is correct
67 Correct 30 ms 31568 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1129 ms 40664 KB Output is correct
2 Correct 1376 ms 40940 KB Output is correct
3 Correct 1483 ms 40988 KB Output is correct
4 Correct 1760 ms 45852 KB Output is correct
5 Correct 1844 ms 45808 KB Output is correct
6 Correct 1713 ms 45812 KB Output is correct
7 Correct 2078 ms 45892 KB Output is correct
8 Correct 680 ms 31640 KB Output is correct
9 Correct 625 ms 31676 KB Output is correct
10 Correct 2623 ms 31632 KB Output is correct
11 Correct 2584 ms 31612 KB Output is correct
12 Correct 930 ms 31620 KB Output is correct
13 Correct 836 ms 31660 KB Output is correct
14 Correct 1 ms 208 KB Output is correct
15 Correct 1 ms 936 KB Output is correct
16 Correct 1 ms 848 KB Output is correct
17 Correct 33 ms 40952 KB Output is correct
18 Correct 40 ms 45856 KB Output is correct
19 Correct 42 ms 45828 KB Output is correct
20 Correct 26 ms 31616 KB Output is correct
21 Correct 26 ms 31532 KB Output is correct
22 Correct 38 ms 41036 KB Output is correct
23 Correct 35 ms 45804 KB Output is correct
24 Correct 41 ms 45936 KB Output is correct
25 Correct 27 ms 31664 KB Output is correct
26 Correct 31 ms 31620 KB Output is correct
27 Correct 1 ms 1104 KB Output is correct
28 Correct 1 ms 1104 KB Output is correct
29 Correct 1 ms 1104 KB Output is correct
30 Correct 1 ms 848 KB Output is correct
31 Correct 1 ms 848 KB Output is correct
32 Correct 1 ms 1104 KB Output is correct
33 Correct 1 ms 1104 KB Output is correct
34 Correct 1 ms 1104 KB Output is correct
35 Correct 1 ms 848 KB Output is correct
36 Correct 1 ms 848 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 890 ms 10112 KB Output is correct
2 Execution timed out 4065 ms 40940 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 464 KB Output is correct
2 Correct 1 ms 1104 KB Output is correct
3 Correct 1 ms 1104 KB Output is correct
4 Correct 1 ms 1104 KB Output is correct
5 Correct 1 ms 1104 KB Output is correct
6 Correct 1 ms 1104 KB Output is correct
7 Correct 1 ms 1104 KB Output is correct
8 Correct 1 ms 848 KB Output is correct
9 Correct 1 ms 848 KB Output is correct
10 Correct 1 ms 936 KB Output is correct
11 Correct 1 ms 848 KB Output is correct
12 Correct 0 ms 208 KB Output is correct
13 Correct 1 ms 848 KB Output is correct
14 Correct 1 ms 848 KB Output is correct
15 Correct 1 ms 1104 KB Output is correct
16 Correct 1 ms 1104 KB Output is correct
17 Correct 1 ms 1104 KB Output is correct
18 Correct 1 ms 848 KB Output is correct
19 Correct 1 ms 848 KB Output is correct
20 Correct 1 ms 1056 KB Output is correct
21 Correct 1 ms 1104 KB Output is correct
22 Correct 1 ms 1104 KB Output is correct
23 Correct 1 ms 848 KB Output is correct
24 Correct 1 ms 848 KB Output is correct
25 Correct 1 ms 592 KB Output is correct
26 Correct 1 ms 1104 KB Output is correct
27 Correct 1 ms 1104 KB Output is correct
28 Correct 1 ms 1104 KB Output is correct
29 Correct 1 ms 1104 KB Output is correct
30 Correct 1 ms 1104 KB Output is correct
31 Correct 1 ms 1104 KB Output is correct
32 Correct 1 ms 848 KB Output is correct
33 Correct 1 ms 848 KB Output is correct
34 Correct 1 ms 848 KB Output is correct
35 Correct 1 ms 940 KB Output is correct
36 Correct 24 ms 26720 KB Output is correct
37 Correct 32 ms 41076 KB Output is correct
38 Correct 33 ms 40988 KB Output is correct
39 Correct 41 ms 45812 KB Output is correct
40 Correct 35 ms 45860 KB Output is correct
41 Correct 36 ms 45808 KB Output is correct
42 Correct 41 ms 45852 KB Output is correct
43 Correct 31 ms 31564 KB Output is correct
44 Correct 25 ms 31620 KB Output is correct
45 Correct 27 ms 31624 KB Output is correct
46 Correct 27 ms 31572 KB Output is correct
47 Correct 35 ms 40932 KB Output is correct
48 Correct 39 ms 45860 KB Output is correct
49 Correct 36 ms 45832 KB Output is correct
50 Correct 27 ms 31588 KB Output is correct
51 Correct 31 ms 31632 KB Output is correct
52 Correct 33 ms 40964 KB Output is correct
53 Correct 37 ms 45852 KB Output is correct
54 Correct 37 ms 45772 KB Output is correct
55 Correct 27 ms 31532 KB Output is correct
56 Correct 31 ms 31640 KB Output is correct
57 Correct 33 ms 39300 KB Output is correct
58 Correct 39 ms 40984 KB Output is correct
59 Correct 34 ms 41064 KB Output is correct
60 Correct 36 ms 45864 KB Output is correct
61 Correct 36 ms 45804 KB Output is correct
62 Correct 36 ms 45816 KB Output is correct
63 Correct 36 ms 45756 KB Output is correct
64 Correct 31 ms 31640 KB Output is correct
65 Correct 26 ms 31668 KB Output is correct
66 Correct 26 ms 31636 KB Output is correct
67 Correct 30 ms 31568 KB Output is correct
68 Correct 1129 ms 40664 KB Output is correct
69 Correct 1376 ms 40940 KB Output is correct
70 Correct 1483 ms 40988 KB Output is correct
71 Correct 1760 ms 45852 KB Output is correct
72 Correct 1844 ms 45808 KB Output is correct
73 Correct 1713 ms 45812 KB Output is correct
74 Correct 2078 ms 45892 KB Output is correct
75 Correct 680 ms 31640 KB Output is correct
76 Correct 625 ms 31676 KB Output is correct
77 Correct 2623 ms 31632 KB Output is correct
78 Correct 2584 ms 31612 KB Output is correct
79 Correct 930 ms 31620 KB Output is correct
80 Correct 836 ms 31660 KB Output is correct
81 Correct 1 ms 208 KB Output is correct
82 Correct 1 ms 936 KB Output is correct
83 Correct 1 ms 848 KB Output is correct
84 Correct 33 ms 40952 KB Output is correct
85 Correct 40 ms 45856 KB Output is correct
86 Correct 42 ms 45828 KB Output is correct
87 Correct 26 ms 31616 KB Output is correct
88 Correct 26 ms 31532 KB Output is correct
89 Correct 38 ms 41036 KB Output is correct
90 Correct 35 ms 45804 KB Output is correct
91 Correct 41 ms 45936 KB Output is correct
92 Correct 27 ms 31664 KB Output is correct
93 Correct 31 ms 31620 KB Output is correct
94 Correct 1 ms 1104 KB Output is correct
95 Correct 1 ms 1104 KB Output is correct
96 Correct 1 ms 1104 KB Output is correct
97 Correct 1 ms 848 KB Output is correct
98 Correct 1 ms 848 KB Output is correct
99 Correct 1 ms 1104 KB Output is correct
100 Correct 1 ms 1104 KB Output is correct
101 Correct 1 ms 1104 KB Output is correct
102 Correct 1 ms 848 KB Output is correct
103 Correct 1 ms 848 KB Output is correct
104 Correct 1509 ms 36308 KB Output is correct
105 Correct 3570 ms 40996 KB Output is correct
106 Execution timed out 4032 ms 41056 KB Time limit exceeded
107 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 803 ms 18932 KB Output is correct
2 Correct 1234 ms 31628 KB Output is correct
3 Correct 1008 ms 31640 KB Output is correct
4 Correct 730 ms 31532 KB Output is correct
5 Correct 801 ms 31532 KB Output is correct
6 Correct 860 ms 31628 KB Output is correct
7 Correct 696 ms 31628 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 848 KB Output is correct
10 Correct 1 ms 848 KB Output is correct
11 Correct 1 ms 464 KB Output is correct
12 Correct 1 ms 1104 KB Output is correct
13 Correct 1 ms 1104 KB Output is correct
14 Correct 1 ms 1104 KB Output is correct
15 Correct 1 ms 1104 KB Output is correct
16 Correct 1 ms 1104 KB Output is correct
17 Correct 1 ms 1104 KB Output is correct
18 Correct 1 ms 848 KB Output is correct
19 Correct 1 ms 848 KB Output is correct
20 Correct 1 ms 936 KB Output is correct
21 Correct 1 ms 848 KB Output is correct
22 Correct 0 ms 208 KB Output is correct
23 Correct 1 ms 848 KB Output is correct
24 Correct 1 ms 848 KB Output is correct
25 Correct 1 ms 1104 KB Output is correct
26 Correct 1 ms 1104 KB Output is correct
27 Correct 1 ms 1104 KB Output is correct
28 Correct 1 ms 848 KB Output is correct
29 Correct 1 ms 848 KB Output is correct
30 Correct 1 ms 1056 KB Output is correct
31 Correct 1 ms 1104 KB Output is correct
32 Correct 1 ms 1104 KB Output is correct
33 Correct 1 ms 848 KB Output is correct
34 Correct 1 ms 848 KB Output is correct
35 Correct 1 ms 592 KB Output is correct
36 Correct 1 ms 1104 KB Output is correct
37 Correct 1 ms 1104 KB Output is correct
38 Correct 1 ms 1104 KB Output is correct
39 Correct 1 ms 1104 KB Output is correct
40 Correct 1 ms 1104 KB Output is correct
41 Correct 1 ms 1104 KB Output is correct
42 Correct 1 ms 848 KB Output is correct
43 Correct 1 ms 848 KB Output is correct
44 Correct 1 ms 848 KB Output is correct
45 Correct 1 ms 940 KB Output is correct
46 Correct 24 ms 26720 KB Output is correct
47 Correct 32 ms 41076 KB Output is correct
48 Correct 33 ms 40988 KB Output is correct
49 Correct 41 ms 45812 KB Output is correct
50 Correct 35 ms 45860 KB Output is correct
51 Correct 36 ms 45808 KB Output is correct
52 Correct 41 ms 45852 KB Output is correct
53 Correct 31 ms 31564 KB Output is correct
54 Correct 25 ms 31620 KB Output is correct
55 Correct 27 ms 31624 KB Output is correct
56 Correct 27 ms 31572 KB Output is correct
57 Correct 35 ms 40932 KB Output is correct
58 Correct 39 ms 45860 KB Output is correct
59 Correct 36 ms 45832 KB Output is correct
60 Correct 27 ms 31588 KB Output is correct
61 Correct 31 ms 31632 KB Output is correct
62 Correct 33 ms 40964 KB Output is correct
63 Correct 37 ms 45852 KB Output is correct
64 Correct 37 ms 45772 KB Output is correct
65 Correct 27 ms 31532 KB Output is correct
66 Correct 31 ms 31640 KB Output is correct
67 Correct 33 ms 39300 KB Output is correct
68 Correct 39 ms 40984 KB Output is correct
69 Correct 34 ms 41064 KB Output is correct
70 Correct 36 ms 45864 KB Output is correct
71 Correct 36 ms 45804 KB Output is correct
72 Correct 36 ms 45816 KB Output is correct
73 Correct 36 ms 45756 KB Output is correct
74 Correct 31 ms 31640 KB Output is correct
75 Correct 26 ms 31668 KB Output is correct
76 Correct 26 ms 31636 KB Output is correct
77 Correct 30 ms 31568 KB Output is correct
78 Correct 1129 ms 40664 KB Output is correct
79 Correct 1376 ms 40940 KB Output is correct
80 Correct 1483 ms 40988 KB Output is correct
81 Correct 1760 ms 45852 KB Output is correct
82 Correct 1844 ms 45808 KB Output is correct
83 Correct 1713 ms 45812 KB Output is correct
84 Correct 2078 ms 45892 KB Output is correct
85 Correct 680 ms 31640 KB Output is correct
86 Correct 625 ms 31676 KB Output is correct
87 Correct 2623 ms 31632 KB Output is correct
88 Correct 2584 ms 31612 KB Output is correct
89 Correct 930 ms 31620 KB Output is correct
90 Correct 836 ms 31660 KB Output is correct
91 Correct 1 ms 208 KB Output is correct
92 Correct 1 ms 936 KB Output is correct
93 Correct 1 ms 848 KB Output is correct
94 Correct 33 ms 40952 KB Output is correct
95 Correct 40 ms 45856 KB Output is correct
96 Correct 42 ms 45828 KB Output is correct
97 Correct 26 ms 31616 KB Output is correct
98 Correct 26 ms 31532 KB Output is correct
99 Correct 38 ms 41036 KB Output is correct
100 Correct 35 ms 45804 KB Output is correct
101 Correct 41 ms 45936 KB Output is correct
102 Correct 27 ms 31664 KB Output is correct
103 Correct 31 ms 31620 KB Output is correct
104 Correct 1 ms 1104 KB Output is correct
105 Correct 1 ms 1104 KB Output is correct
106 Correct 1 ms 1104 KB Output is correct
107 Correct 1 ms 848 KB Output is correct
108 Correct 1 ms 848 KB Output is correct
109 Correct 1 ms 1104 KB Output is correct
110 Correct 1 ms 1104 KB Output is correct
111 Correct 1 ms 1104 KB Output is correct
112 Correct 1 ms 848 KB Output is correct
113 Correct 1 ms 848 KB Output is correct
114 Correct 890 ms 10112 KB Output is correct
115 Execution timed out 4065 ms 40940 KB Time limit exceeded
116 Halted 0 ms 0 KB -