Submission #409527

# Submission time Handle Problem Language Result Execution time Memory
409527 2021-05-21T03:44:38 Z amunduzbaev Duathlon (APIO18_duathlon) C++14
100 / 100
219 ms 39472 KB
/* made by amunduzbaev */

//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#include "bits/stdc++.h"

using namespace std;
//using namespace __gnu_pbds;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define ub upper_bound
#define lb lower_bound
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(),x.rend()
#define NeedForSpeed ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define vv vector
#define tut(x) array<int, x> 
#define int long long

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii; 
typedef vector<int> vii;
typedef vector<pii> vpii;
template<class T> bool umin(T& a, const T& b) {return a > b? a = b, true:false;}
template<class T> bool umax(T& a, const T& b) {return a < b? a = b, true:false;}
void usaco(string s) { freopen((s+".in").c_str(),"r",stdin);  
  freopen((s+".out").c_str(),"w",stdout); NeedForSpeed }
//template<class T> using oset = tree<T, 
//null_type, less_equal<T>, rb_tree_tag, 
//tree_order_statistics_node_update> ordered_set;

const int MAXN = 2e5+5;

class Articulation {
  public:
    std::vector<int> keyV, bcc[MAXN];
    int cnt;
    int gao(int n, const std::vector<int> e[]) {
      memset(tag, use = 0, sizeof(tag[0]) * n);
      memset(low, cnt = 0, sizeof(low[0]) * n);
      std::fill_n(bcc, n, keyV = std::vector<int>());
      for (int i = 0; i < n; ++i) if (!tag[i]) dfs(i, 1, e);
      return cnt;
    }
  private:
    int tag[MAXN], low[MAXN], dot[MAXN], use;
    void dfs(int x, int dep, const std::vector<int> e[]) {
      int src = 0, out = 1 < dep; dot[use++] = x;
      tag[x] = low[x] = dep;
      for (auto &y: e[x]) {
        if (!tag[y]) {
          dfs(y, dep + 1, e);
          low[x] = std::min(low[x], low[y]);
          if (low[y] >= tag[x]) {
            if (++out == 2) keyV.push_back(x);
            while (dot[--use] != y) bcc[dot[use]].push_back(cnt);
            bcc[x].push_back(cnt); bcc[y].push_back(cnt++);
          }
        } else if (tag[y] != tag[x] - 1 || src++) {
          low[x] = std::min(low[x], tag[y]);
        }
      }
    }
} bcc;

const int N = 2e5+5;
const int mod = 1e9+7;
const ll inf = 1e18;
const ld Pi = acos(-1);

#define MULTI 0
int n, m, k, s, t, q, ans, res, a[N];
int used[N], sub[N], sz[N];
vii edges[N];

void dfs(int u, int p = -1){
	used[u] = 1, sub[u] = (u < n);
	for(auto x : edges[u])
		if(!used[x]) dfs(x, u), sub[u] += sub[x];
} 

int take_2(int x){
	if(x < 2) return 0;
	return x * (x - 1);
}

int take_3(int x){
	return take_2(x) * (x - 2);
}

void ddfs(int u, int p, int rr){
	if(u < n){
		for(auto x : edges[u]){
			if(x == p) res -= (sz[x] - 1) * take_2(sub[u]);
			else res -= (sz[x] - 1) * take_2(sub[rr] - sub[x]), ddfs(x, u, rr);
		}
	} else for(auto x : edges[u]) if(x != p) ddfs(x, u, rr);
}


/*

4 3
1 2
2 3
3 4

4 4
1 2
2 3
3 4
2 4

*/

void solve(int t_case){
	cin>>n>>m;
	for(int i=0;i<m;i++){
		int a, b; cin>>a>>b, a--, b--;
		edges[a].pb(b), edges[b].pb(a);
	} m = bcc.gao(n, edges);
	for(int i=0;i<n;i++){
		edges[i].clear();
		for(auto x : bcc.bcc[i]) edges[i].pb(x + n), edges[x + n].pb(i), sz[x + n]++;
	} vii tt;
	
	for(int i=n;i<n+m;i++){
		if(used[i]) continue;
		dfs(i), tt.pb(i), res += take_3(sub[i]);
	} memset(used, 0, sizeof used);
	
	for(auto rr : tt){
		ddfs(rr, -1, rr);
	} cout<<res<<"\n";
}

signed main(){
	NeedForSpeed
	if(MULTI){
		int t; cin>>t;
		for(int t_case = 1; t_case <= t; t_case++) solve(t_case);
	} else solve(1);
	return 0;
}

Compilation message

count_triplets.cpp: In function 'void usaco(std::string)':
count_triplets.cpp:31:31: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   31 | void usaco(string s) { freopen((s+".in").c_str(),"r",stdin);
      |                        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
count_triplets.cpp:32:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   32 |   freopen((s+".out").c_str(),"w",stdout); NeedForSpeed }
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 7 ms 11240 KB Output is correct
2 Correct 6 ms 11232 KB Output is correct
3 Correct 6 ms 11212 KB Output is correct
4 Correct 6 ms 11212 KB Output is correct
5 Correct 6 ms 11228 KB Output is correct
6 Correct 6 ms 11212 KB Output is correct
7 Correct 8 ms 11212 KB Output is correct
8 Correct 7 ms 11212 KB Output is correct
9 Correct 7 ms 11256 KB Output is correct
10 Correct 7 ms 11212 KB Output is correct
11 Correct 6 ms 11212 KB Output is correct
12 Correct 7 ms 11264 KB Output is correct
13 Correct 6 ms 11260 KB Output is correct
14 Correct 7 ms 11268 KB Output is correct
15 Correct 6 ms 11212 KB Output is correct
16 Correct 7 ms 11204 KB Output is correct
17 Correct 7 ms 11260 KB Output is correct
18 Correct 7 ms 11260 KB Output is correct
19 Correct 7 ms 11212 KB Output is correct
20 Correct 6 ms 11204 KB Output is correct
21 Correct 6 ms 11212 KB Output is correct
22 Correct 7 ms 11212 KB Output is correct
23 Correct 7 ms 11212 KB Output is correct
24 Correct 7 ms 11212 KB Output is correct
25 Correct 7 ms 11252 KB Output is correct
26 Correct 7 ms 11256 KB Output is correct
27 Correct 7 ms 11212 KB Output is correct
28 Correct 7 ms 11212 KB Output is correct
29 Correct 8 ms 11212 KB Output is correct
30 Correct 7 ms 11260 KB Output is correct
31 Correct 6 ms 11260 KB Output is correct
32 Correct 6 ms 11212 KB Output is correct
33 Correct 6 ms 11248 KB Output is correct
34 Correct 7 ms 11212 KB Output is correct
35 Correct 7 ms 11212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 11240 KB Output is correct
2 Correct 6 ms 11232 KB Output is correct
3 Correct 6 ms 11212 KB Output is correct
4 Correct 6 ms 11212 KB Output is correct
5 Correct 6 ms 11228 KB Output is correct
6 Correct 6 ms 11212 KB Output is correct
7 Correct 8 ms 11212 KB Output is correct
8 Correct 7 ms 11212 KB Output is correct
9 Correct 7 ms 11256 KB Output is correct
10 Correct 7 ms 11212 KB Output is correct
11 Correct 6 ms 11212 KB Output is correct
12 Correct 7 ms 11264 KB Output is correct
13 Correct 6 ms 11260 KB Output is correct
14 Correct 7 ms 11268 KB Output is correct
15 Correct 6 ms 11212 KB Output is correct
16 Correct 7 ms 11204 KB Output is correct
17 Correct 7 ms 11260 KB Output is correct
18 Correct 7 ms 11260 KB Output is correct
19 Correct 7 ms 11212 KB Output is correct
20 Correct 6 ms 11204 KB Output is correct
21 Correct 6 ms 11212 KB Output is correct
22 Correct 7 ms 11212 KB Output is correct
23 Correct 7 ms 11212 KB Output is correct
24 Correct 7 ms 11212 KB Output is correct
25 Correct 7 ms 11252 KB Output is correct
26 Correct 7 ms 11256 KB Output is correct
27 Correct 7 ms 11212 KB Output is correct
28 Correct 7 ms 11212 KB Output is correct
29 Correct 8 ms 11212 KB Output is correct
30 Correct 7 ms 11260 KB Output is correct
31 Correct 6 ms 11260 KB Output is correct
32 Correct 6 ms 11212 KB Output is correct
33 Correct 6 ms 11248 KB Output is correct
34 Correct 7 ms 11212 KB Output is correct
35 Correct 7 ms 11212 KB Output is correct
36 Correct 6 ms 11212 KB Output is correct
37 Correct 6 ms 11212 KB Output is correct
38 Correct 7 ms 11252 KB Output is correct
39 Correct 7 ms 11264 KB Output is correct
40 Correct 7 ms 11320 KB Output is correct
41 Correct 8 ms 11212 KB Output is correct
42 Correct 7 ms 11204 KB Output is correct
43 Correct 8 ms 11256 KB Output is correct
44 Correct 7 ms 11212 KB Output is correct
45 Correct 7 ms 11212 KB Output is correct
46 Correct 6 ms 11272 KB Output is correct
47 Correct 6 ms 11240 KB Output is correct
48 Correct 6 ms 11212 KB Output is correct
49 Correct 7 ms 11256 KB Output is correct
50 Correct 6 ms 11212 KB Output is correct
51 Correct 7 ms 11212 KB Output is correct
52 Correct 7 ms 11212 KB Output is correct
53 Correct 7 ms 11256 KB Output is correct
54 Correct 7 ms 11212 KB Output is correct
55 Correct 7 ms 11264 KB Output is correct
56 Correct 7 ms 11232 KB Output is correct
57 Correct 7 ms 11256 KB Output is correct
58 Correct 7 ms 11212 KB Output is correct
59 Correct 6 ms 11256 KB Output is correct
60 Correct 7 ms 11212 KB Output is correct
61 Correct 7 ms 11212 KB Output is correct
62 Correct 7 ms 11288 KB Output is correct
63 Correct 7 ms 11212 KB Output is correct
64 Correct 7 ms 11260 KB Output is correct
65 Correct 6 ms 11212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 100 ms 32556 KB Output is correct
2 Correct 99 ms 32656 KB Output is correct
3 Correct 140 ms 29892 KB Output is correct
4 Correct 113 ms 31884 KB Output is correct
5 Correct 134 ms 28452 KB Output is correct
6 Correct 138 ms 31916 KB Output is correct
7 Correct 156 ms 27548 KB Output is correct
8 Correct 149 ms 29500 KB Output is correct
9 Correct 147 ms 26256 KB Output is correct
10 Correct 135 ms 26744 KB Output is correct
11 Correct 145 ms 24256 KB Output is correct
12 Correct 123 ms 24060 KB Output is correct
13 Correct 104 ms 23856 KB Output is correct
14 Correct 103 ms 23628 KB Output is correct
15 Correct 88 ms 22268 KB Output is correct
16 Correct 80 ms 22132 KB Output is correct
17 Correct 11 ms 14284 KB Output is correct
18 Correct 10 ms 14284 KB Output is correct
19 Correct 12 ms 14204 KB Output is correct
20 Correct 10 ms 14284 KB Output is correct
21 Correct 10 ms 14072 KB Output is correct
22 Correct 10 ms 14084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 11468 KB Output is correct
2 Correct 8 ms 11472 KB Output is correct
3 Correct 9 ms 11468 KB Output is correct
4 Correct 8 ms 11596 KB Output is correct
5 Correct 9 ms 11468 KB Output is correct
6 Correct 8 ms 11468 KB Output is correct
7 Correct 9 ms 11524 KB Output is correct
8 Correct 8 ms 11520 KB Output is correct
9 Correct 8 ms 11392 KB Output is correct
10 Correct 8 ms 11468 KB Output is correct
11 Correct 8 ms 11468 KB Output is correct
12 Correct 7 ms 11468 KB Output is correct
13 Correct 9 ms 11432 KB Output is correct
14 Correct 8 ms 11468 KB Output is correct
15 Correct 9 ms 11340 KB Output is correct
16 Correct 8 ms 11340 KB Output is correct
17 Correct 8 ms 11468 KB Output is correct
18 Correct 8 ms 11468 KB Output is correct
19 Correct 8 ms 11484 KB Output is correct
20 Correct 8 ms 11468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 174 ms 26108 KB Output is correct
2 Correct 169 ms 27384 KB Output is correct
3 Correct 178 ms 27484 KB Output is correct
4 Correct 200 ms 27344 KB Output is correct
5 Correct 191 ms 27400 KB Output is correct
6 Correct 209 ms 39472 KB Output is correct
7 Correct 197 ms 32056 KB Output is correct
8 Correct 216 ms 30740 KB Output is correct
9 Correct 199 ms 29724 KB Output is correct
10 Correct 197 ms 27440 KB Output is correct
11 Correct 177 ms 27452 KB Output is correct
12 Correct 186 ms 27380 KB Output is correct
13 Correct 180 ms 27388 KB Output is correct
14 Correct 175 ms 26664 KB Output is correct
15 Correct 146 ms 25644 KB Output is correct
16 Correct 100 ms 22352 KB Output is correct
17 Correct 116 ms 27388 KB Output is correct
18 Correct 108 ms 27380 KB Output is correct
19 Correct 124 ms 27404 KB Output is correct
20 Correct 123 ms 27360 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 11468 KB Output is correct
2 Correct 8 ms 11468 KB Output is correct
3 Correct 8 ms 11468 KB Output is correct
4 Correct 9 ms 11468 KB Output is correct
5 Correct 8 ms 11356 KB Output is correct
6 Correct 8 ms 11340 KB Output is correct
7 Correct 8 ms 11340 KB Output is correct
8 Correct 8 ms 11372 KB Output is correct
9 Correct 8 ms 11396 KB Output is correct
10 Correct 8 ms 11340 KB Output is correct
11 Correct 8 ms 11468 KB Output is correct
12 Correct 8 ms 11468 KB Output is correct
13 Correct 9 ms 11400 KB Output is correct
14 Correct 8 ms 11468 KB Output is correct
15 Correct 8 ms 11468 KB Output is correct
16 Correct 8 ms 11468 KB Output is correct
17 Correct 8 ms 11428 KB Output is correct
18 Correct 8 ms 11396 KB Output is correct
19 Correct 8 ms 11340 KB Output is correct
20 Correct 8 ms 11392 KB Output is correct
21 Correct 8 ms 11468 KB Output is correct
22 Correct 8 ms 11468 KB Output is correct
23 Correct 9 ms 11388 KB Output is correct
24 Correct 8 ms 11468 KB Output is correct
25 Correct 7 ms 11340 KB Output is correct
26 Correct 7 ms 11340 KB Output is correct
27 Correct 8 ms 11340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 174 ms 26108 KB Output is correct
2 Correct 183 ms 27308 KB Output is correct
3 Correct 219 ms 27152 KB Output is correct
4 Correct 169 ms 26040 KB Output is correct
5 Correct 144 ms 24560 KB Output is correct
6 Correct 148 ms 23868 KB Output is correct
7 Correct 160 ms 23672 KB Output is correct
8 Correct 122 ms 23160 KB Output is correct
9 Correct 118 ms 23180 KB Output is correct
10 Correct 126 ms 23004 KB Output is correct
11 Correct 109 ms 22844 KB Output is correct
12 Correct 102 ms 22724 KB Output is correct
13 Correct 106 ms 22852 KB Output is correct
14 Correct 99 ms 25496 KB Output is correct
15 Correct 216 ms 32052 KB Output is correct
16 Correct 197 ms 30480 KB Output is correct
17 Correct 191 ms 31024 KB Output is correct
18 Correct 189 ms 29404 KB Output is correct
19 Correct 165 ms 26120 KB Output is correct
20 Correct 171 ms 26040 KB Output is correct
21 Correct 163 ms 26108 KB Output is correct
22 Correct 176 ms 25328 KB Output is correct
23 Correct 129 ms 24484 KB Output is correct
24 Correct 164 ms 27112 KB Output is correct
25 Correct 169 ms 27132 KB Output is correct
26 Correct 171 ms 26400 KB Output is correct
27 Correct 166 ms 26392 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 11240 KB Output is correct
2 Correct 6 ms 11232 KB Output is correct
3 Correct 6 ms 11212 KB Output is correct
4 Correct 6 ms 11212 KB Output is correct
5 Correct 6 ms 11228 KB Output is correct
6 Correct 6 ms 11212 KB Output is correct
7 Correct 8 ms 11212 KB Output is correct
8 Correct 7 ms 11212 KB Output is correct
9 Correct 7 ms 11256 KB Output is correct
10 Correct 7 ms 11212 KB Output is correct
11 Correct 6 ms 11212 KB Output is correct
12 Correct 7 ms 11264 KB Output is correct
13 Correct 6 ms 11260 KB Output is correct
14 Correct 7 ms 11268 KB Output is correct
15 Correct 6 ms 11212 KB Output is correct
16 Correct 7 ms 11204 KB Output is correct
17 Correct 7 ms 11260 KB Output is correct
18 Correct 7 ms 11260 KB Output is correct
19 Correct 7 ms 11212 KB Output is correct
20 Correct 6 ms 11204 KB Output is correct
21 Correct 6 ms 11212 KB Output is correct
22 Correct 7 ms 11212 KB Output is correct
23 Correct 7 ms 11212 KB Output is correct
24 Correct 7 ms 11212 KB Output is correct
25 Correct 7 ms 11252 KB Output is correct
26 Correct 7 ms 11256 KB Output is correct
27 Correct 7 ms 11212 KB Output is correct
28 Correct 7 ms 11212 KB Output is correct
29 Correct 8 ms 11212 KB Output is correct
30 Correct 7 ms 11260 KB Output is correct
31 Correct 6 ms 11260 KB Output is correct
32 Correct 6 ms 11212 KB Output is correct
33 Correct 6 ms 11248 KB Output is correct
34 Correct 7 ms 11212 KB Output is correct
35 Correct 7 ms 11212 KB Output is correct
36 Correct 6 ms 11212 KB Output is correct
37 Correct 6 ms 11212 KB Output is correct
38 Correct 7 ms 11252 KB Output is correct
39 Correct 7 ms 11264 KB Output is correct
40 Correct 7 ms 11320 KB Output is correct
41 Correct 8 ms 11212 KB Output is correct
42 Correct 7 ms 11204 KB Output is correct
43 Correct 8 ms 11256 KB Output is correct
44 Correct 7 ms 11212 KB Output is correct
45 Correct 7 ms 11212 KB Output is correct
46 Correct 6 ms 11272 KB Output is correct
47 Correct 6 ms 11240 KB Output is correct
48 Correct 6 ms 11212 KB Output is correct
49 Correct 7 ms 11256 KB Output is correct
50 Correct 6 ms 11212 KB Output is correct
51 Correct 7 ms 11212 KB Output is correct
52 Correct 7 ms 11212 KB Output is correct
53 Correct 7 ms 11256 KB Output is correct
54 Correct 7 ms 11212 KB Output is correct
55 Correct 7 ms 11264 KB Output is correct
56 Correct 7 ms 11232 KB Output is correct
57 Correct 7 ms 11256 KB Output is correct
58 Correct 7 ms 11212 KB Output is correct
59 Correct 6 ms 11256 KB Output is correct
60 Correct 7 ms 11212 KB Output is correct
61 Correct 7 ms 11212 KB Output is correct
62 Correct 7 ms 11288 KB Output is correct
63 Correct 7 ms 11212 KB Output is correct
64 Correct 7 ms 11260 KB Output is correct
65 Correct 6 ms 11212 KB Output is correct
66 Correct 7 ms 11340 KB Output is correct
67 Correct 7 ms 11340 KB Output is correct
68 Correct 7 ms 11376 KB Output is correct
69 Correct 8 ms 11456 KB Output is correct
70 Correct 8 ms 11532 KB Output is correct
71 Correct 8 ms 11424 KB Output is correct
72 Correct 8 ms 11340 KB Output is correct
73 Correct 9 ms 11340 KB Output is correct
74 Correct 8 ms 11356 KB Output is correct
75 Correct 8 ms 11400 KB Output is correct
76 Correct 7 ms 11268 KB Output is correct
77 Correct 8 ms 11396 KB Output is correct
78 Correct 8 ms 11392 KB Output is correct
79 Correct 7 ms 11340 KB Output is correct
80 Correct 8 ms 11340 KB Output is correct
81 Correct 8 ms 11340 KB Output is correct
82 Correct 8 ms 11468 KB Output is correct
83 Correct 8 ms 11468 KB Output is correct
84 Correct 8 ms 11468 KB Output is correct
85 Correct 8 ms 11468 KB Output is correct
86 Correct 9 ms 11368 KB Output is correct
87 Correct 8 ms 11340 KB Output is correct
88 Correct 8 ms 11432 KB Output is correct
89 Correct 8 ms 11340 KB Output is correct
90 Correct 8 ms 11400 KB Output is correct
91 Correct 8 ms 11468 KB Output is correct
92 Correct 8 ms 11392 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 11240 KB Output is correct
2 Correct 6 ms 11232 KB Output is correct
3 Correct 6 ms 11212 KB Output is correct
4 Correct 6 ms 11212 KB Output is correct
5 Correct 6 ms 11228 KB Output is correct
6 Correct 6 ms 11212 KB Output is correct
7 Correct 8 ms 11212 KB Output is correct
8 Correct 7 ms 11212 KB Output is correct
9 Correct 7 ms 11256 KB Output is correct
10 Correct 7 ms 11212 KB Output is correct
11 Correct 6 ms 11212 KB Output is correct
12 Correct 7 ms 11264 KB Output is correct
13 Correct 6 ms 11260 KB Output is correct
14 Correct 7 ms 11268 KB Output is correct
15 Correct 6 ms 11212 KB Output is correct
16 Correct 7 ms 11204 KB Output is correct
17 Correct 7 ms 11260 KB Output is correct
18 Correct 7 ms 11260 KB Output is correct
19 Correct 7 ms 11212 KB Output is correct
20 Correct 6 ms 11204 KB Output is correct
21 Correct 6 ms 11212 KB Output is correct
22 Correct 7 ms 11212 KB Output is correct
23 Correct 7 ms 11212 KB Output is correct
24 Correct 7 ms 11212 KB Output is correct
25 Correct 7 ms 11252 KB Output is correct
26 Correct 7 ms 11256 KB Output is correct
27 Correct 7 ms 11212 KB Output is correct
28 Correct 7 ms 11212 KB Output is correct
29 Correct 8 ms 11212 KB Output is correct
30 Correct 7 ms 11260 KB Output is correct
31 Correct 6 ms 11260 KB Output is correct
32 Correct 6 ms 11212 KB Output is correct
33 Correct 6 ms 11248 KB Output is correct
34 Correct 7 ms 11212 KB Output is correct
35 Correct 7 ms 11212 KB Output is correct
36 Correct 6 ms 11212 KB Output is correct
37 Correct 6 ms 11212 KB Output is correct
38 Correct 7 ms 11252 KB Output is correct
39 Correct 7 ms 11264 KB Output is correct
40 Correct 7 ms 11320 KB Output is correct
41 Correct 8 ms 11212 KB Output is correct
42 Correct 7 ms 11204 KB Output is correct
43 Correct 8 ms 11256 KB Output is correct
44 Correct 7 ms 11212 KB Output is correct
45 Correct 7 ms 11212 KB Output is correct
46 Correct 6 ms 11272 KB Output is correct
47 Correct 6 ms 11240 KB Output is correct
48 Correct 6 ms 11212 KB Output is correct
49 Correct 7 ms 11256 KB Output is correct
50 Correct 6 ms 11212 KB Output is correct
51 Correct 7 ms 11212 KB Output is correct
52 Correct 7 ms 11212 KB Output is correct
53 Correct 7 ms 11256 KB Output is correct
54 Correct 7 ms 11212 KB Output is correct
55 Correct 7 ms 11264 KB Output is correct
56 Correct 7 ms 11232 KB Output is correct
57 Correct 7 ms 11256 KB Output is correct
58 Correct 7 ms 11212 KB Output is correct
59 Correct 6 ms 11256 KB Output is correct
60 Correct 7 ms 11212 KB Output is correct
61 Correct 7 ms 11212 KB Output is correct
62 Correct 7 ms 11288 KB Output is correct
63 Correct 7 ms 11212 KB Output is correct
64 Correct 7 ms 11260 KB Output is correct
65 Correct 6 ms 11212 KB Output is correct
66 Correct 100 ms 32556 KB Output is correct
67 Correct 99 ms 32656 KB Output is correct
68 Correct 140 ms 29892 KB Output is correct
69 Correct 113 ms 31884 KB Output is correct
70 Correct 134 ms 28452 KB Output is correct
71 Correct 138 ms 31916 KB Output is correct
72 Correct 156 ms 27548 KB Output is correct
73 Correct 149 ms 29500 KB Output is correct
74 Correct 147 ms 26256 KB Output is correct
75 Correct 135 ms 26744 KB Output is correct
76 Correct 145 ms 24256 KB Output is correct
77 Correct 123 ms 24060 KB Output is correct
78 Correct 104 ms 23856 KB Output is correct
79 Correct 103 ms 23628 KB Output is correct
80 Correct 88 ms 22268 KB Output is correct
81 Correct 80 ms 22132 KB Output is correct
82 Correct 11 ms 14284 KB Output is correct
83 Correct 10 ms 14284 KB Output is correct
84 Correct 12 ms 14204 KB Output is correct
85 Correct 10 ms 14284 KB Output is correct
86 Correct 10 ms 14072 KB Output is correct
87 Correct 10 ms 14084 KB Output is correct
88 Correct 8 ms 11468 KB Output is correct
89 Correct 8 ms 11472 KB Output is correct
90 Correct 9 ms 11468 KB Output is correct
91 Correct 8 ms 11596 KB Output is correct
92 Correct 9 ms 11468 KB Output is correct
93 Correct 8 ms 11468 KB Output is correct
94 Correct 9 ms 11524 KB Output is correct
95 Correct 8 ms 11520 KB Output is correct
96 Correct 8 ms 11392 KB Output is correct
97 Correct 8 ms 11468 KB Output is correct
98 Correct 8 ms 11468 KB Output is correct
99 Correct 7 ms 11468 KB Output is correct
100 Correct 9 ms 11432 KB Output is correct
101 Correct 8 ms 11468 KB Output is correct
102 Correct 9 ms 11340 KB Output is correct
103 Correct 8 ms 11340 KB Output is correct
104 Correct 8 ms 11468 KB Output is correct
105 Correct 8 ms 11468 KB Output is correct
106 Correct 8 ms 11484 KB Output is correct
107 Correct 8 ms 11468 KB Output is correct
108 Correct 174 ms 26108 KB Output is correct
109 Correct 169 ms 27384 KB Output is correct
110 Correct 178 ms 27484 KB Output is correct
111 Correct 200 ms 27344 KB Output is correct
112 Correct 191 ms 27400 KB Output is correct
113 Correct 209 ms 39472 KB Output is correct
114 Correct 197 ms 32056 KB Output is correct
115 Correct 216 ms 30740 KB Output is correct
116 Correct 199 ms 29724 KB Output is correct
117 Correct 197 ms 27440 KB Output is correct
118 Correct 177 ms 27452 KB Output is correct
119 Correct 186 ms 27380 KB Output is correct
120 Correct 180 ms 27388 KB Output is correct
121 Correct 175 ms 26664 KB Output is correct
122 Correct 146 ms 25644 KB Output is correct
123 Correct 100 ms 22352 KB Output is correct
124 Correct 116 ms 27388 KB Output is correct
125 Correct 108 ms 27380 KB Output is correct
126 Correct 124 ms 27404 KB Output is correct
127 Correct 123 ms 27360 KB Output is correct
128 Correct 8 ms 11468 KB Output is correct
129 Correct 8 ms 11468 KB Output is correct
130 Correct 8 ms 11468 KB Output is correct
131 Correct 9 ms 11468 KB Output is correct
132 Correct 8 ms 11356 KB Output is correct
133 Correct 8 ms 11340 KB Output is correct
134 Correct 8 ms 11340 KB Output is correct
135 Correct 8 ms 11372 KB Output is correct
136 Correct 8 ms 11396 KB Output is correct
137 Correct 8 ms 11340 KB Output is correct
138 Correct 8 ms 11468 KB Output is correct
139 Correct 8 ms 11468 KB Output is correct
140 Correct 9 ms 11400 KB Output is correct
141 Correct 8 ms 11468 KB Output is correct
142 Correct 8 ms 11468 KB Output is correct
143 Correct 8 ms 11468 KB Output is correct
144 Correct 8 ms 11428 KB Output is correct
145 Correct 8 ms 11396 KB Output is correct
146 Correct 8 ms 11340 KB Output is correct
147 Correct 8 ms 11392 KB Output is correct
148 Correct 8 ms 11468 KB Output is correct
149 Correct 8 ms 11468 KB Output is correct
150 Correct 9 ms 11388 KB Output is correct
151 Correct 8 ms 11468 KB Output is correct
152 Correct 7 ms 11340 KB Output is correct
153 Correct 7 ms 11340 KB Output is correct
154 Correct 8 ms 11340 KB Output is correct
155 Correct 174 ms 26108 KB Output is correct
156 Correct 183 ms 27308 KB Output is correct
157 Correct 219 ms 27152 KB Output is correct
158 Correct 169 ms 26040 KB Output is correct
159 Correct 144 ms 24560 KB Output is correct
160 Correct 148 ms 23868 KB Output is correct
161 Correct 160 ms 23672 KB Output is correct
162 Correct 122 ms 23160 KB Output is correct
163 Correct 118 ms 23180 KB Output is correct
164 Correct 126 ms 23004 KB Output is correct
165 Correct 109 ms 22844 KB Output is correct
166 Correct 102 ms 22724 KB Output is correct
167 Correct 106 ms 22852 KB Output is correct
168 Correct 99 ms 25496 KB Output is correct
169 Correct 216 ms 32052 KB Output is correct
170 Correct 197 ms 30480 KB Output is correct
171 Correct 191 ms 31024 KB Output is correct
172 Correct 189 ms 29404 KB Output is correct
173 Correct 165 ms 26120 KB Output is correct
174 Correct 171 ms 26040 KB Output is correct
175 Correct 163 ms 26108 KB Output is correct
176 Correct 176 ms 25328 KB Output is correct
177 Correct 129 ms 24484 KB Output is correct
178 Correct 164 ms 27112 KB Output is correct
179 Correct 169 ms 27132 KB Output is correct
180 Correct 171 ms 26400 KB Output is correct
181 Correct 166 ms 26392 KB Output is correct
182 Correct 7 ms 11340 KB Output is correct
183 Correct 7 ms 11340 KB Output is correct
184 Correct 7 ms 11376 KB Output is correct
185 Correct 8 ms 11456 KB Output is correct
186 Correct 8 ms 11532 KB Output is correct
187 Correct 8 ms 11424 KB Output is correct
188 Correct 8 ms 11340 KB Output is correct
189 Correct 9 ms 11340 KB Output is correct
190 Correct 8 ms 11356 KB Output is correct
191 Correct 8 ms 11400 KB Output is correct
192 Correct 7 ms 11268 KB Output is correct
193 Correct 8 ms 11396 KB Output is correct
194 Correct 8 ms 11392 KB Output is correct
195 Correct 7 ms 11340 KB Output is correct
196 Correct 8 ms 11340 KB Output is correct
197 Correct 8 ms 11340 KB Output is correct
198 Correct 8 ms 11468 KB Output is correct
199 Correct 8 ms 11468 KB Output is correct
200 Correct 8 ms 11468 KB Output is correct
201 Correct 8 ms 11468 KB Output is correct
202 Correct 9 ms 11368 KB Output is correct
203 Correct 8 ms 11340 KB Output is correct
204 Correct 8 ms 11432 KB Output is correct
205 Correct 8 ms 11340 KB Output is correct
206 Correct 8 ms 11400 KB Output is correct
207 Correct 8 ms 11468 KB Output is correct
208 Correct 8 ms 11392 KB Output is correct
209 Correct 9 ms 13644 KB Output is correct
210 Correct 81 ms 21640 KB Output is correct
211 Correct 125 ms 26628 KB Output is correct
212 Correct 145 ms 30392 KB Output is correct
213 Correct 182 ms 33260 KB Output is correct
214 Correct 64 ms 24784 KB Output is correct
215 Correct 68 ms 24532 KB Output is correct
216 Correct 165 ms 27312 KB Output is correct
217 Correct 161 ms 25576 KB Output is correct
218 Correct 134 ms 23456 KB Output is correct
219 Correct 135 ms 22976 KB Output is correct
220 Correct 127 ms 22868 KB Output is correct
221 Correct 125 ms 22720 KB Output is correct
222 Correct 136 ms 24212 KB Output is correct
223 Correct 197 ms 28780 KB Output is correct
224 Correct 163 ms 27708 KB Output is correct
225 Correct 185 ms 25220 KB Output is correct
226 Correct 180 ms 25152 KB Output is correct
227 Correct 156 ms 25196 KB Output is correct
228 Correct 135 ms 24600 KB Output is correct
229 Correct 148 ms 23932 KB Output is correct
230 Correct 166 ms 25304 KB Output is correct
231 Correct 174 ms 25388 KB Output is correct