답안 #892101

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
892101 2023-12-24T22:15:24 Z CutSandstone Railway (BOI17_railway) C++17
100 / 100
79 ms 23836 KB
#include <bits/stdc++.h>
// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt,tune=native")
#define vi vector<int>
#define vb vector<bool>
#define vl vector<long long>
#define vii vector<vector<int>>
#define vll vector<vector<long long>>
#define pi pair<int, int>
#define pl pair<ll, ll>
#define vpi vector<pair<int, int>>
#define vpl vector<pair<ll, ll>>
#define a first
#define b second
#define str string
#define pb push_back
#define hset unordered_set
#define hmap unordered_map
const int mod = 1e9+7;
const int m = 998244353;
//16094558932
using namespace std;
using ll = long long;
using ull = unsigned ll;
template<size_t SZ> struct RMQ {
	static constexpr int level(int x) { return 31-__builtin_clz(x); }
	array<array<int,SZ>, level(SZ)+1> jmp;
	vi v;
	void init(const vi& depth, const vi& ind){
		v = depth;
		assert(ind.size() <= SZ);
		copy(begin(ind), end(ind), begin(jmp[0]));
		for (int j = 1; 1<<j <= ind.size(); ++j)
			for(int i = 0; i<ind.size()-(1<<j)+1; i++){
				int a = jmp[j-1][i], b = jmp[j-1][i+(1<<(j-1))];
				jmp[j][i] = depth[a] < depth[b] ? a:b;
			}
	}
	int query(int l, int r) {
		if(l > r) swap(l, r);
		int d = level(r-l+1);
		int a = jmp[d][l], b = jmp[d][r-(1<<d)+1];
		return v[a] < v[b] ? a:b;
	}
};
struct BIT {
	int N; vl data;
	void init(int sz){N = sz+1; data.resize(sz+1, 0); }
	void add(int p, ll x) { for (p++;p<=N;p+=p&-p) data[p-1] = (data[p-1]+x)%m; }
	ll sum(int l, int r) { return (sum(r)-(l==0?0:sum(l-1))+m)%m; }
	ll sum(int r) { ll s = 0; r++; for(;r;r-=r&-r)s = (s+data[r-1])%m; return s; }
	int lower_bound(ll sum) {
		if (sum <= 0) return -1;
		int pos = 0;
		for (int pw = 1<<25; pw; pw >>= 1) {
			int npos = pos+pw;
			if (npos <= N && data[npos-1] < sum)
				pos = npos, sum -= data[pos-1];
		}
		return pos;
	}
};
struct DSU {
	vector<int> e;
	DSU(int N) { e = vector<int>(N, -1); }
 
	// get representive component (uses path compression)
	int get(int x) { return e[x] < 0 ? x : e[x] = get(e[x]); }
 
	bool same_set(int a, int b) { return get(a) == get(b); }
 
	int size(int x) { return -e[get(x)]; }
 
	bool unite(int x, int y) {  // union by size
		x = get(x), y = get(y);
		if (x == y) return false;
		if (e[x] > e[y]) swap(x, y);
		e[x] += e[y];
		e[y] = x;
		return true;
	}
};
struct Hasher {
	vl h1, h2, p1, p2, v1, v2;
	const ll m1 = 1283, m2 = 2793;
	const ll i1 = 439594703, i2 = 7876835;
	Hasher(string s){
		int n = s.size();
		h1.resize(n);
		h2.resize(n);
		p1.resize(n);
		p2.resize(n);
		v1.resize(n);
		v2.resize(n);
		for(int i = 0; i<n; i++){
			p1[i] = (i?p1[i-1]:i1)*m1%mod;
			p2[i] = (i?p2[i-1]:i2)*m2%mod;
			v1[i] = (i?v1[i-1]:m1)*i1%mod;
			v2[i] = (i?v2[i-1]:m2)*i2%mod;
			h1[i] = ((i?h1[i-1]:0)+p1[i]*(s[i]-'a'+1)%mod)%mod;
			h2[i] = ((i?h2[i-1]:0)+p2[i]*(s[i]-'a'+1)%mod)%mod;
		}
	}
	pi get(int l, int r){
		ll a = (h1[r]-(l?h1[l-1]:0)+mod)%mod;
		ll b = (h2[r]-(l?h2[l-1]:0)+mod)%mod;
		return {(int)(a*v1[l]%mod), (int)(b*v2[l]%mod)};
	}
};
struct SegTree {
	vll mem;
	int n;
	public:
	SegTree(int N){
		n = N;
		mem.resize(n<<1, vl(4));
	}
	void set(int ind, ll val){
		for(mem[ind+=n] = {val,val,val,val}; ind>>=1;) mem[ind] = comb(mem[ind<<1], mem[ind<<1|1]);
	}
	ll get(int l, int r){
		vl L = {}, R = {};
		for(l+=n,r+=n+1;l<r;l>>=1,r>>=1){
			if(l&1) L = comb(L, mem[l++]);
			if(r&1) R = comb(mem[--r], R);
		}
		return comb(L, R)[0];
	}
	private:
	vl comb(vl& l, vl& r){
		if(l.size() == 0) return r;
		if(r.size() == 0) return l;
		return {max({l[0], r[0], l[2]+r[1]}),
				max({l[3]+r[1], l[1]}),
				max({r[3]+l[2], r[2]}),
				l[3]+r[3]
			};
	}
};
class LZST {
private:
    class Node {
    public:
        ll l, r;
        Node *left, *right;
        ll val = 0, max = 0, min = 0, add = 0;
        bool isSet = false;
        Node(ll a, ll b) : l(a), r(b), left(nullptr), right(nullptr) {}
        void set(ll num) {
            isSet = true;
            add = max = min = num;
            val = num * (r - l + 1);
        }
        void addF(ll num) {
            add += num;
            val += num * (r - l + 1);
            max += num;
            min += num;
        }
        void prop() {
            ll mid = (l + r) >> 1;
            if (left == nullptr) left = new Node(l, mid);
            if (right == nullptr) right = new Node(mid + 1, r);
            if (isSet) {
                isSet = false;
                if (l != r) {
                    left->set(add);
                    right->set(add);
                }
            } else if (add != 0) {
                if (l != r) {
                    left->addF(add);
                    right->addF(add);
                }
            }
            add = 0;
        }
        void upd() {
            val = left->val + right->val;
            min = std::min(left->min, right->min);
            max = std::max(left->max, right->max);
        }
    };
    Node* top;
    void set(ll s, ll e, ll num, Node* curr) {
        if (curr->l == s && curr->r == e) {
            curr->set(num);
            return;
        }
        curr->prop();
        if (e <= curr->left->r) set(s, e, num, curr->left);
        else if (s >= curr->right->l) set(s, e, num, curr->right);
        else {
            set(s, curr->left->r, num, curr->left);
            set(curr->right->l, e, num, curr->right);
        }
        curr->upd();
    }
    void add(ll s, ll e, ll num, Node* curr) {
        if (curr->l == s && curr->r == e) {
            curr->addF(num);
            return;
        }
        curr->prop();
        if (e <= curr->left->r) add(s, e, num, curr->left);
        else if (s >= curr->right->l) add(s, e, num, curr->right);
        else {
            add(s, curr->left->r, num, curr->left);
            add(curr->right->l, e, num, curr->right);
        }
        curr->upd();
    }
    ll sum(ll s, ll e, Node* curr) {
        if (curr->l == s && curr->r == e) return curr->val;
        curr->prop();
        if (e <= curr->left->r) return sum(s, e, curr->left);
        if (s >= curr->right->l) return sum(s, e, curr->right);
        return sum(s, curr->left->r, curr->left) + sum(curr->right->l, e, curr->right);
    }
    ll max(ll s, ll e, Node* curr) {
        if (curr->l == s && curr->r == e) return curr->max;
        curr->prop();
        if (e <= curr->left->r) return max(s, e, curr->left);
        if (s >= curr->right->l) return max(s, e, curr->right);
        return std::max(max(s, curr->left->r, curr->left), max(curr->right->l, e, curr->right));
    }
    ll min(ll s, ll e, Node* curr) {
        if (curr->l == s && curr->r == e) return curr->min;
        curr->prop();
        if (e <= curr->left->r) return min(s, e, curr->left);
        if (s >= curr->right->l) return min(s, e, curr->right);
        return std::min(min(s, curr->left->r, curr->left), min(curr->right->l, e, curr->right));
    }
public:
    LZST(ll N) {
        assert(N > 0);
        top = new Node(0, N - 1);
    }
    ll get(ll s) {
        assert(s >= top->l && s <= top->r);
        Node* curr = top;
        stack<Node*> stk;
        while (curr->l != curr->r) {
            stk.push(curr);
            curr->prop();
            if (s <= curr->left->r) curr = curr->left;
            else curr = curr->right;
        }
        while (!stk.empty()) stk.top()->upd(), stk.pop();
        return curr->val;
    }
    ll sum(ll s, ll e) {
        assert(s >= top->l && s <= top->r && e >= top->l && e <= top->r && s <= e);
        return sum(s, e, top);
    }
    ll max(ll s, ll e) {
        assert(s >= top->l && s <= top->r && e >= top->l && e <= top->r && s <= e);
        return max(s, e, top);
    }
    ll min(ll s, ll e) {
        assert(s >= top->l && s <= top->r && e >= top->l && e <= top->r && s <= e);
        return min(s, e, top);
    }
    void add(ll s, ll e, ll num) {
        assert(s >= top->l && s <= top->r && e >= top->l && e <= top->r && s <= e);
        add(s, e, num, top);
    }
    void add(ll s, ll num) {
        assert(s >= top->l && s <= top->r);
        add(s, s, num, top);
	}
    void set(ll s, ll e, ll num) {
        assert(s >= top->l && s <= top->r && e >= top->l && e <= top->r && s <= e);
        set(s, e, num, top);
    }
    void set(ll s, ll num) {
        assert(s >= top->l && s <= top->r);
        set(s, s, num, top);
    }
};
const string name = "";
const int MAXN = 1e5, LOGN = 18;
vi g[MAXN];
int jp[MAXN][LOGN], timer = 0, tour[MAXN];
int depth[MAXN], st[MAXN], en[MAXN], cnt[MAXN];
int jump(int a, int k){
	for(int i = 0; i<LOGN; i++) 
		if((k>>i)&1) a = jp[a][i];
	return a;
}
int lca(int a, int b){
	if(depth[a] > depth[b]) swap(a, b);
	b = jump(b, depth[b]-depth[a]);
	if(a == b) return a;
	for(int i = LOGN-1; i>=0; i--) if(jp[a][i] != jp[b][i]){
		a = jp[a][i];
		b = jp[b][i];
	}
	return jp[a][0];
}
void dfs1(int s, int p){
	if(p+1) depth[s] = depth[p]+1;
	jp[s][0] = p;
	tour[st[s] = timer++] = s;
	for(int i: g[s]) if(i != p)
		dfs1(i, s);
	en[s] = timer-1;
}
void dfs2(int s, int p){
	for(int i: g[s]) if(i != p)
		dfs2(i, s);
	if(p != -1) cnt[p]+=cnt[s];
}
int main() {
	ios::sync_with_stdio(false);
  	cin.tie(nullptr);
	if(filesystem::exists("input.in")) freopen("input.in", "r", stdin);
	else if(name.size() && filesystem::exists(name+".in")){
		freopen((name+".in").c_str(), "r", stdin);
		freopen((name+".out").c_str(), "w", stdout);
	}
	int n, m, k; cin >> n >> m >> k;
	vpi eg(n-1);
	for(int i = 0; i<n-1; i++){
		int a, b; cin >> a >> b;
		g[--a].pb(--b);
		g[b].pb(a);
		eg[i] = {a, b};
	}
	for(int i = 0; i<n; i++) for(int j = 0; j<LOGN; j++) jp[i][j] = -1;
	dfs1(0, -1);
	for(int i = 1; i<LOGN; i++) for(int j = 0; j<n; j++)
		if(jp[j][i-1] != -1) jp[j][i] = jp[jp[j][i-1]][i-1];
	while(m--){
		int total, top; cin >> total >> top;
		set<int> in;
		in.insert(st[--top]);
		while(--total){
			int s; cin >> s;
			int g = lca(--s, top);
			if(g == top){
				auto low = in.lower_bound(st[s]);
				auto high = low--;
				int end = -1;
				if(high != in.begin()) end = lca(s, tour[*low]);
				if(high != in.end()){
					int t = lca(s, tour[*high]);
					if(end == -1 || depth[t] > depth[end]) end = t;
				}
				cnt[s]++;
				cnt[end]--;
			}else{
				cnt[top]++;
				cnt[s]++;
				cnt[top = g]-=2;
			}
			in.insert(st[s]);
		}
	}
	dfs2(0, -1);
	vi edge(n);
	for(int i = 0; i<n-1; i++) if(depth[eg[i].a] > depth[eg[i].b])
		edge[eg[i].a] = i+1; else edge[eg[i].b] = i+1;
	vi ans;
	for(int i = 0; i<n; i++) if(cnt[i] >= k) ans.pb(edge[i]);
	sort(ans.begin(), ans.end());
	cout << ans.size() << "\n";
	for(int i: ans) cout << i << " ";
	cout << "\n";
}

Compilation message

railway.cpp: In function 'int main()':
railway.cpp:317:44: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  317 |  if(filesystem::exists("input.in")) freopen("input.in", "r", stdin);
      |                                     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
railway.cpp:319:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  319 |   freopen((name+".in").c_str(), "r", stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
railway.cpp:320:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  320 |   freopen((name+".out").c_str(), "w", stdout);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 5468 KB Output is correct
2 Correct 5 ms 8028 KB Output is correct
3 Correct 5 ms 8028 KB Output is correct
4 Correct 1 ms 5468 KB Output is correct
5 Correct 1 ms 5468 KB Output is correct
6 Correct 5 ms 8540 KB Output is correct
7 Correct 5 ms 8284 KB Output is correct
8 Correct 4 ms 8028 KB Output is correct
9 Correct 4 ms 8280 KB Output is correct
10 Correct 1 ms 5468 KB Output is correct
11 Correct 1 ms 5468 KB Output is correct
12 Correct 1 ms 5468 KB Output is correct
13 Correct 1 ms 5468 KB Output is correct
14 Correct 1 ms 5468 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 5468 KB Output is correct
2 Correct 5 ms 8028 KB Output is correct
3 Correct 5 ms 8028 KB Output is correct
4 Correct 1 ms 5468 KB Output is correct
5 Correct 1 ms 5468 KB Output is correct
6 Correct 5 ms 8540 KB Output is correct
7 Correct 5 ms 8284 KB Output is correct
8 Correct 4 ms 8028 KB Output is correct
9 Correct 4 ms 8280 KB Output is correct
10 Correct 1 ms 5468 KB Output is correct
11 Correct 1 ms 5468 KB Output is correct
12 Correct 1 ms 5468 KB Output is correct
13 Correct 1 ms 5468 KB Output is correct
14 Correct 1 ms 5468 KB Output is correct
15 Correct 27 ms 8540 KB Output is correct
16 Correct 28 ms 8540 KB Output is correct
17 Correct 28 ms 8540 KB Output is correct
18 Correct 5 ms 8280 KB Output is correct
19 Correct 5 ms 8284 KB Output is correct
20 Correct 21 ms 8688 KB Output is correct
21 Correct 25 ms 8504 KB Output is correct
22 Correct 2 ms 5724 KB Output is correct
23 Correct 5 ms 8144 KB Output is correct
24 Correct 6 ms 8028 KB Output is correct
25 Correct 1 ms 5556 KB Output is correct
26 Correct 2 ms 5468 KB Output is correct
27 Correct 6 ms 8536 KB Output is correct
28 Correct 5 ms 8284 KB Output is correct
29 Correct 4 ms 8028 KB Output is correct
30 Correct 4 ms 8028 KB Output is correct
31 Correct 2 ms 5468 KB Output is correct
32 Correct 1 ms 5468 KB Output is correct
33 Correct 1 ms 5464 KB Output is correct
34 Correct 1 ms 5468 KB Output is correct
35 Correct 1 ms 5468 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 56 ms 21452 KB Output is correct
2 Correct 1 ms 5468 KB Output is correct
3 Correct 53 ms 21292 KB Output is correct
4 Correct 54 ms 20656 KB Output is correct
5 Correct 65 ms 21708 KB Output is correct
6 Correct 71 ms 21708 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 50 ms 18292 KB Output is correct
2 Correct 46 ms 16208 KB Output is correct
3 Correct 47 ms 16208 KB Output is correct
4 Correct 50 ms 16096 KB Output is correct
5 Correct 46 ms 16208 KB Output is correct
6 Correct 61 ms 18556 KB Output is correct
7 Correct 45 ms 18516 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 50 ms 18292 KB Output is correct
2 Correct 46 ms 16208 KB Output is correct
3 Correct 47 ms 16208 KB Output is correct
4 Correct 50 ms 16096 KB Output is correct
5 Correct 46 ms 16208 KB Output is correct
6 Correct 61 ms 18556 KB Output is correct
7 Correct 45 ms 18516 KB Output is correct
8 Correct 59 ms 18624 KB Output is correct
9 Correct 79 ms 18704 KB Output is correct
10 Correct 66 ms 21716 KB Output is correct
11 Correct 64 ms 21828 KB Output is correct
12 Correct 49 ms 16468 KB Output is correct
13 Correct 62 ms 17788 KB Output is correct
14 Correct 66 ms 17852 KB Output is correct
15 Correct 66 ms 17764 KB Output is correct
16 Correct 46 ms 18004 KB Output is correct
17 Correct 47 ms 18004 KB Output is correct
18 Correct 46 ms 18000 KB Output is correct
19 Correct 48 ms 18004 KB Output is correct
20 Correct 50 ms 20456 KB Output is correct
21 Correct 48 ms 20692 KB Output is correct
22 Correct 49 ms 20540 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 5468 KB Output is correct
2 Correct 5 ms 8028 KB Output is correct
3 Correct 5 ms 8028 KB Output is correct
4 Correct 1 ms 5468 KB Output is correct
5 Correct 1 ms 5468 KB Output is correct
6 Correct 5 ms 8540 KB Output is correct
7 Correct 5 ms 8284 KB Output is correct
8 Correct 4 ms 8028 KB Output is correct
9 Correct 4 ms 8280 KB Output is correct
10 Correct 1 ms 5468 KB Output is correct
11 Correct 1 ms 5468 KB Output is correct
12 Correct 1 ms 5468 KB Output is correct
13 Correct 1 ms 5468 KB Output is correct
14 Correct 1 ms 5468 KB Output is correct
15 Correct 27 ms 8540 KB Output is correct
16 Correct 28 ms 8540 KB Output is correct
17 Correct 28 ms 8540 KB Output is correct
18 Correct 5 ms 8280 KB Output is correct
19 Correct 5 ms 8284 KB Output is correct
20 Correct 21 ms 8688 KB Output is correct
21 Correct 25 ms 8504 KB Output is correct
22 Correct 2 ms 5724 KB Output is correct
23 Correct 5 ms 8144 KB Output is correct
24 Correct 6 ms 8028 KB Output is correct
25 Correct 1 ms 5556 KB Output is correct
26 Correct 2 ms 5468 KB Output is correct
27 Correct 6 ms 8536 KB Output is correct
28 Correct 5 ms 8284 KB Output is correct
29 Correct 4 ms 8028 KB Output is correct
30 Correct 4 ms 8028 KB Output is correct
31 Correct 2 ms 5468 KB Output is correct
32 Correct 1 ms 5468 KB Output is correct
33 Correct 1 ms 5464 KB Output is correct
34 Correct 1 ms 5468 KB Output is correct
35 Correct 1 ms 5468 KB Output is correct
36 Correct 56 ms 21452 KB Output is correct
37 Correct 1 ms 5468 KB Output is correct
38 Correct 53 ms 21292 KB Output is correct
39 Correct 54 ms 20656 KB Output is correct
40 Correct 65 ms 21708 KB Output is correct
41 Correct 71 ms 21708 KB Output is correct
42 Correct 50 ms 18292 KB Output is correct
43 Correct 46 ms 16208 KB Output is correct
44 Correct 47 ms 16208 KB Output is correct
45 Correct 50 ms 16096 KB Output is correct
46 Correct 46 ms 16208 KB Output is correct
47 Correct 61 ms 18556 KB Output is correct
48 Correct 45 ms 18516 KB Output is correct
49 Correct 59 ms 18624 KB Output is correct
50 Correct 79 ms 18704 KB Output is correct
51 Correct 66 ms 21716 KB Output is correct
52 Correct 64 ms 21828 KB Output is correct
53 Correct 49 ms 16468 KB Output is correct
54 Correct 62 ms 17788 KB Output is correct
55 Correct 66 ms 17852 KB Output is correct
56 Correct 66 ms 17764 KB Output is correct
57 Correct 46 ms 18004 KB Output is correct
58 Correct 47 ms 18004 KB Output is correct
59 Correct 46 ms 18000 KB Output is correct
60 Correct 48 ms 18004 KB Output is correct
61 Correct 50 ms 20456 KB Output is correct
62 Correct 48 ms 20692 KB Output is correct
63 Correct 49 ms 20540 KB Output is correct
64 Correct 49 ms 20556 KB Output is correct
65 Correct 64 ms 17900 KB Output is correct
66 Correct 66 ms 17744 KB Output is correct
67 Correct 60 ms 17744 KB Output is correct
68 Correct 43 ms 17744 KB Output is correct
69 Correct 43 ms 17748 KB Output is correct
70 Correct 52 ms 20664 KB Output is correct
71 Correct 58 ms 20048 KB Output is correct
72 Correct 1 ms 5464 KB Output is correct
73 Correct 4 ms 8280 KB Output is correct
74 Correct 4 ms 8052 KB Output is correct
75 Correct 1 ms 5468 KB Output is correct
76 Correct 1 ms 5468 KB Output is correct
77 Correct 5 ms 8540 KB Output is correct
78 Correct 5 ms 8284 KB Output is correct
79 Correct 5 ms 8280 KB Output is correct
80 Correct 4 ms 8028 KB Output is correct
81 Correct 1 ms 5468 KB Output is correct
82 Correct 1 ms 5468 KB Output is correct
83 Correct 2 ms 5464 KB Output is correct
84 Correct 1 ms 5468 KB Output is correct
85 Correct 1 ms 5468 KB Output is correct
86 Correct 27 ms 8540 KB Output is correct
87 Correct 32 ms 8464 KB Output is correct
88 Correct 28 ms 8540 KB Output is correct
89 Correct 5 ms 8284 KB Output is correct
90 Correct 5 ms 8284 KB Output is correct
91 Correct 20 ms 8792 KB Output is correct
92 Correct 25 ms 8540 KB Output is correct
93 Correct 1 ms 5468 KB Output is correct
94 Correct 57 ms 23496 KB Output is correct
95 Correct 54 ms 22960 KB Output is correct
96 Correct 53 ms 22616 KB Output is correct
97 Correct 71 ms 23288 KB Output is correct
98 Correct 75 ms 23836 KB Output is correct
99 Correct 51 ms 18256 KB Output is correct
100 Correct 56 ms 17980 KB Output is correct
101 Correct 54 ms 17872 KB Output is correct
102 Correct 47 ms 18000 KB Output is correct
103 Correct 58 ms 20304 KB Output is correct
104 Correct 62 ms 20692 KB Output is correct
105 Correct 46 ms 20308 KB Output is correct
106 Correct 60 ms 20556 KB Output is correct
107 Correct 62 ms 20304 KB Output is correct
108 Correct 74 ms 23604 KB Output is correct
109 Correct 65 ms 23552 KB Output is correct
110 Correct 49 ms 17744 KB Output is correct
111 Correct 50 ms 17872 KB Output is correct
112 Correct 61 ms 17748 KB Output is correct
113 Correct 69 ms 17788 KB Output is correct