Submission #846567

# Submission time Handle Problem Language Result Execution time Memory
846567 2023-09-07T23:24:19 Z midi Dreaming (IOI13_dreaming) C++14
77 / 100
1000 ms 42676 KB
#include "dreaming.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define vc vector
typedef vc<ll> vcll;
#define pr pair
typedef pr<ll, ll> prll;

#define f0r(i,a,n) for (i=a; i<n; i++)
#define f1r(i,a,n) for (i=a; i<=n; i++)
#define r0f(i,n,a) for (i=n; i>a; i--)
#define r1f(i,n,a) for (i=n; i>=a; i--)

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define in(s, x) ((s).find((x)) != (s).end())
#define all(x) (x).begin(), (x).end()
#define allrev(x) (x).rbegin(), (x).rend()

inline void maxa(ll &a, ll b) { if (a<b) a=b; }
inline void mina(ll &a, ll b) { if (a>b) a=b; }

#define INF (LLONG_MAX>>2ll)
#define mxN 100'010ll

ll n, m, l;
int *uar, *var, *war;
vc<vc<prll>> gr(mxN); // fi is w, se is v
vcll ar;

inline void build_gr()
{
	ll i;
	f0r(i,0,m)
	{
		ll u, v, w;
		u=uar[i];
		v=var[i];
		w=war[i];

		gr[u].pb({w, v});
		gr[v].pb({w, u});
	}
}

vc<bool> seen(mxN, 0);
map<prll, ll> from_to; // the "to" gives the value

inline void init_umap()
{
	ll u;
	f0r(u,0,n)
	{
		from_to[mp(-1,u)]=-1;
		for (prll edge : gr[u])
		{
			ll v = edge.se;
			from_to[mp(u,v)]=-1;
			from_to[mp(v,u)]=-1;
		}
	}
}

vcll comp; // comp for component

void dfs(ll u)
{
	if (seen[u]) return;
	// printf("real, u: %lli\n", u);
	seen[u]=1;
	comp.pb(u);
	for (prll edge : gr[u])
	{
		ll v=edge.se;
		dfs(v);
	}
}

ll calc_from_to(ll p, ll u)
{
	ll &t = from_to[mp(p,u)];
	// if (t!=-1) printf("p: %lli, u: %lli, t: %lli\n", p, u, t);
	if (t!=-1) return t;

	ll m=0; // max
	for (prll edge : gr[u])
	{
		ll v=edge.se;
		if (v==p) continue;
		ll w=edge.fi;

		maxa(m, calc_from_to(u,v)+w);
	}

	// printf("res: %lli\n", m);
	return t=m;
}

inline ll minmaxdist(ll u)
{
	comp.clear();
	dfs(u);
	// printf("comp.size: %lli\n", (ll)comp.size());

	ll m=INF; // min
	for (ll u : comp)
	{
		mina(m, calc_from_to(-1, u));
		// printf("min: %lli\n", m);
	}
	// printf("true\n");

	return m;
}

inline void build_ar()
{
	init_umap();
	ll u;
	f0r(u,0,n)
	{
		if (seen[u]) continue;
		ar.pb(minmaxdist(u));
		// printf("ar.back(): %lli\n", ar.back());
	}
}

inline ll value()
{
	ll z=ar.size();
	ll m=-1; // max
	// printf("z: %lli\n", z);
	if (z==1) m = ar[0];
	else if (z==2) m = ar[0]+ar[1]+l;
	else m = max(ar[0]+ar[1]+l, ar[1]+ar[2]+(2*l));

	ll u;
	f0r(u,0,n) maxa(m, from_to[mp(-1, u)]);
	return m;
}

int travelTime(int N, int M, int L, int A[], int B[], int T[])
{
	n=N;
	m=M;
	l=L;
	uar=A;
	var=B;
	war=T;

	build_gr();
	build_ar();
	sort(allrev(ar));
	return value();
}

/*
int main()
{
	freopen("dreaming.in", "r", stdin);

	int N, M, L, *A, *B, *T;
	A=new int[mxN];
	B=new int[mxN];
	T=new int[mxN];
	cin >> N >> M >> L;
	ll i;
	f0r(i,0,M) cin >> A[i] >> B[i] >> T[i];

	int v = travelTime(N, M, L, A, B, T);

	printf("ans: %i\n", v);

	return 0;
}
*/
# Verdict Execution time Memory Grader output
1 Correct 339 ms 32196 KB Output is correct
2 Correct 312 ms 32972 KB Output is correct
3 Correct 172 ms 25256 KB Output is correct
4 Correct 26 ms 7256 KB Output is correct
5 Correct 20 ms 5896 KB Output is correct
6 Correct 44 ms 9680 KB Output is correct
7 Correct 2 ms 2908 KB Output is correct
8 Correct 97 ms 16080 KB Output is correct
9 Correct 131 ms 21200 KB Output is correct
10 Correct 2 ms 2904 KB Output is correct
11 Correct 214 ms 26056 KB Output is correct
12 Correct 304 ms 29720 KB Output is correct
13 Correct 2 ms 2904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2648 KB Output is correct
2 Correct 1 ms 2648 KB Output is correct
3 Correct 2 ms 2808 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2648 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2648 KB Output is correct
8 Correct 2 ms 2648 KB Output is correct
9 Correct 1 ms 2648 KB Output is correct
10 Correct 1 ms 2648 KB Output is correct
11 Correct 2 ms 2652 KB Output is correct
12 Correct 1 ms 2816 KB Output is correct
13 Correct 2 ms 2648 KB Output is correct
14 Correct 1 ms 2648 KB Output is correct
15 Correct 1 ms 2648 KB Output is correct
16 Correct 1 ms 2648 KB Output is correct
17 Correct 1 ms 2648 KB Output is correct
18 Correct 2 ms 2904 KB Output is correct
19 Correct 1 ms 2648 KB Output is correct
20 Correct 1 ms 2648 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 2 ms 2648 KB Output is correct
23 Correct 2 ms 2648 KB Output is correct
24 Correct 2 ms 2648 KB Output is correct
25 Correct 2 ms 2648 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 339 ms 32196 KB Output is correct
2 Correct 312 ms 32972 KB Output is correct
3 Correct 172 ms 25256 KB Output is correct
4 Correct 26 ms 7256 KB Output is correct
5 Correct 20 ms 5896 KB Output is correct
6 Correct 44 ms 9680 KB Output is correct
7 Correct 2 ms 2908 KB Output is correct
8 Correct 97 ms 16080 KB Output is correct
9 Correct 131 ms 21200 KB Output is correct
10 Correct 2 ms 2904 KB Output is correct
11 Correct 214 ms 26056 KB Output is correct
12 Correct 304 ms 29720 KB Output is correct
13 Correct 2 ms 2904 KB Output is correct
14 Correct 1 ms 2648 KB Output is correct
15 Correct 1 ms 2648 KB Output is correct
16 Correct 2 ms 2808 KB Output is correct
17 Correct 1 ms 2652 KB Output is correct
18 Correct 1 ms 2648 KB Output is correct
19 Correct 1 ms 2652 KB Output is correct
20 Correct 1 ms 2648 KB Output is correct
21 Correct 2 ms 2648 KB Output is correct
22 Correct 1 ms 2648 KB Output is correct
23 Correct 1 ms 2648 KB Output is correct
24 Correct 2 ms 2652 KB Output is correct
25 Correct 1 ms 2816 KB Output is correct
26 Correct 2 ms 2648 KB Output is correct
27 Correct 1 ms 2648 KB Output is correct
28 Correct 1 ms 2648 KB Output is correct
29 Correct 1 ms 2648 KB Output is correct
30 Correct 1 ms 2648 KB Output is correct
31 Correct 2 ms 2904 KB Output is correct
32 Correct 1 ms 2648 KB Output is correct
33 Correct 1 ms 2648 KB Output is correct
34 Correct 2 ms 2904 KB Output is correct
35 Correct 2 ms 2648 KB Output is correct
36 Correct 2 ms 2648 KB Output is correct
37 Correct 2 ms 2648 KB Output is correct
38 Correct 2 ms 2648 KB Output is correct
39 Correct 322 ms 33636 KB Output is correct
40 Correct 324 ms 32968 KB Output is correct
41 Correct 169 ms 25492 KB Output is correct
42 Correct 27 ms 7256 KB Output is correct
43 Correct 2 ms 2648 KB Output is correct
44 Correct 2 ms 2648 KB Output is correct
45 Correct 2 ms 2648 KB Output is correct
46 Correct 1 ms 2652 KB Output is correct
47 Correct 2 ms 2648 KB Output is correct
48 Correct 2 ms 2652 KB Output is correct
49 Correct 1 ms 2648 KB Output is correct
50 Correct 1 ms 2648 KB Output is correct
51 Correct 2 ms 2648 KB Output is correct
52 Correct 1 ms 2652 KB Output is correct
53 Correct 1 ms 2652 KB Output is correct
54 Correct 2 ms 2648 KB Output is correct
55 Correct 1 ms 2648 KB Output is correct
56 Correct 1 ms 2652 KB Output is correct
57 Correct 375 ms 31228 KB Output is correct
58 Correct 374 ms 30400 KB Output is correct
59 Correct 396 ms 30956 KB Output is correct
60 Correct 375 ms 30412 KB Output is correct
61 Correct 388 ms 31176 KB Output is correct
62 Correct 360 ms 30156 KB Output is correct
63 Correct 371 ms 30344 KB Output is correct
64 Correct 386 ms 30408 KB Output is correct
65 Correct 405 ms 30456 KB Output is correct
66 Correct 340 ms 30568 KB Output is correct
67 Correct 364 ms 30648 KB Output is correct
68 Correct 372 ms 30608 KB Output is correct
69 Correct 418 ms 30412 KB Output is correct
70 Correct 383 ms 30368 KB Output is correct
71 Correct 2 ms 2648 KB Output is correct
72 Correct 6 ms 3416 KB Output is correct
73 Correct 6 ms 3676 KB Output is correct
74 Correct 6 ms 3672 KB Output is correct
75 Correct 7 ms 3416 KB Output is correct
76 Correct 6 ms 3672 KB Output is correct
77 Correct 7 ms 3672 KB Output is correct
78 Correct 6 ms 3416 KB Output is correct
79 Correct 6 ms 3672 KB Output is correct
80 Correct 389 ms 30628 KB Output is correct
81 Correct 369 ms 30664 KB Output is correct
82 Correct 366 ms 30752 KB Output is correct
83 Correct 354 ms 30876 KB Output is correct
84 Correct 11 ms 3416 KB Output is correct
85 Correct 10 ms 3164 KB Output is correct
86 Correct 8 ms 3420 KB Output is correct
87 Correct 5 ms 3416 KB Output is correct
88 Correct 9 ms 3416 KB Output is correct
89 Correct 9 ms 3420 KB Output is correct
90 Correct 6 ms 3420 KB Output is correct
91 Correct 8 ms 3420 KB Output is correct
92 Correct 6 ms 3416 KB Output is correct
93 Correct 7 ms 3416 KB Output is correct
94 Correct 2 ms 2648 KB Output is correct
95 Correct 2 ms 2652 KB Output is correct
96 Correct 1 ms 2648 KB Output is correct
97 Correct 2 ms 2648 KB Output is correct
98 Correct 2 ms 2648 KB Output is correct
99 Correct 2 ms 2652 KB Output is correct
100 Correct 1 ms 2816 KB Output is correct
101 Correct 1 ms 2652 KB Output is correct
102 Correct 2 ms 2648 KB Output is correct
103 Correct 2 ms 2648 KB Output is correct
104 Correct 20 ms 5720 KB Output is correct
105 Correct 43 ms 9676 KB Output is correct
106 Correct 2 ms 2904 KB Output is correct
107 Correct 91 ms 16084 KB Output is correct
108 Correct 131 ms 21172 KB Output is correct
109 Correct 2 ms 2904 KB Output is correct
110 Correct 202 ms 26044 KB Output is correct
111 Correct 260 ms 29892 KB Output is correct
112 Correct 3 ms 2912 KB Output is correct
113 Correct 372 ms 42676 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 76 ms 15312 KB Output is correct
2 Correct 86 ms 15564 KB Output is correct
3 Correct 83 ms 15352 KB Output is correct
4 Correct 88 ms 15564 KB Output is correct
5 Correct 89 ms 15320 KB Output is correct
6 Correct 107 ms 16684 KB Output is correct
7 Correct 95 ms 16076 KB Output is correct
8 Correct 86 ms 15304 KB Output is correct
9 Correct 91 ms 15216 KB Output is correct
10 Correct 88 ms 15820 KB Output is correct
11 Correct 1 ms 2648 KB Output is correct
12 Correct 28 ms 10196 KB Output is correct
13 Correct 29 ms 10184 KB Output is correct
14 Correct 28 ms 10192 KB Output is correct
15 Correct 34 ms 10200 KB Output is correct
16 Correct 29 ms 10204 KB Output is correct
17 Correct 36 ms 10016 KB Output is correct
18 Correct 30 ms 10192 KB Output is correct
19 Correct 28 ms 10196 KB Output is correct
20 Correct 1 ms 2648 KB Output is correct
21 Correct 2 ms 2648 KB Output is correct
22 Correct 3 ms 3160 KB Output is correct
23 Correct 32 ms 10200 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2648 KB Output is correct
2 Correct 1 ms 2648 KB Output is correct
3 Correct 2 ms 2808 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2648 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2648 KB Output is correct
8 Correct 2 ms 2648 KB Output is correct
9 Correct 1 ms 2648 KB Output is correct
10 Correct 1 ms 2648 KB Output is correct
11 Correct 2 ms 2652 KB Output is correct
12 Correct 1 ms 2816 KB Output is correct
13 Correct 2 ms 2648 KB Output is correct
14 Correct 1 ms 2648 KB Output is correct
15 Correct 1 ms 2648 KB Output is correct
16 Correct 1 ms 2648 KB Output is correct
17 Correct 1 ms 2648 KB Output is correct
18 Correct 2 ms 2904 KB Output is correct
19 Correct 1 ms 2648 KB Output is correct
20 Correct 1 ms 2648 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 2 ms 2648 KB Output is correct
23 Correct 2 ms 2648 KB Output is correct
24 Correct 2 ms 2648 KB Output is correct
25 Correct 2 ms 2648 KB Output is correct
26 Correct 3 ms 2904 KB Output is correct
27 Correct 4 ms 3160 KB Output is correct
28 Correct 10 ms 3672 KB Output is correct
29 Correct 3 ms 2908 KB Output is correct
30 Correct 6 ms 3160 KB Output is correct
31 Correct 11 ms 3416 KB Output is correct
32 Correct 4 ms 2908 KB Output is correct
33 Correct 7 ms 3160 KB Output is correct
34 Correct 14 ms 3416 KB Output is correct
35 Correct 1 ms 2648 KB Output is correct
36 Correct 1 ms 2648 KB Output is correct
37 Correct 1 ms 2648 KB Output is correct
38 Correct 2 ms 2648 KB Output is correct
39 Correct 2 ms 2652 KB Output is correct
40 Correct 2 ms 2648 KB Output is correct
41 Correct 1 ms 2652 KB Output is correct
42 Correct 2 ms 2648 KB Output is correct
43 Correct 1 ms 2648 KB Output is correct
44 Correct 1 ms 2648 KB Output is correct
45 Correct 1 ms 2648 KB Output is correct
46 Correct 2 ms 2648 KB Output is correct
47 Correct 2 ms 2648 KB Output is correct
48 Correct 1 ms 2652 KB Output is correct
49 Correct 1 ms 2648 KB Output is correct
50 Correct 1 ms 2648 KB Output is correct
51 Correct 1 ms 2648 KB Output is correct
52 Correct 1 ms 2648 KB Output is correct
53 Correct 1 ms 2648 KB Output is correct
54 Correct 6 ms 3672 KB Output is correct
55 Correct 6 ms 3672 KB Output is correct
56 Correct 4 ms 3160 KB Output is correct
57 Correct 3 ms 3164 KB Output is correct
58 Correct 6 ms 3416 KB Output is correct
59 Correct 7 ms 3672 KB Output is correct
60 Correct 3 ms 3160 KB Output is correct
61 Correct 3 ms 3160 KB Output is correct
62 Correct 6 ms 3420 KB Output is correct
63 Correct 7 ms 3416 KB Output is correct
64 Correct 2 ms 2904 KB Output is correct
65 Correct 4 ms 3160 KB Output is correct
66 Correct 6 ms 3672 KB Output is correct
67 Correct 7 ms 3420 KB Output is correct
68 Correct 4 ms 3416 KB Output is correct
69 Correct 4 ms 3416 KB Output is correct
70 Correct 3 ms 3416 KB Output is correct
71 Correct 3 ms 3160 KB Output is correct
72 Correct 6 ms 3676 KB Output is correct
73 Correct 6 ms 3672 KB Output is correct
74 Correct 6 ms 3416 KB Output is correct
75 Correct 6 ms 3420 KB Output is correct
76 Correct 6 ms 3672 KB Output is correct
77 Correct 6 ms 3672 KB Output is correct
78 Correct 3 ms 3164 KB Output is correct
79 Correct 3 ms 3164 KB Output is correct
80 Correct 2 ms 2904 KB Output is correct
81 Correct 2 ms 2904 KB Output is correct
82 Correct 5 ms 3420 KB Output is correct
83 Correct 6 ms 3416 KB Output is correct
84 Correct 4 ms 3160 KB Output is correct
85 Correct 2 ms 2904 KB Output is correct
86 Correct 6 ms 3600 KB Output is correct
87 Correct 6 ms 3416 KB Output is correct
88 Correct 4 ms 3160 KB Output is correct
89 Correct 4 ms 3160 KB Output is correct
90 Correct 3 ms 3160 KB Output is correct
91 Correct 4 ms 3164 KB Output is correct
92 Correct 13 ms 3416 KB Output is correct
93 Correct 10 ms 3160 KB Output is correct
94 Correct 8 ms 3416 KB Output is correct
95 Correct 5 ms 3416 KB Output is correct
96 Correct 9 ms 3416 KB Output is correct
97 Correct 8 ms 3416 KB Output is correct
98 Correct 5 ms 3416 KB Output is correct
99 Correct 6 ms 3416 KB Output is correct
100 Correct 6 ms 3420 KB Output is correct
101 Correct 8 ms 3416 KB Output is correct
102 Correct 1 ms 2652 KB Output is correct
103 Correct 1 ms 2648 KB Output is correct
104 Correct 1 ms 2648 KB Output is correct
105 Correct 2 ms 2648 KB Output is correct
106 Correct 2 ms 2652 KB Output is correct
107 Correct 2 ms 2648 KB Output is correct
108 Correct 1 ms 2652 KB Output is correct
109 Correct 2 ms 2648 KB Output is correct
110 Correct 1 ms 2648 KB Output is correct
111 Correct 2 ms 2648 KB Output is correct
112 Correct 2 ms 2908 KB Output is correct
113 Correct 3 ms 2904 KB Output is correct
114 Correct 3 ms 2904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 339 ms 32196 KB Output is correct
2 Correct 312 ms 32972 KB Output is correct
3 Correct 172 ms 25256 KB Output is correct
4 Correct 26 ms 7256 KB Output is correct
5 Correct 20 ms 5896 KB Output is correct
6 Correct 44 ms 9680 KB Output is correct
7 Correct 2 ms 2908 KB Output is correct
8 Correct 97 ms 16080 KB Output is correct
9 Correct 131 ms 21200 KB Output is correct
10 Correct 2 ms 2904 KB Output is correct
11 Correct 214 ms 26056 KB Output is correct
12 Correct 304 ms 29720 KB Output is correct
13 Correct 2 ms 2904 KB Output is correct
14 Correct 1 ms 2648 KB Output is correct
15 Correct 1 ms 2648 KB Output is correct
16 Correct 2 ms 2808 KB Output is correct
17 Correct 1 ms 2652 KB Output is correct
18 Correct 1 ms 2648 KB Output is correct
19 Correct 1 ms 2652 KB Output is correct
20 Correct 1 ms 2648 KB Output is correct
21 Correct 2 ms 2648 KB Output is correct
22 Correct 1 ms 2648 KB Output is correct
23 Correct 1 ms 2648 KB Output is correct
24 Correct 2 ms 2652 KB Output is correct
25 Correct 1 ms 2816 KB Output is correct
26 Correct 2 ms 2648 KB Output is correct
27 Correct 1 ms 2648 KB Output is correct
28 Correct 1 ms 2648 KB Output is correct
29 Correct 1 ms 2648 KB Output is correct
30 Correct 1 ms 2648 KB Output is correct
31 Correct 2 ms 2904 KB Output is correct
32 Correct 1 ms 2648 KB Output is correct
33 Correct 1 ms 2648 KB Output is correct
34 Correct 2 ms 2904 KB Output is correct
35 Correct 2 ms 2648 KB Output is correct
36 Correct 2 ms 2648 KB Output is correct
37 Correct 2 ms 2648 KB Output is correct
38 Correct 2 ms 2648 KB Output is correct
39 Correct 322 ms 33636 KB Output is correct
40 Correct 324 ms 32968 KB Output is correct
41 Correct 169 ms 25492 KB Output is correct
42 Correct 27 ms 7256 KB Output is correct
43 Correct 2 ms 2648 KB Output is correct
44 Correct 2 ms 2648 KB Output is correct
45 Correct 2 ms 2648 KB Output is correct
46 Correct 1 ms 2652 KB Output is correct
47 Correct 2 ms 2648 KB Output is correct
48 Correct 2 ms 2652 KB Output is correct
49 Correct 1 ms 2648 KB Output is correct
50 Correct 1 ms 2648 KB Output is correct
51 Correct 2 ms 2648 KB Output is correct
52 Correct 1 ms 2652 KB Output is correct
53 Correct 1 ms 2652 KB Output is correct
54 Correct 2 ms 2648 KB Output is correct
55 Correct 1 ms 2648 KB Output is correct
56 Correct 1 ms 2652 KB Output is correct
57 Correct 375 ms 31228 KB Output is correct
58 Correct 374 ms 30400 KB Output is correct
59 Correct 396 ms 30956 KB Output is correct
60 Correct 375 ms 30412 KB Output is correct
61 Correct 388 ms 31176 KB Output is correct
62 Correct 360 ms 30156 KB Output is correct
63 Correct 371 ms 30344 KB Output is correct
64 Correct 386 ms 30408 KB Output is correct
65 Correct 405 ms 30456 KB Output is correct
66 Correct 340 ms 30568 KB Output is correct
67 Correct 364 ms 30648 KB Output is correct
68 Correct 372 ms 30608 KB Output is correct
69 Correct 418 ms 30412 KB Output is correct
70 Correct 383 ms 30368 KB Output is correct
71 Correct 2 ms 2648 KB Output is correct
72 Correct 6 ms 3416 KB Output is correct
73 Correct 6 ms 3676 KB Output is correct
74 Correct 6 ms 3672 KB Output is correct
75 Correct 7 ms 3416 KB Output is correct
76 Correct 6 ms 3672 KB Output is correct
77 Correct 7 ms 3672 KB Output is correct
78 Correct 6 ms 3416 KB Output is correct
79 Correct 6 ms 3672 KB Output is correct
80 Correct 389 ms 30628 KB Output is correct
81 Correct 369 ms 30664 KB Output is correct
82 Correct 366 ms 30752 KB Output is correct
83 Correct 354 ms 30876 KB Output is correct
84 Correct 11 ms 3416 KB Output is correct
85 Correct 10 ms 3164 KB Output is correct
86 Correct 8 ms 3420 KB Output is correct
87 Correct 5 ms 3416 KB Output is correct
88 Correct 9 ms 3416 KB Output is correct
89 Correct 9 ms 3420 KB Output is correct
90 Correct 6 ms 3420 KB Output is correct
91 Correct 8 ms 3420 KB Output is correct
92 Correct 6 ms 3416 KB Output is correct
93 Correct 7 ms 3416 KB Output is correct
94 Correct 2 ms 2648 KB Output is correct
95 Correct 2 ms 2652 KB Output is correct
96 Correct 1 ms 2648 KB Output is correct
97 Correct 2 ms 2648 KB Output is correct
98 Correct 2 ms 2648 KB Output is correct
99 Correct 2 ms 2652 KB Output is correct
100 Correct 1 ms 2816 KB Output is correct
101 Correct 1 ms 2652 KB Output is correct
102 Correct 2 ms 2648 KB Output is correct
103 Correct 2 ms 2648 KB Output is correct
104 Correct 20 ms 5720 KB Output is correct
105 Correct 43 ms 9676 KB Output is correct
106 Correct 2 ms 2904 KB Output is correct
107 Correct 91 ms 16084 KB Output is correct
108 Correct 131 ms 21172 KB Output is correct
109 Correct 2 ms 2904 KB Output is correct
110 Correct 202 ms 26044 KB Output is correct
111 Correct 260 ms 29892 KB Output is correct
112 Correct 3 ms 2912 KB Output is correct
113 Correct 372 ms 42676 KB Output is correct
114 Correct 76 ms 15312 KB Output is correct
115 Correct 86 ms 15564 KB Output is correct
116 Correct 83 ms 15352 KB Output is correct
117 Correct 88 ms 15564 KB Output is correct
118 Correct 89 ms 15320 KB Output is correct
119 Correct 107 ms 16684 KB Output is correct
120 Correct 95 ms 16076 KB Output is correct
121 Correct 86 ms 15304 KB Output is correct
122 Correct 91 ms 15216 KB Output is correct
123 Correct 88 ms 15820 KB Output is correct
124 Correct 1 ms 2648 KB Output is correct
125 Correct 28 ms 10196 KB Output is correct
126 Correct 29 ms 10184 KB Output is correct
127 Correct 28 ms 10192 KB Output is correct
128 Correct 34 ms 10200 KB Output is correct
129 Correct 29 ms 10204 KB Output is correct
130 Correct 36 ms 10016 KB Output is correct
131 Correct 30 ms 10192 KB Output is correct
132 Correct 28 ms 10196 KB Output is correct
133 Correct 1 ms 2648 KB Output is correct
134 Correct 2 ms 2648 KB Output is correct
135 Correct 3 ms 3160 KB Output is correct
136 Correct 32 ms 10200 KB Output is correct
137 Correct 3 ms 2904 KB Output is correct
138 Correct 4 ms 3160 KB Output is correct
139 Correct 10 ms 3672 KB Output is correct
140 Correct 3 ms 2908 KB Output is correct
141 Correct 6 ms 3160 KB Output is correct
142 Correct 11 ms 3416 KB Output is correct
143 Correct 4 ms 2908 KB Output is correct
144 Correct 7 ms 3160 KB Output is correct
145 Correct 14 ms 3416 KB Output is correct
146 Correct 1 ms 2648 KB Output is correct
147 Correct 1 ms 2648 KB Output is correct
148 Correct 1 ms 2648 KB Output is correct
149 Correct 2 ms 2648 KB Output is correct
150 Correct 2 ms 2652 KB Output is correct
151 Correct 2 ms 2648 KB Output is correct
152 Correct 1 ms 2652 KB Output is correct
153 Correct 2 ms 2648 KB Output is correct
154 Correct 1 ms 2648 KB Output is correct
155 Correct 1 ms 2648 KB Output is correct
156 Correct 1 ms 2648 KB Output is correct
157 Correct 2 ms 2648 KB Output is correct
158 Correct 2 ms 2648 KB Output is correct
159 Correct 1 ms 2652 KB Output is correct
160 Correct 1 ms 2648 KB Output is correct
161 Correct 1 ms 2648 KB Output is correct
162 Correct 1 ms 2648 KB Output is correct
163 Correct 1 ms 2648 KB Output is correct
164 Correct 1 ms 2648 KB Output is correct
165 Correct 6 ms 3672 KB Output is correct
166 Correct 6 ms 3672 KB Output is correct
167 Correct 4 ms 3160 KB Output is correct
168 Correct 3 ms 3164 KB Output is correct
169 Correct 6 ms 3416 KB Output is correct
170 Correct 7 ms 3672 KB Output is correct
171 Correct 3 ms 3160 KB Output is correct
172 Correct 3 ms 3160 KB Output is correct
173 Correct 6 ms 3420 KB Output is correct
174 Correct 7 ms 3416 KB Output is correct
175 Correct 2 ms 2904 KB Output is correct
176 Correct 4 ms 3160 KB Output is correct
177 Correct 6 ms 3672 KB Output is correct
178 Correct 7 ms 3420 KB Output is correct
179 Correct 4 ms 3416 KB Output is correct
180 Correct 4 ms 3416 KB Output is correct
181 Correct 3 ms 3416 KB Output is correct
182 Correct 3 ms 3160 KB Output is correct
183 Correct 6 ms 3676 KB Output is correct
184 Correct 6 ms 3672 KB Output is correct
185 Correct 6 ms 3416 KB Output is correct
186 Correct 6 ms 3420 KB Output is correct
187 Correct 6 ms 3672 KB Output is correct
188 Correct 6 ms 3672 KB Output is correct
189 Correct 3 ms 3164 KB Output is correct
190 Correct 3 ms 3164 KB Output is correct
191 Correct 2 ms 2904 KB Output is correct
192 Correct 2 ms 2904 KB Output is correct
193 Correct 5 ms 3420 KB Output is correct
194 Correct 6 ms 3416 KB Output is correct
195 Correct 4 ms 3160 KB Output is correct
196 Correct 2 ms 2904 KB Output is correct
197 Correct 6 ms 3600 KB Output is correct
198 Correct 6 ms 3416 KB Output is correct
199 Correct 4 ms 3160 KB Output is correct
200 Correct 4 ms 3160 KB Output is correct
201 Correct 3 ms 3160 KB Output is correct
202 Correct 4 ms 3164 KB Output is correct
203 Correct 13 ms 3416 KB Output is correct
204 Correct 10 ms 3160 KB Output is correct
205 Correct 8 ms 3416 KB Output is correct
206 Correct 5 ms 3416 KB Output is correct
207 Correct 9 ms 3416 KB Output is correct
208 Correct 8 ms 3416 KB Output is correct
209 Correct 5 ms 3416 KB Output is correct
210 Correct 6 ms 3416 KB Output is correct
211 Correct 6 ms 3420 KB Output is correct
212 Correct 8 ms 3416 KB Output is correct
213 Correct 1 ms 2652 KB Output is correct
214 Correct 1 ms 2648 KB Output is correct
215 Correct 1 ms 2648 KB Output is correct
216 Correct 2 ms 2648 KB Output is correct
217 Correct 2 ms 2652 KB Output is correct
218 Correct 2 ms 2648 KB Output is correct
219 Correct 1 ms 2652 KB Output is correct
220 Correct 2 ms 2648 KB Output is correct
221 Correct 1 ms 2648 KB Output is correct
222 Correct 2 ms 2648 KB Output is correct
223 Correct 2 ms 2908 KB Output is correct
224 Correct 3 ms 2904 KB Output is correct
225 Correct 3 ms 2904 KB Output is correct
226 Correct 3 ms 2904 KB Output is correct
227 Correct 5 ms 3160 KB Output is correct
228 Correct 8 ms 3416 KB Output is correct
229 Execution timed out 1049 ms 21328 KB Time limit exceeded
230 Halted 0 ms 0 KB -