Submission #891897

# Submission time Handle Problem Language Result Execution time Memory
891897 2023-12-24T11:44:24 Z vjudge1 Jail (JOI22_jail) C++11
66 / 100
5000 ms 45516 KB
/*

author : abushbandit
contest : ---

*/

#include "bits/stdc++.h"

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;

using namespace std;

#define int long long
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define ff first
#define ss second
#define pb push_back
#define rep(i,s,f) for(int i = s;i < f;i++)

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

#pragma GCC optimize("Ofast,no-stack-protector,fast-math",3)

template <class type1>
	using ordered_multiset = tree <type1, null_type, less_equal <type1>, rb_tree_tag, tree_order_statistics_node_update>;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<pair<int,int>> vii;
typedef pair<int,int> pii;

template <class F, class _S>
bool chmin(F &u, const _S &v){
    bool flag = false;
    if ( u > v ){
        u = v; flag |= true;
    }
    return flag;
}

template <class F, class _S>
bool chmax(F &u, const _S &v){
    bool flag = false;
    if ( u < v ){
        u = v; flag |= true;
    }
    return flag;
    
}

int binpow (int a, int n) {
	int res = 1;
	while (n) {
		if (n & 1)
			res *= a;
		a *= a;
		n >>= 1;
	}
	return res;
}

void start_file(string file){
	freopen((file + ".in").c_str(),"r",stdin);
	freopen((file + ".out").c_str(),"w",stdout);
}
 
const int mod = 1e9+7;
const double PI = acos(-1.0);
const double epsilon = 1e-6;
const int N = 1.2e5+5;
vector<int> g[N];
 
int sz[N], d[N], h[N], up[20][N];
int top[N], chain[N], tin[N], tout[N], rt, timer;
 
void clean(){
	d[1] = 0;
	for(int i = 1; i < N; i++){
		g[i].clear();
		for(int j = 0; j < 20; j++) up[j][i] = 0;
	}
}
 
struct SegmentTree{
	int tree[N * 4];
	int lazy[N * 4];
 
	void push(int v, int tl, int tr) {
		if (lazy[v] == 0) return;
		if (tl != tr) {
			lazy[v * 2] += lazy[v];
			lazy[v * 2 + 1] += lazy[v];
		}
		tree[v] += lazy[v];
		lazy[v] = 0;
	}
	 
	void update(int l, int r, int x, int v, int tl, int tr) {
		push(v, tl, tr);
		if (l > tr || tl > r) return ;
		if (l <= tl && tr <= r) {
			lazy[v] = x;
			push(v, tl, tr);
			return;
		}
		int tm = (tl + tr) / 2;
		update(l, r, x, v * 2, tl, tm);
		update(l, r, x, v * 2 + 1, tm + 1, tr);
		tree[v] = tree[v * 2] + tree[v * 2 + 1];
	}
	 
	int get(int v, int tl, int tr, int l, int r) {
		push(v, tl, tr);
		if (l > tr || tl > r) return 0;
		if (l <= tl && tr <= r)return tree[v];
		int tm = (tl + tr) / 2;
		return get(v * 2, tl, tm, l, r) + get(v * 2 + 1, tm + 1, tr, l, r);
	}
	
	void clean(){
		for(int i = 0; i < N * 4; i++) tree[i] = 0,lazy[i] = 0;
	}
};
 
SegmentTree seg;
 
void dfs(int u, int p){
    up[0][u] = p;
    for ( int i = 1; i < 20; i++ ){
        up[i][u] = up[i - 1][up[i - 1][u]];
    }
    sz[u] = 1;
    for ( auto &v: g[u] ){
        if ( v != p ){
            d[v] = d[u] + 1;
            dfs(v, u);
            sz[u] += sz[v];
        }
    }
    for ( auto &v: g[u] ){
        if ( v != p ){
            if ( h[u] == -1 || sz[h[u]] < sz[v] ){
                h[u] = v;
            }
        }
    }
}
 
int lca(int u, int v){
    if ( d[u] < d[v] ) swap(u, v);
    int df = d[u] - d[v];
    for ( int i = 0; i < 20; i++ ){
        if ( df >> i & 1 ){
            u = up[i][u];
        }
    }
    if ( u == v ){
        return u;
    }
    for ( int i = 19; i >= 0; i-- ){
        if ( up[i][u] != up[i][v] ){
            u = up[i][u];
            v = up[i][v];
        }
    }
    return up[0][u];
};
 
 
void HLD(int u, int p){
    tin[u] = ++timer;
    chain[u] = rt;
    if ( top[rt] == -1 ){
        top[rt] = u;
    }
    if ( h[u] != -1 ) HLD(h[u], u);
    for ( auto &v: g[u] ){
        if ( v != p && h[u] != v ){
            rt++; HLD(v, u);
        }
    }
    tout[u] = timer;
}
 
void upd(int u,int v,int val){
	if ( d[u] < d[v] ) swap(u, v);
    while ( chain[u] != chain[v] ){
        int nxt = top[chain[u]];
        seg.update(tin[nxt],tin[u],val,1,1,N);
        u = up[0][nxt];
    }
    seg.update(tin[v],tin[u],val,1,1,N);
}
 
void update(int u,int v, int val){
	int lc = lca(u,v);
	upd(u,lc,val); upd(v,lc,val);
    seg.update(tin[lc],tin[lc],-val,1,1,N);
}
 
void solve(){
	
	int n; cin >> n;
	bool bamboo = 0;
	for(int i = 1; i < n; i++){
		int u,v; cin >> u >> v;
		if(u == i && v == i + 1){
			
		} else{
			bamboo = 1;
		}
		g[u].pb(v); g[v].pb(u);
	}
	if(!bamboo){
	 	vector<bool> used(n, 0);
        bool flag = 1;
        deque<pair<int, int>> l, r;
        int m;
        cin >> m;
        while (m--) {
            int s, t;
            cin >> s >> t;
            s--, t--;
            if (t > s) {
                r.push_back({t, s});
            } else {
                l.push_back({t, s});
            }
            used[s] = 1;
        }
        sort(all(l)), sort(all(r));
        while (!l.empty()) {
            int s = l.front().second, t = l.front().first;
            l.pop_front();
            used[s] = 0;
            while (s >= t) {
                if (used[s]) {
                    flag = 0;
                    break;
                }
                s--;
            }
            used[t] = 1;
        }
        while (!r.empty()) {
            int s = r.back().second, t = r.back().first;
            r.pop_back();
            used[s] = 0;
            while (s <= t) {
                if (used[s]) {
                    flag = 0;
                    break;
                }
                s++;
            }
            used[t] = 1;
        }
        if(flag){
        	cout << "Yes\n";
		} else{
			cout << "No\n";
		}
		return;
	}
    int m; cin >> m;
    vector<pair<int,int> > qr(m);
    for(auto &[l,r] : qr) cin >> l >> r;
    seg.clean();
    for(int i = 0; i < N; i++) top[i] = -1, h[i] = -1;
    rt = 0; timer = 0;
    dfs(1,1); HLD(1,1);
    
    for(auto [u,v] : qr) update(u,v,1);
    
	vector<int> cnt(m);
	for(int i = 0; i < m; i++){
		for(int j = 0; j < m; j++){
			if(i == j) continue;
			auto [u,v] = qr[i];
			int goal = qr[j].ff;
			int lc = lca(u,v);
			if(((tin[goal] <= tin[u] && tout[u] <= tout[goal]) || (tin[goal] <= tin[v] && tout[v] <= tout[goal])) && (tin[lc] <= tin[goal] && tout[goal] <= tout[lc])) cnt[i]++;
		}
	}
    
    vector<int> vis(m);
    for(int time = 0; time < m; time++){
		bool ok = 0;
		int ind = 0;
		for(int i = 0; i < m; i++){
			if(vis[i]) continue;
			auto [u,v] = qr[i];
			update(u,v,-1);
			if(cnt[i] == 0 && seg.get(1,1,N,tin[v],tin[v]) == 0){
				vis[i] = 1;
				ok = 1;
				ind = i;
				break;
			}else{
				update(u,v,1);
			}
		}
		if(!ok){
			cout << "No\n";
			clean();
			return;
		}
		for(int i = 0; i < m; i++){
			auto [u,v] = qr[i];
			int goal = qr[ind].ff;
			int lc = lca(u,v);
			if(((tin[goal] <= tin[u] && tout[u] <= tout[goal]) || 
				(tin[goal] <= tin[v] && tout[v] <= tout[goal])) && 
				(tin[lc] <= tin[goal] && tout[goal] <= tout[lc])) cnt[i]--;
		}
	}
	cout << "Yes\n";
    clean();
}
 
main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
 
    int tt = 1;
    cin >> tt;
    while (tt--) {
        solve();
    }
}

Compilation message

jail.cpp: In function 'void solve()':
jail.cpp:273:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  273 |     for(auto &[l,r] : qr) cin >> l >> r;
      |               ^
jail.cpp:279:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  279 |     for(auto [u,v] : qr) update(u,v,1);
      |              ^
jail.cpp:285:9: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  285 |    auto [u,v] = qr[i];
      |         ^
jail.cpp:298:9: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  298 |    auto [u,v] = qr[i];
      |         ^
jail.cpp:315:9: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  315 |    auto [u,v] = qr[i];
      |         ^
jail.cpp: At global scope:
jail.cpp:327:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
  327 | main(){
      | ^~~~
jail.cpp: In function 'void start_file(std::string)':
jail.cpp:69:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   69 |  freopen((file + ".in").c_str(),"r",stdin);
      |  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jail.cpp:70:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   70 |  freopen((file + ".out").c_str(),"w",stdout);
      |  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 5224 KB Output is correct
2 Correct 1 ms 5212 KB Output is correct
3 Correct 1 ms 5228 KB Output is correct
4 Correct 9 ms 6524 KB Output is correct
5 Correct 14 ms 7772 KB Output is correct
6 Correct 2 ms 5212 KB Output is correct
7 Correct 2 ms 5212 KB Output is correct
8 Correct 2 ms 5212 KB Output is correct
9 Correct 22 ms 9556 KB Output is correct
10 Correct 60 ms 10332 KB Output is correct
11 Correct 4 ms 5724 KB Output is correct
12 Correct 17 ms 8028 KB Output is correct
13 Correct 34 ms 11600 KB Output is correct
14 Correct 43 ms 11940 KB Output is correct
15 Correct 34 ms 11604 KB Output is correct
16 Correct 49 ms 13656 KB Output is correct
17 Correct 2253 ms 12112 KB Output is correct
18 Correct 41 ms 13660 KB Output is correct
19 Correct 780 ms 12128 KB Output is correct
20 Correct 778 ms 12112 KB Output is correct
21 Correct 31 ms 11884 KB Output is correct
22 Correct 33 ms 12136 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 5208 KB Output is correct
2 Correct 1 ms 5212 KB Output is correct
3 Correct 2 ms 5212 KB Output is correct
4 Correct 45 ms 36188 KB Output is correct
5 Correct 48 ms 36184 KB Output is correct
6 Correct 47 ms 36188 KB Output is correct
7 Correct 47 ms 36188 KB Output is correct
8 Correct 52 ms 36436 KB Output is correct
9 Correct 46 ms 36184 KB Output is correct
10 Correct 45 ms 36184 KB Output is correct
11 Correct 39 ms 36188 KB Output is correct
12 Correct 45 ms 35932 KB Output is correct
13 Correct 46 ms 36156 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 5208 KB Output is correct
2 Correct 1 ms 5212 KB Output is correct
3 Correct 2 ms 5212 KB Output is correct
4 Correct 45 ms 36188 KB Output is correct
5 Correct 48 ms 36184 KB Output is correct
6 Correct 47 ms 36188 KB Output is correct
7 Correct 47 ms 36188 KB Output is correct
8 Correct 52 ms 36436 KB Output is correct
9 Correct 46 ms 36184 KB Output is correct
10 Correct 45 ms 36184 KB Output is correct
11 Correct 39 ms 36188 KB Output is correct
12 Correct 45 ms 35932 KB Output is correct
13 Correct 46 ms 36156 KB Output is correct
14 Correct 7 ms 35932 KB Output is correct
15 Correct 1 ms 5212 KB Output is correct
16 Correct 2 ms 5220 KB Output is correct
17 Correct 47 ms 36180 KB Output is correct
18 Correct 49 ms 36184 KB Output is correct
19 Correct 46 ms 35932 KB Output is correct
20 Correct 46 ms 36184 KB Output is correct
21 Correct 46 ms 36188 KB Output is correct
22 Correct 45 ms 36188 KB Output is correct
23 Correct 48 ms 35932 KB Output is correct
24 Correct 46 ms 35928 KB Output is correct
25 Correct 46 ms 36188 KB Output is correct
26 Correct 45 ms 36392 KB Output is correct
27 Correct 46 ms 36184 KB Output is correct
28 Correct 47 ms 35932 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 5208 KB Output is correct
2 Correct 1 ms 5212 KB Output is correct
3 Correct 2 ms 5212 KB Output is correct
4 Correct 45 ms 36188 KB Output is correct
5 Correct 48 ms 36184 KB Output is correct
6 Correct 47 ms 36188 KB Output is correct
7 Correct 47 ms 36188 KB Output is correct
8 Correct 52 ms 36436 KB Output is correct
9 Correct 46 ms 36184 KB Output is correct
10 Correct 45 ms 36184 KB Output is correct
11 Correct 39 ms 36188 KB Output is correct
12 Correct 45 ms 35932 KB Output is correct
13 Correct 46 ms 36156 KB Output is correct
14 Correct 7 ms 35932 KB Output is correct
15 Correct 1 ms 5212 KB Output is correct
16 Correct 2 ms 5220 KB Output is correct
17 Correct 47 ms 36180 KB Output is correct
18 Correct 49 ms 36184 KB Output is correct
19 Correct 46 ms 35932 KB Output is correct
20 Correct 46 ms 36184 KB Output is correct
21 Correct 46 ms 36188 KB Output is correct
22 Correct 45 ms 36188 KB Output is correct
23 Correct 48 ms 35932 KB Output is correct
24 Correct 46 ms 35928 KB Output is correct
25 Correct 46 ms 36188 KB Output is correct
26 Correct 45 ms 36392 KB Output is correct
27 Correct 46 ms 36184 KB Output is correct
28 Correct 47 ms 35932 KB Output is correct
29 Correct 2 ms 5212 KB Output is correct
30 Correct 57 ms 36188 KB Output is correct
31 Correct 59 ms 36188 KB Output is correct
32 Correct 55 ms 36188 KB Output is correct
33 Correct 47 ms 36196 KB Output is correct
34 Correct 52 ms 36188 KB Output is correct
35 Correct 62 ms 36196 KB Output is correct
36 Correct 69 ms 36180 KB Output is correct
37 Correct 73 ms 36172 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 5208 KB Output is correct
2 Correct 1 ms 5212 KB Output is correct
3 Correct 2 ms 5212 KB Output is correct
4 Correct 45 ms 36188 KB Output is correct
5 Correct 48 ms 36184 KB Output is correct
6 Correct 47 ms 36188 KB Output is correct
7 Correct 47 ms 36188 KB Output is correct
8 Correct 52 ms 36436 KB Output is correct
9 Correct 46 ms 36184 KB Output is correct
10 Correct 45 ms 36184 KB Output is correct
11 Correct 39 ms 36188 KB Output is correct
12 Correct 45 ms 35932 KB Output is correct
13 Correct 46 ms 36156 KB Output is correct
14 Correct 7 ms 35932 KB Output is correct
15 Correct 1 ms 5212 KB Output is correct
16 Correct 2 ms 5220 KB Output is correct
17 Correct 47 ms 36180 KB Output is correct
18 Correct 49 ms 36184 KB Output is correct
19 Correct 46 ms 35932 KB Output is correct
20 Correct 46 ms 36184 KB Output is correct
21 Correct 46 ms 36188 KB Output is correct
22 Correct 45 ms 36188 KB Output is correct
23 Correct 48 ms 35932 KB Output is correct
24 Correct 46 ms 35928 KB Output is correct
25 Correct 46 ms 36188 KB Output is correct
26 Correct 45 ms 36392 KB Output is correct
27 Correct 46 ms 36184 KB Output is correct
28 Correct 47 ms 35932 KB Output is correct
29 Correct 2 ms 5212 KB Output is correct
30 Correct 57 ms 36188 KB Output is correct
31 Correct 59 ms 36188 KB Output is correct
32 Correct 55 ms 36188 KB Output is correct
33 Correct 47 ms 36196 KB Output is correct
34 Correct 52 ms 36188 KB Output is correct
35 Correct 62 ms 36196 KB Output is correct
36 Correct 69 ms 36180 KB Output is correct
37 Correct 73 ms 36172 KB Output is correct
38 Correct 22 ms 9564 KB Output is correct
39 Correct 60 ms 10328 KB Output is correct
40 Correct 975 ms 37756 KB Output is correct
41 Correct 1120 ms 37716 KB Output is correct
42 Correct 747 ms 37804 KB Output is correct
43 Correct 67 ms 37644 KB Output is correct
44 Correct 122 ms 36444 KB Output is correct
45 Correct 167 ms 41676 KB Output is correct
46 Correct 152 ms 41820 KB Output is correct
47 Correct 48 ms 45516 KB Output is correct
48 Correct 50 ms 45392 KB Output is correct
49 Correct 192 ms 42004 KB Output is correct
50 Correct 183 ms 42060 KB Output is correct
51 Correct 46 ms 43108 KB Output is correct
52 Correct 46 ms 43100 KB Output is correct
53 Correct 612 ms 36956 KB Output is correct
54 Correct 93 ms 42588 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 5208 KB Output is correct
2 Correct 8 ms 35932 KB Output is correct
3 Correct 2 ms 5212 KB Output is correct
4 Correct 1 ms 5212 KB Output is correct
5 Correct 5 ms 5724 KB Output is correct
6 Correct 57 ms 36160 KB Output is correct
7 Correct 49 ms 35932 KB Output is correct
8 Correct 47 ms 35928 KB Output is correct
9 Correct 46 ms 35928 KB Output is correct
10 Correct 49 ms 35928 KB Output is correct
11 Correct 46 ms 35928 KB Output is correct
12 Correct 69 ms 36184 KB Output is correct
13 Correct 2317 ms 36648 KB Output is correct
14 Correct 2366 ms 37032 KB Output is correct
15 Correct 2310 ms 36864 KB Output is correct
16 Execution timed out 5056 ms 42492 KB Time limit exceeded
17 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 5224 KB Output is correct
2 Correct 1 ms 5212 KB Output is correct
3 Correct 1 ms 5228 KB Output is correct
4 Correct 9 ms 6524 KB Output is correct
5 Correct 14 ms 7772 KB Output is correct
6 Correct 2 ms 5212 KB Output is correct
7 Correct 2 ms 5212 KB Output is correct
8 Correct 2 ms 5212 KB Output is correct
9 Correct 22 ms 9556 KB Output is correct
10 Correct 60 ms 10332 KB Output is correct
11 Correct 4 ms 5724 KB Output is correct
12 Correct 17 ms 8028 KB Output is correct
13 Correct 34 ms 11600 KB Output is correct
14 Correct 43 ms 11940 KB Output is correct
15 Correct 34 ms 11604 KB Output is correct
16 Correct 49 ms 13656 KB Output is correct
17 Correct 2253 ms 12112 KB Output is correct
18 Correct 41 ms 13660 KB Output is correct
19 Correct 780 ms 12128 KB Output is correct
20 Correct 778 ms 12112 KB Output is correct
21 Correct 31 ms 11884 KB Output is correct
22 Correct 33 ms 12136 KB Output is correct
23 Correct 1 ms 5208 KB Output is correct
24 Correct 1 ms 5212 KB Output is correct
25 Correct 2 ms 5212 KB Output is correct
26 Correct 45 ms 36188 KB Output is correct
27 Correct 48 ms 36184 KB Output is correct
28 Correct 47 ms 36188 KB Output is correct
29 Correct 47 ms 36188 KB Output is correct
30 Correct 52 ms 36436 KB Output is correct
31 Correct 46 ms 36184 KB Output is correct
32 Correct 45 ms 36184 KB Output is correct
33 Correct 39 ms 36188 KB Output is correct
34 Correct 45 ms 35932 KB Output is correct
35 Correct 46 ms 36156 KB Output is correct
36 Correct 7 ms 35932 KB Output is correct
37 Correct 1 ms 5212 KB Output is correct
38 Correct 2 ms 5220 KB Output is correct
39 Correct 47 ms 36180 KB Output is correct
40 Correct 49 ms 36184 KB Output is correct
41 Correct 46 ms 35932 KB Output is correct
42 Correct 46 ms 36184 KB Output is correct
43 Correct 46 ms 36188 KB Output is correct
44 Correct 45 ms 36188 KB Output is correct
45 Correct 48 ms 35932 KB Output is correct
46 Correct 46 ms 35928 KB Output is correct
47 Correct 46 ms 36188 KB Output is correct
48 Correct 45 ms 36392 KB Output is correct
49 Correct 46 ms 36184 KB Output is correct
50 Correct 47 ms 35932 KB Output is correct
51 Correct 2 ms 5212 KB Output is correct
52 Correct 57 ms 36188 KB Output is correct
53 Correct 59 ms 36188 KB Output is correct
54 Correct 55 ms 36188 KB Output is correct
55 Correct 47 ms 36196 KB Output is correct
56 Correct 52 ms 36188 KB Output is correct
57 Correct 62 ms 36196 KB Output is correct
58 Correct 69 ms 36180 KB Output is correct
59 Correct 73 ms 36172 KB Output is correct
60 Correct 22 ms 9564 KB Output is correct
61 Correct 60 ms 10328 KB Output is correct
62 Correct 975 ms 37756 KB Output is correct
63 Correct 1120 ms 37716 KB Output is correct
64 Correct 747 ms 37804 KB Output is correct
65 Correct 67 ms 37644 KB Output is correct
66 Correct 122 ms 36444 KB Output is correct
67 Correct 167 ms 41676 KB Output is correct
68 Correct 152 ms 41820 KB Output is correct
69 Correct 48 ms 45516 KB Output is correct
70 Correct 50 ms 45392 KB Output is correct
71 Correct 192 ms 42004 KB Output is correct
72 Correct 183 ms 42060 KB Output is correct
73 Correct 46 ms 43108 KB Output is correct
74 Correct 46 ms 43100 KB Output is correct
75 Correct 612 ms 36956 KB Output is correct
76 Correct 93 ms 42588 KB Output is correct
77 Correct 1 ms 5208 KB Output is correct
78 Correct 8 ms 35932 KB Output is correct
79 Correct 2 ms 5212 KB Output is correct
80 Correct 1 ms 5212 KB Output is correct
81 Correct 5 ms 5724 KB Output is correct
82 Correct 57 ms 36160 KB Output is correct
83 Correct 49 ms 35932 KB Output is correct
84 Correct 47 ms 35928 KB Output is correct
85 Correct 46 ms 35928 KB Output is correct
86 Correct 49 ms 35928 KB Output is correct
87 Correct 46 ms 35928 KB Output is correct
88 Correct 69 ms 36184 KB Output is correct
89 Correct 2317 ms 36648 KB Output is correct
90 Correct 2366 ms 37032 KB Output is correct
91 Correct 2310 ms 36864 KB Output is correct
92 Execution timed out 5056 ms 42492 KB Time limit exceeded
93 Halted 0 ms 0 KB -