Submission #403013

# Submission time Handle Problem Language Result Execution time Memory
403013 2021-05-12T16:23:30 Z PedroBigMan Dreaming (IOI13_dreaming) C++17
100 / 100
225 ms 47408 KB
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#pragma GCC optimize("Ofast")
#include "dreaming.h"
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <queue>
#include <deque>
#include <list>
#include <iomanip>
#include <stdlib.h>
#include <time.h>
using namespace std;
typedef int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define REP(i,a,b) for(ll i=a; i<b; i++)
#define pb push_back
#define mp make_pair
#define pl pair<ll,ll>
#define ff first
#define ss second
#define whole(x) x.begin(),x.end()
#define DEBUG(i) cout<<"Pedro Is The Master "<<i<<endl
#define INF 500000000

template<class A=ll> 
void Out(vector<A> a) {REP(i,0,a.size()) {cout<<a[i]<<" ";} cout<<endl;}

template<class A=ll>
void In(vector<A> &a, ll N) {A cur; REP(i,0,N) {cin>>cur; a.pb(cur);}}

class WTree
{
    public:
    ll N; 
    vector<ll> p; 
    vector<vector<pl> > sons;
    vector<vector<pl> > adj;
    ll root;
    vector<bool> visited;
    vector<vector<ll> > farthest_dir;
    vector<ll> farthest_down;
    vector<ll> farthest_up;
    vector<ll> farthest;
	vector<ll> dist;
	pair<ll,pl> diametre;
    
    WTree(vector<vector<pl> > ad, ll r=0LL)
    {
        N=ad.size(); root=r; adj=ad;
        vector<pl> xx; REP(i,0,N) {sons.pb(xx); p.pb(-1);}
		REP(i,0,N) {visited.pb(false);}
        DFS_Build(r,r); 
		vector<ll> xxx;
        REP(i,0,N) {farthest_up.pb(0); farthest_down.pb(0); farthest_dir.pb(xxx); farthest.pb(0);}
        REP(i,0,N) {REP(j,0,adj[i].size()) {farthest_dir[i].pb(0);}}
    }
	
	void Reset()
    {
        REP(i,0,N) {visited[i]=false;}
    }
    
    void DFS_Build(ll s, ll par)
    {
        p[s]=par;
		visited[s]=true;
        REP(i,0,adj[s].size())
        {
            if(adj[s][i].ff==par) {continue;}
            sons[s].pb(adj[s][i]);
            DFS_Build(adj[s][i].ff,s);
        }
        return;
    }
	
	void DFS_distance(ll s, ll las)
    {
        REP(i,0,adj[s].size()) 
        {
            if(adj[s][i].ff==las) {continue;}
            dist[adj[s][i].ff]=dist[s]+adj[s][i].ss;
            DFS_distance(adj[s][i].ff,s);
        }
    }
    
    void distance(ll s)
    {
        dist.clear(); REP(i,0,N) {dist.pb(INF);}
        dist[s]=0LL;
        DFS_distance(s,s);
    }
    
    void Calc_Diametre()
    {
        distance(root); 
        vector<ll>::iterator it=max_element(whole(dist));
        ll ind=it-dist.begin();
        distance(ind);
        diametre.ss.ff=ind;
        it=max_element(whole(dist));
        diametre.ss.ss=it-dist.begin();
        diametre.ff=*it;
    }
    
    void Calc_farthest_down(ll s)
    {
        REP(i,0,sons[s].size()) {Calc_farthest_down(sons[s][i].ff);}
        REP(i,0,adj[s].size()) 
        {
            if(adj[s][i].ff==p[s]) {continue;}
            farthest_dir[s][i]=farthest_down[adj[s][i].ff]+adj[s][i].ss;
            farthest_down[s]=max(farthest_down[s],farthest_dir[s][i]);
        }
    }
    
    void Calc_farthest_up(ll s)
    {
        if(s==root) {farthest_up[s]=0LL;}
        pl best_dis=mp(0,0);
        REP(i,0,adj[s].size()) 
        {
            if(farthest_dir[s][i]>best_dis.ff) {best_dis.ss=best_dis.ff; best_dis.ff=farthest_dir[s][i];}
            else if(farthest_dir[s][i]>best_dis.ss) {best_dis.ss=farthest_dir[s][i];}
        }
        REP(i,0,adj[s].size())
        {
            if(adj[s][i].ff==p[s]) {continue;}
            ll c = adj[s][i].ff;
            if(best_dis.ff == farthest_dir[s][i]) {farthest_up[c] = best_dis.ss+adj[s][i].ss;}
            else {farthest_up[c]=best_dis.ff+adj[s][i].ss;}
            REP(j,0,adj[c].size()) {if(adj[c][j].ff==s) {farthest_dir[c][j]=farthest_up[c];}}
        }
        REP(i,0,sons[s].size()) {Calc_farthest_up(sons[s][i].ff);}
    }
    
    void Calc_farthest()
    {
        Calc_farthest_down(root);
        Calc_farthest_up(root);
        REP(i,0,N) {farthest[i]=max(farthest_up[i],farthest_down[i]);}
    }
	
	pl Radius() //returns {centre, radius}
	{
		Calc_farthest();
		ll ind=0LL; ll val = farthest[0];
		REP(i,1,N) 
		{
			if(farthest[i]<val) {val=farthest[i]; ind=i;}
		}
		return (pl) {ind,val};
	}
   	
	
};
 
vector<ll> D,R;

class WG //everything works for weighted directed graphs except dynamic graph
{
    public:
    ll N; vector<vector<pl> > adj;
 	vector<bool> visited;
	vector<ll> current;
    
    WG(vector<vector<pl> > ad)
    {
        adj=ad; N=adj.size();
        REP(i,0,N) {visited.pb(false);}
    }
    
    void Reset()
    {
        REP(i,0,N) {visited[i]=false;}
    }
	
	void DFS(ll s) 
    {
        if(visited[s]) {return;}
        visited[s]=true;
        current.pb(s); //only needed for CC
        REP(i,0,adj[s].size())
        {
            if(!visited[adj[s][i].ff]) {DFS(adj[s][i].ff);}
        }
        return;
    }
	
	vector<vector<ll> > CC()
    {
        Reset();
        ll fi=0; ll missing=N; REP(i,0,N) {visited[i]=false;}
        vector<vector<ll> > ans;
        while(missing>0)
        {
            REP(i,fi,N) {if(!visited[i]) {fi=i; break;}}
            current.clear();
            DFS(fi);
            ans.pb(current);
            missing-=current.size();
        }
        return ans;
    }
	
	void CCG()
    {
        Reset();
        vector<vector<ll> > CC=(*this).CC();
		vector<ll> m; REP(i,0,N) {m.pb(-1);} vector<pl> xx; vector<vector<pl> > ad;
        REP(cc,0,CC.size()) 
        {
            m.clear(); 
            ad.clear(); 
            ll NN=CC[cc].size();
            REP(i,0,NN) {ad.pb(xx);}
            REP(i,0,NN) {m[CC[cc][i]]=i;}
            ll a,b;
            REP(i,0,NN)
            {
                a=CC[cc][i];
                REP(j,0,adj[a].size()) {b=adj[a][j].ff; ad[i].pb({m[b],adj[a][j].ss});}
            }
            WTree H(ad);
			H.Calc_Diametre(); D.pb(H.diametre.ff); R.pb(H.Radius().ss);
        }
        return ;
    }
};

int travelTime(int n, int m, int L, int A[], int B[], int T[]) 
{
    ll N = (ll) n; ll M = (ll) m; vector<pl> xx; vector<vector<pl> > adj; REP(i,0,N) {adj.pb(xx);}
	REP(i,0,M)
	{
		adj[A[i]].pb({B[i],T[i]}); adj[B[i]].pb({A[i],T[i]});
	}
	WG G(adj);
	G.CCG();
	ll ans = 0LL;
	REP(i,0,D.size()) {ans=max(ans,D[i]);}
	sort(whole(R)); reverse(whole(R));
	if(R.size()>=2) {ans=max(ans,L+R[0]+R[1]);}
	if(R.size()>=3) {ans=max((ll) ans,(ll) 2LL*L+R[1]+R[2]);}
	return ans;
}

Compilation message

dreaming.cpp:1: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
    1 | #pragma GCC optimization ("O3")
      | 
dreaming.cpp:2: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
    2 | #pragma GCC optimization ("unroll-loops")
      | 
dreaming.cpp: In constructor 'WTree::WTree(std::vector<std::vector<std::pair<int, int> > >, ll)':
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
   64 |         REP(i,0,N) {REP(j,0,adj[i].size()) {farthest_dir[i].pb(0);}}
      |                         ~~~~~~~~~~~~~~~~~
dreaming.cpp:64:21: note: in expansion of macro 'REP'
   64 |         REP(i,0,N) {REP(j,0,adj[i].size()) {farthest_dir[i].pb(0);}}
      |                     ^~~
dreaming.cpp: In member function 'void WTree::DFS_Build(ll, ll)':
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
   76 |         REP(i,0,adj[s].size())
      |             ~~~~~~~~~~~~~~~~~    
dreaming.cpp:76:9: note: in expansion of macro 'REP'
   76 |         REP(i,0,adj[s].size())
      |         ^~~
dreaming.cpp: In member function 'void WTree::DFS_distance(ll, ll)':
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
   87 |         REP(i,0,adj[s].size())
      |             ~~~~~~~~~~~~~~~~~    
dreaming.cpp:87:9: note: in expansion of macro 'REP'
   87 |         REP(i,0,adj[s].size())
      |         ^~~
dreaming.cpp: In member function 'void WTree::Calc_farthest_down(ll)':
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  116 |         REP(i,0,sons[s].size()) {Calc_farthest_down(sons[s][i].ff);}
      |             ~~~~~~~~~~~~~~~~~~   
dreaming.cpp:116:9: note: in expansion of macro 'REP'
  116 |         REP(i,0,sons[s].size()) {Calc_farthest_down(sons[s][i].ff);}
      |         ^~~
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  117 |         REP(i,0,adj[s].size())
      |             ~~~~~~~~~~~~~~~~~    
dreaming.cpp:117:9: note: in expansion of macro 'REP'
  117 |         REP(i,0,adj[s].size())
      |         ^~~
dreaming.cpp: In member function 'void WTree::Calc_farthest_up(ll)':
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  129 |         REP(i,0,adj[s].size())
      |             ~~~~~~~~~~~~~~~~~    
dreaming.cpp:129:9: note: in expansion of macro 'REP'
  129 |         REP(i,0,adj[s].size())
      |         ^~~
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  134 |         REP(i,0,adj[s].size())
      |             ~~~~~~~~~~~~~~~~~    
dreaming.cpp:134:9: note: in expansion of macro 'REP'
  134 |         REP(i,0,adj[s].size())
      |         ^~~
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  140 |             REP(j,0,adj[c].size()) {if(adj[c][j].ff==s) {farthest_dir[c][j]=farthest_up[c];}}
      |                 ~~~~~~~~~~~~~~~~~
dreaming.cpp:140:13: note: in expansion of macro 'REP'
  140 |             REP(j,0,adj[c].size()) {if(adj[c][j].ff==s) {farthest_dir[c][j]=farthest_up[c];}}
      |             ^~~
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  142 |         REP(i,0,sons[s].size()) {Calc_farthest_up(sons[s][i].ff);}
      |             ~~~~~~~~~~~~~~~~~~   
dreaming.cpp:142:9: note: in expansion of macro 'REP'
  142 |         REP(i,0,sons[s].size()) {Calc_farthest_up(sons[s][i].ff);}
      |         ^~~
dreaming.cpp: In member function 'void WG::DFS(ll)':
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  191 |         REP(i,0,adj[s].size())
      |             ~~~~~~~~~~~~~~~~~    
dreaming.cpp:191:9: note: in expansion of macro 'REP'
  191 |         REP(i,0,adj[s].size())
      |         ^~~
dreaming.cpp: In member function 'void WG::CCG()':
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  219 |         REP(cc,0,CC.size())
      |             ~~~~~~~~~~~~~~       
dreaming.cpp:219:9: note: in expansion of macro 'REP'
  219 |         REP(cc,0,CC.size())
      |         ^~~
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  230 |                 REP(j,0,adj[a].size()) {b=adj[a][j].ff; ad[i].pb({m[b],adj[a][j].ss});}
      |                     ~~~~~~~~~~~~~~~~~
dreaming.cpp:230:17: note: in expansion of macro 'REP'
  230 |                 REP(j,0,adj[a].size()) {b=adj[a][j].ff; ad[i].pb({m[b],adj[a][j].ss});}
      |                 ^~~
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:24:33: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | #define REP(i,a,b) for(ll i=a; i<b; i++)
......
  249 |  REP(i,0,D.size()) {ans=max(ans,D[i]);}
      |      ~~~~~~~~~~~~                
dreaming.cpp:249:2: note: in expansion of macro 'REP'
  249 |  REP(i,0,D.size()) {ans=max(ans,D[i]);}
      |  ^~~
# Verdict Execution time Memory Grader output
1 Correct 141 ms 42440 KB Output is correct
2 Correct 148 ms 42404 KB Output is correct
3 Correct 87 ms 27768 KB Output is correct
4 Correct 18 ms 6412 KB Output is correct
5 Correct 14 ms 3292 KB Output is correct
6 Correct 29 ms 9596 KB Output is correct
7 Correct 1 ms 460 KB Output is correct
8 Correct 58 ms 13900 KB Output is correct
9 Correct 76 ms 20604 KB Output is correct
10 Correct 2 ms 588 KB Output is correct
11 Correct 113 ms 25324 KB Output is correct
12 Correct 125 ms 34436 KB Output is correct
13 Correct 2 ms 588 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 332 KB Output is correct
5 Correct 1 ms 332 KB Output is correct
6 Correct 1 ms 332 KB Output is correct
7 Correct 1 ms 332 KB Output is correct
8 Correct 1 ms 332 KB Output is correct
9 Correct 1 ms 332 KB Output is correct
10 Correct 1 ms 332 KB Output is correct
11 Correct 1 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 332 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 332 KB Output is correct
17 Correct 1 ms 332 KB Output is correct
18 Correct 1 ms 332 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 332 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 1 ms 332 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 141 ms 42440 KB Output is correct
2 Correct 148 ms 42404 KB Output is correct
3 Correct 87 ms 27768 KB Output is correct
4 Correct 18 ms 6412 KB Output is correct
5 Correct 14 ms 3292 KB Output is correct
6 Correct 29 ms 9596 KB Output is correct
7 Correct 1 ms 460 KB Output is correct
8 Correct 58 ms 13900 KB Output is correct
9 Correct 76 ms 20604 KB Output is correct
10 Correct 2 ms 588 KB Output is correct
11 Correct 113 ms 25324 KB Output is correct
12 Correct 125 ms 34436 KB Output is correct
13 Correct 2 ms 588 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 332 KB Output is correct
16 Correct 1 ms 332 KB Output is correct
17 Correct 1 ms 332 KB Output is correct
18 Correct 1 ms 332 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 332 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 1 ms 332 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
26 Correct 1 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 204 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 332 KB Output is correct
31 Correct 1 ms 332 KB Output is correct
32 Correct 1 ms 332 KB Output is correct
33 Correct 1 ms 332 KB Output is correct
34 Correct 1 ms 332 KB Output is correct
35 Correct 1 ms 332 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 1 ms 332 KB Output is correct
38 Correct 1 ms 332 KB Output is correct
39 Correct 158 ms 42548 KB Output is correct
40 Correct 141 ms 42444 KB Output is correct
41 Correct 86 ms 27888 KB Output is correct
42 Correct 19 ms 6540 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 1 ms 332 KB Output is correct
45 Correct 1 ms 332 KB Output is correct
46 Correct 1 ms 332 KB Output is correct
47 Correct 1 ms 332 KB Output is correct
48 Correct 1 ms 332 KB Output is correct
49 Correct 1 ms 332 KB Output is correct
50 Correct 1 ms 332 KB Output is correct
51 Correct 1 ms 332 KB Output is correct
52 Correct 1 ms 332 KB Output is correct
53 Correct 1 ms 332 KB Output is correct
54 Correct 1 ms 332 KB Output is correct
55 Correct 1 ms 332 KB Output is correct
56 Correct 1 ms 332 KB Output is correct
57 Correct 176 ms 41560 KB Output is correct
58 Correct 222 ms 30272 KB Output is correct
59 Correct 179 ms 39748 KB Output is correct
60 Correct 177 ms 28828 KB Output is correct
61 Correct 193 ms 40284 KB Output is correct
62 Correct 205 ms 33024 KB Output is correct
63 Correct 172 ms 43796 KB Output is correct
64 Correct 168 ms 43876 KB Output is correct
65 Correct 171 ms 43932 KB Output is correct
66 Correct 167 ms 43868 KB Output is correct
67 Correct 174 ms 40564 KB Output is correct
68 Correct 208 ms 40080 KB Output is correct
69 Correct 182 ms 30968 KB Output is correct
70 Correct 181 ms 30824 KB Output is correct
71 Correct 1 ms 204 KB Output is correct
72 Correct 5 ms 1228 KB Output is correct
73 Correct 5 ms 1356 KB Output is correct
74 Correct 5 ms 1532 KB Output is correct
75 Correct 5 ms 1228 KB Output is correct
76 Correct 5 ms 1464 KB Output is correct
77 Correct 5 ms 1484 KB Output is correct
78 Correct 5 ms 1224 KB Output is correct
79 Correct 5 ms 1356 KB Output is correct
80 Correct 225 ms 35120 KB Output is correct
81 Correct 171 ms 35204 KB Output is correct
82 Correct 175 ms 40036 KB Output is correct
83 Correct 168 ms 43012 KB Output is correct
84 Correct 3 ms 1064 KB Output is correct
85 Correct 4 ms 1056 KB Output is correct
86 Correct 4 ms 972 KB Output is correct
87 Correct 4 ms 1080 KB Output is correct
88 Correct 4 ms 1100 KB Output is correct
89 Correct 4 ms 1100 KB Output is correct
90 Correct 4 ms 972 KB Output is correct
91 Correct 5 ms 1484 KB Output is correct
92 Correct 5 ms 1228 KB Output is correct
93 Correct 4 ms 1244 KB Output is correct
94 Correct 1 ms 332 KB Output is correct
95 Correct 1 ms 332 KB Output is correct
96 Correct 1 ms 332 KB Output is correct
97 Correct 1 ms 332 KB Output is correct
98 Correct 1 ms 332 KB Output is correct
99 Correct 1 ms 332 KB Output is correct
100 Correct 2 ms 332 KB Output is correct
101 Correct 1 ms 332 KB Output is correct
102 Correct 1 ms 332 KB Output is correct
103 Correct 1 ms 332 KB Output is correct
104 Correct 14 ms 3292 KB Output is correct
105 Correct 29 ms 9564 KB Output is correct
106 Correct 1 ms 460 KB Output is correct
107 Correct 60 ms 13848 KB Output is correct
108 Correct 80 ms 20644 KB Output is correct
109 Correct 2 ms 612 KB Output is correct
110 Correct 120 ms 25344 KB Output is correct
111 Correct 134 ms 34620 KB Output is correct
112 Correct 3 ms 588 KB Output is correct
113 Correct 161 ms 47360 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 99 ms 13444 KB Output is correct
2 Correct 102 ms 13580 KB Output is correct
3 Correct 111 ms 13532 KB Output is correct
4 Correct 95 ms 13476 KB Output is correct
5 Correct 98 ms 13448 KB Output is correct
6 Correct 107 ms 15412 KB Output is correct
7 Correct 101 ms 14456 KB Output is correct
8 Correct 94 ms 13628 KB Output is correct
9 Correct 96 ms 13604 KB Output is correct
10 Correct 104 ms 14452 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 67 ms 12644 KB Output is correct
13 Correct 68 ms 12596 KB Output is correct
14 Correct 65 ms 12676 KB Output is correct
15 Correct 69 ms 12676 KB Output is correct
16 Correct 64 ms 12668 KB Output is correct
17 Correct 64 ms 12644 KB Output is correct
18 Correct 65 ms 12680 KB Output is correct
19 Correct 64 ms 12664 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 296 KB Output is correct
22 Correct 3 ms 588 KB Output is correct
23 Correct 63 ms 12672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 332 KB Output is correct
5 Correct 1 ms 332 KB Output is correct
6 Correct 1 ms 332 KB Output is correct
7 Correct 1 ms 332 KB Output is correct
8 Correct 1 ms 332 KB Output is correct
9 Correct 1 ms 332 KB Output is correct
10 Correct 1 ms 332 KB Output is correct
11 Correct 1 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 332 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 332 KB Output is correct
17 Correct 1 ms 332 KB Output is correct
18 Correct 1 ms 332 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 332 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 1 ms 332 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
26 Correct 2 ms 460 KB Output is correct
27 Correct 3 ms 588 KB Output is correct
28 Correct 5 ms 856 KB Output is correct
29 Correct 2 ms 460 KB Output is correct
30 Correct 3 ms 588 KB Output is correct
31 Correct 4 ms 844 KB Output is correct
32 Correct 2 ms 460 KB Output is correct
33 Correct 3 ms 588 KB Output is correct
34 Correct 5 ms 960 KB Output is correct
35 Correct 1 ms 204 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 1 ms 332 KB Output is correct
38 Correct 1 ms 332 KB Output is correct
39 Correct 1 ms 332 KB Output is correct
40 Correct 1 ms 204 KB Output is correct
41 Correct 1 ms 204 KB Output is correct
42 Correct 1 ms 332 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 1 ms 332 KB Output is correct
45 Correct 1 ms 332 KB Output is correct
46 Correct 1 ms 332 KB Output is correct
47 Correct 1 ms 332 KB Output is correct
48 Correct 1 ms 332 KB Output is correct
49 Correct 1 ms 332 KB Output is correct
50 Correct 1 ms 332 KB Output is correct
51 Correct 1 ms 332 KB Output is correct
52 Correct 1 ms 204 KB Output is correct
53 Correct 1 ms 204 KB Output is correct
54 Correct 7 ms 1612 KB Output is correct
55 Correct 5 ms 1612 KB Output is correct
56 Correct 5 ms 716 KB Output is correct
57 Correct 3 ms 716 KB Output is correct
58 Correct 5 ms 1228 KB Output is correct
59 Correct 5 ms 1356 KB Output is correct
60 Correct 4 ms 716 KB Output is correct
61 Correct 3 ms 716 KB Output is correct
62 Correct 5 ms 1100 KB Output is correct
63 Correct 5 ms 1228 KB Output is correct
64 Correct 3 ms 588 KB Output is correct
65 Correct 4 ms 716 KB Output is correct
66 Correct 5 ms 1612 KB Output is correct
67 Correct 5 ms 1228 KB Output is correct
68 Correct 4 ms 716 KB Output is correct
69 Correct 4 ms 716 KB Output is correct
70 Correct 4 ms 716 KB Output is correct
71 Correct 3 ms 716 KB Output is correct
72 Correct 5 ms 1356 KB Output is correct
73 Correct 5 ms 1484 KB Output is correct
74 Correct 5 ms 844 KB Output is correct
75 Correct 5 ms 844 KB Output is correct
76 Correct 6 ms 1220 KB Output is correct
77 Correct 5 ms 1356 KB Output is correct
78 Correct 3 ms 716 KB Output is correct
79 Correct 4 ms 588 KB Output is correct
80 Correct 3 ms 716 KB Output is correct
81 Correct 3 ms 588 KB Output is correct
82 Correct 5 ms 844 KB Output is correct
83 Correct 5 ms 844 KB Output is correct
84 Correct 4 ms 844 KB Output is correct
85 Correct 3 ms 716 KB Output is correct
86 Correct 4 ms 1192 KB Output is correct
87 Correct 5 ms 1484 KB Output is correct
88 Correct 4 ms 716 KB Output is correct
89 Correct 5 ms 716 KB Output is correct
90 Correct 4 ms 716 KB Output is correct
91 Correct 4 ms 716 KB Output is correct
92 Correct 4 ms 972 KB Output is correct
93 Correct 3 ms 1100 KB Output is correct
94 Correct 4 ms 972 KB Output is correct
95 Correct 4 ms 1080 KB Output is correct
96 Correct 4 ms 1100 KB Output is correct
97 Correct 4 ms 1100 KB Output is correct
98 Correct 6 ms 1080 KB Output is correct
99 Correct 5 ms 1408 KB Output is correct
100 Correct 5 ms 1228 KB Output is correct
101 Correct 6 ms 1244 KB Output is correct
102 Correct 1 ms 332 KB Output is correct
103 Correct 1 ms 332 KB Output is correct
104 Correct 1 ms 332 KB Output is correct
105 Correct 1 ms 332 KB Output is correct
106 Correct 1 ms 332 KB Output is correct
107 Correct 2 ms 332 KB Output is correct
108 Correct 1 ms 332 KB Output is correct
109 Correct 1 ms 332 KB Output is correct
110 Correct 1 ms 332 KB Output is correct
111 Correct 1 ms 332 KB Output is correct
112 Correct 1 ms 460 KB Output is correct
113 Correct 2 ms 588 KB Output is correct
114 Correct 2 ms 588 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 141 ms 42440 KB Output is correct
2 Correct 148 ms 42404 KB Output is correct
3 Correct 87 ms 27768 KB Output is correct
4 Correct 18 ms 6412 KB Output is correct
5 Correct 14 ms 3292 KB Output is correct
6 Correct 29 ms 9596 KB Output is correct
7 Correct 1 ms 460 KB Output is correct
8 Correct 58 ms 13900 KB Output is correct
9 Correct 76 ms 20604 KB Output is correct
10 Correct 2 ms 588 KB Output is correct
11 Correct 113 ms 25324 KB Output is correct
12 Correct 125 ms 34436 KB Output is correct
13 Correct 2 ms 588 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 332 KB Output is correct
16 Correct 1 ms 332 KB Output is correct
17 Correct 1 ms 332 KB Output is correct
18 Correct 1 ms 332 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 332 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 1 ms 332 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
26 Correct 1 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 204 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 332 KB Output is correct
31 Correct 1 ms 332 KB Output is correct
32 Correct 1 ms 332 KB Output is correct
33 Correct 1 ms 332 KB Output is correct
34 Correct 1 ms 332 KB Output is correct
35 Correct 1 ms 332 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 1 ms 332 KB Output is correct
38 Correct 1 ms 332 KB Output is correct
39 Correct 158 ms 42548 KB Output is correct
40 Correct 141 ms 42444 KB Output is correct
41 Correct 86 ms 27888 KB Output is correct
42 Correct 19 ms 6540 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 1 ms 332 KB Output is correct
45 Correct 1 ms 332 KB Output is correct
46 Correct 1 ms 332 KB Output is correct
47 Correct 1 ms 332 KB Output is correct
48 Correct 1 ms 332 KB Output is correct
49 Correct 1 ms 332 KB Output is correct
50 Correct 1 ms 332 KB Output is correct
51 Correct 1 ms 332 KB Output is correct
52 Correct 1 ms 332 KB Output is correct
53 Correct 1 ms 332 KB Output is correct
54 Correct 1 ms 332 KB Output is correct
55 Correct 1 ms 332 KB Output is correct
56 Correct 1 ms 332 KB Output is correct
57 Correct 176 ms 41560 KB Output is correct
58 Correct 222 ms 30272 KB Output is correct
59 Correct 179 ms 39748 KB Output is correct
60 Correct 177 ms 28828 KB Output is correct
61 Correct 193 ms 40284 KB Output is correct
62 Correct 205 ms 33024 KB Output is correct
63 Correct 172 ms 43796 KB Output is correct
64 Correct 168 ms 43876 KB Output is correct
65 Correct 171 ms 43932 KB Output is correct
66 Correct 167 ms 43868 KB Output is correct
67 Correct 174 ms 40564 KB Output is correct
68 Correct 208 ms 40080 KB Output is correct
69 Correct 182 ms 30968 KB Output is correct
70 Correct 181 ms 30824 KB Output is correct
71 Correct 1 ms 204 KB Output is correct
72 Correct 5 ms 1228 KB Output is correct
73 Correct 5 ms 1356 KB Output is correct
74 Correct 5 ms 1532 KB Output is correct
75 Correct 5 ms 1228 KB Output is correct
76 Correct 5 ms 1464 KB Output is correct
77 Correct 5 ms 1484 KB Output is correct
78 Correct 5 ms 1224 KB Output is correct
79 Correct 5 ms 1356 KB Output is correct
80 Correct 225 ms 35120 KB Output is correct
81 Correct 171 ms 35204 KB Output is correct
82 Correct 175 ms 40036 KB Output is correct
83 Correct 168 ms 43012 KB Output is correct
84 Correct 3 ms 1064 KB Output is correct
85 Correct 4 ms 1056 KB Output is correct
86 Correct 4 ms 972 KB Output is correct
87 Correct 4 ms 1080 KB Output is correct
88 Correct 4 ms 1100 KB Output is correct
89 Correct 4 ms 1100 KB Output is correct
90 Correct 4 ms 972 KB Output is correct
91 Correct 5 ms 1484 KB Output is correct
92 Correct 5 ms 1228 KB Output is correct
93 Correct 4 ms 1244 KB Output is correct
94 Correct 1 ms 332 KB Output is correct
95 Correct 1 ms 332 KB Output is correct
96 Correct 1 ms 332 KB Output is correct
97 Correct 1 ms 332 KB Output is correct
98 Correct 1 ms 332 KB Output is correct
99 Correct 1 ms 332 KB Output is correct
100 Correct 2 ms 332 KB Output is correct
101 Correct 1 ms 332 KB Output is correct
102 Correct 1 ms 332 KB Output is correct
103 Correct 1 ms 332 KB Output is correct
104 Correct 14 ms 3292 KB Output is correct
105 Correct 29 ms 9564 KB Output is correct
106 Correct 1 ms 460 KB Output is correct
107 Correct 60 ms 13848 KB Output is correct
108 Correct 80 ms 20644 KB Output is correct
109 Correct 2 ms 612 KB Output is correct
110 Correct 120 ms 25344 KB Output is correct
111 Correct 134 ms 34620 KB Output is correct
112 Correct 3 ms 588 KB Output is correct
113 Correct 161 ms 47360 KB Output is correct
114 Correct 99 ms 13444 KB Output is correct
115 Correct 102 ms 13580 KB Output is correct
116 Correct 111 ms 13532 KB Output is correct
117 Correct 95 ms 13476 KB Output is correct
118 Correct 98 ms 13448 KB Output is correct
119 Correct 107 ms 15412 KB Output is correct
120 Correct 101 ms 14456 KB Output is correct
121 Correct 94 ms 13628 KB Output is correct
122 Correct 96 ms 13604 KB Output is correct
123 Correct 104 ms 14452 KB Output is correct
124 Correct 1 ms 204 KB Output is correct
125 Correct 67 ms 12644 KB Output is correct
126 Correct 68 ms 12596 KB Output is correct
127 Correct 65 ms 12676 KB Output is correct
128 Correct 69 ms 12676 KB Output is correct
129 Correct 64 ms 12668 KB Output is correct
130 Correct 64 ms 12644 KB Output is correct
131 Correct 65 ms 12680 KB Output is correct
132 Correct 64 ms 12664 KB Output is correct
133 Correct 1 ms 204 KB Output is correct
134 Correct 1 ms 296 KB Output is correct
135 Correct 3 ms 588 KB Output is correct
136 Correct 63 ms 12672 KB Output is correct
137 Correct 2 ms 460 KB Output is correct
138 Correct 3 ms 588 KB Output is correct
139 Correct 5 ms 856 KB Output is correct
140 Correct 2 ms 460 KB Output is correct
141 Correct 3 ms 588 KB Output is correct
142 Correct 4 ms 844 KB Output is correct
143 Correct 2 ms 460 KB Output is correct
144 Correct 3 ms 588 KB Output is correct
145 Correct 5 ms 960 KB Output is correct
146 Correct 1 ms 204 KB Output is correct
147 Correct 1 ms 332 KB Output is correct
148 Correct 1 ms 332 KB Output is correct
149 Correct 1 ms 332 KB Output is correct
150 Correct 1 ms 332 KB Output is correct
151 Correct 1 ms 204 KB Output is correct
152 Correct 1 ms 204 KB Output is correct
153 Correct 1 ms 332 KB Output is correct
154 Correct 1 ms 332 KB Output is correct
155 Correct 1 ms 332 KB Output is correct
156 Correct 1 ms 332 KB Output is correct
157 Correct 1 ms 332 KB Output is correct
158 Correct 1 ms 332 KB Output is correct
159 Correct 1 ms 332 KB Output is correct
160 Correct 1 ms 332 KB Output is correct
161 Correct 1 ms 332 KB Output is correct
162 Correct 1 ms 332 KB Output is correct
163 Correct 1 ms 204 KB Output is correct
164 Correct 1 ms 204 KB Output is correct
165 Correct 7 ms 1612 KB Output is correct
166 Correct 5 ms 1612 KB Output is correct
167 Correct 5 ms 716 KB Output is correct
168 Correct 3 ms 716 KB Output is correct
169 Correct 5 ms 1228 KB Output is correct
170 Correct 5 ms 1356 KB Output is correct
171 Correct 4 ms 716 KB Output is correct
172 Correct 3 ms 716 KB Output is correct
173 Correct 5 ms 1100 KB Output is correct
174 Correct 5 ms 1228 KB Output is correct
175 Correct 3 ms 588 KB Output is correct
176 Correct 4 ms 716 KB Output is correct
177 Correct 5 ms 1612 KB Output is correct
178 Correct 5 ms 1228 KB Output is correct
179 Correct 4 ms 716 KB Output is correct
180 Correct 4 ms 716 KB Output is correct
181 Correct 4 ms 716 KB Output is correct
182 Correct 3 ms 716 KB Output is correct
183 Correct 5 ms 1356 KB Output is correct
184 Correct 5 ms 1484 KB Output is correct
185 Correct 5 ms 844 KB Output is correct
186 Correct 5 ms 844 KB Output is correct
187 Correct 6 ms 1220 KB Output is correct
188 Correct 5 ms 1356 KB Output is correct
189 Correct 3 ms 716 KB Output is correct
190 Correct 4 ms 588 KB Output is correct
191 Correct 3 ms 716 KB Output is correct
192 Correct 3 ms 588 KB Output is correct
193 Correct 5 ms 844 KB Output is correct
194 Correct 5 ms 844 KB Output is correct
195 Correct 4 ms 844 KB Output is correct
196 Correct 3 ms 716 KB Output is correct
197 Correct 4 ms 1192 KB Output is correct
198 Correct 5 ms 1484 KB Output is correct
199 Correct 4 ms 716 KB Output is correct
200 Correct 5 ms 716 KB Output is correct
201 Correct 4 ms 716 KB Output is correct
202 Correct 4 ms 716 KB Output is correct
203 Correct 4 ms 972 KB Output is correct
204 Correct 3 ms 1100 KB Output is correct
205 Correct 4 ms 972 KB Output is correct
206 Correct 4 ms 1080 KB Output is correct
207 Correct 4 ms 1100 KB Output is correct
208 Correct 4 ms 1100 KB Output is correct
209 Correct 6 ms 1080 KB Output is correct
210 Correct 5 ms 1408 KB Output is correct
211 Correct 5 ms 1228 KB Output is correct
212 Correct 6 ms 1244 KB Output is correct
213 Correct 1 ms 332 KB Output is correct
214 Correct 1 ms 332 KB Output is correct
215 Correct 1 ms 332 KB Output is correct
216 Correct 1 ms 332 KB Output is correct
217 Correct 1 ms 332 KB Output is correct
218 Correct 2 ms 332 KB Output is correct
219 Correct 1 ms 332 KB Output is correct
220 Correct 1 ms 332 KB Output is correct
221 Correct 1 ms 332 KB Output is correct
222 Correct 1 ms 332 KB Output is correct
223 Correct 1 ms 460 KB Output is correct
224 Correct 2 ms 588 KB Output is correct
225 Correct 2 ms 588 KB Output is correct
226 Correct 2 ms 460 KB Output is correct
227 Correct 4 ms 568 KB Output is correct
228 Correct 5 ms 844 KB Output is correct
229 Correct 119 ms 15540 KB Output is correct
230 Correct 146 ms 19444 KB Output is correct
231 Correct 2 ms 460 KB Output is correct
232 Correct 3 ms 588 KB Output is correct
233 Correct 4 ms 844 KB Output is correct
234 Correct 114 ms 15760 KB Output is correct
235 Correct 144 ms 19752 KB Output is correct
236 Correct 2 ms 460 KB Output is correct
237 Correct 3 ms 696 KB Output is correct
238 Correct 4 ms 844 KB Output is correct
239 Correct 108 ms 16016 KB Output is correct
240 Correct 141 ms 20024 KB Output is correct
241 Correct 96 ms 13948 KB Output is correct
242 Correct 95 ms 13968 KB Output is correct
243 Correct 94 ms 13872 KB Output is correct
244 Correct 97 ms 13912 KB Output is correct
245 Correct 103 ms 13872 KB Output is correct
246 Correct 103 ms 15296 KB Output is correct
247 Correct 101 ms 14560 KB Output is correct
248 Correct 101 ms 13624 KB Output is correct
249 Correct 96 ms 13636 KB Output is correct
250 Correct 117 ms 14456 KB Output is correct
251 Correct 1 ms 204 KB Output is correct
252 Correct 136 ms 43704 KB Output is correct
253 Correct 138 ms 43616 KB Output is correct
254 Correct 89 ms 28828 KB Output is correct
255 Correct 18 ms 6540 KB Output is correct
256 Correct 1 ms 332 KB Output is correct
257 Correct 1 ms 332 KB Output is correct
258 Correct 1 ms 332 KB Output is correct
259 Correct 1 ms 332 KB Output is correct
260 Correct 1 ms 296 KB Output is correct
261 Correct 1 ms 332 KB Output is correct
262 Correct 1 ms 296 KB Output is correct
263 Correct 1 ms 332 KB Output is correct
264 Correct 1 ms 304 KB Output is correct
265 Correct 1 ms 332 KB Output is correct
266 Correct 1 ms 332 KB Output is correct
267 Correct 1 ms 332 KB Output is correct
268 Correct 1 ms 332 KB Output is correct
269 Correct 1 ms 332 KB Output is correct
270 Correct 2 ms 332 KB Output is correct
271 Correct 1 ms 332 KB Output is correct
272 Correct 182 ms 42960 KB Output is correct
273 Correct 175 ms 31572 KB Output is correct
274 Correct 185 ms 41064 KB Output is correct
275 Correct 175 ms 30216 KB Output is correct
276 Correct 81 ms 12668 KB Output is correct
277 Correct 64 ms 12704 KB Output is correct
278 Correct 170 ms 41828 KB Output is correct
279 Correct 179 ms 34620 KB Output is correct
280 Correct 172 ms 45208 KB Output is correct
281 Correct 160 ms 45244 KB Output is correct
282 Correct 194 ms 45516 KB Output is correct
283 Correct 168 ms 45444 KB Output is correct
284 Correct 180 ms 41932 KB Output is correct
285 Correct 172 ms 41356 KB Output is correct
286 Correct 186 ms 32532 KB Output is correct
287 Correct 171 ms 32412 KB Output is correct
288 Correct 66 ms 12676 KB Output is correct
289 Correct 63 ms 12716 KB Output is correct
290 Correct 65 ms 12664 KB Output is correct
291 Correct 73 ms 12652 KB Output is correct
292 Correct 74 ms 12684 KB Output is correct
293 Correct 63 ms 12656 KB Output is correct
294 Correct 1 ms 204 KB Output is correct
295 Correct 1 ms 204 KB Output is correct
296 Correct 5 ms 1612 KB Output is correct
297 Correct 5 ms 1612 KB Output is correct
298 Correct 157 ms 41364 KB Output is correct
299 Correct 157 ms 41148 KB Output is correct
300 Correct 4 ms 716 KB Output is correct
301 Correct 3 ms 716 KB Output is correct
302 Correct 5 ms 1228 KB Output is correct
303 Correct 5 ms 1484 KB Output is correct
304 Correct 4 ms 716 KB Output is correct
305 Correct 4 ms 716 KB Output is correct
306 Correct 5 ms 1228 KB Output is correct
307 Correct 7 ms 1228 KB Output is correct
308 Correct 3 ms 588 KB Output is correct
309 Correct 4 ms 716 KB Output is correct
310 Correct 5 ms 1636 KB Output is correct
311 Correct 5 ms 1228 KB Output is correct
312 Correct 5 ms 832 KB Output is correct
313 Correct 5 ms 840 KB Output is correct
314 Correct 4 ms 716 KB Output is correct
315 Correct 4 ms 716 KB Output is correct
316 Correct 5 ms 1512 KB Output is correct
317 Correct 5 ms 1460 KB Output is correct
318 Correct 5 ms 892 KB Output is correct
319 Correct 5 ms 844 KB Output is correct
320 Correct 7 ms 1220 KB Output is correct
321 Correct 5 ms 1376 KB Output is correct
322 Correct 4 ms 716 KB Output is correct
323 Correct 4 ms 716 KB Output is correct
324 Correct 3 ms 716 KB Output is correct
325 Correct 4 ms 588 KB Output is correct
326 Correct 5 ms 844 KB Output is correct
327 Correct 5 ms 844 KB Output is correct
328 Correct 4 ms 844 KB Output is correct
329 Correct 3 ms 716 KB Output is correct
330 Correct 4 ms 1228 KB Output is correct
331 Correct 7 ms 1484 KB Output is correct
332 Correct 5 ms 844 KB Output is correct
333 Correct 4 ms 716 KB Output is correct
334 Correct 4 ms 716 KB Output is correct
335 Correct 4 ms 696 KB Output is correct
336 Correct 148 ms 43316 KB Output is correct
337 Correct 158 ms 46500 KB Output is correct
338 Correct 154 ms 40988 KB Output is correct
339 Correct 162 ms 41724 KB Output is correct
340 Correct 88 ms 14024 KB Output is correct
341 Correct 112 ms 14724 KB Output is correct
342 Correct 168 ms 35852 KB Output is correct
343 Correct 165 ms 35956 KB Output is correct
344 Correct 120 ms 16180 KB Output is correct
345 Correct 102 ms 14928 KB Output is correct
346 Correct 170 ms 31432 KB Output is correct
347 Correct 165 ms 32068 KB Output is correct
348 Correct 164 ms 19196 KB Output is correct
349 Correct 155 ms 18432 KB Output is correct
350 Correct 174 ms 40836 KB Output is correct
351 Correct 174 ms 43836 KB Output is correct
352 Correct 68 ms 12792 KB Output is correct
353 Correct 146 ms 18420 KB Output is correct
354 Correct 109 ms 15084 KB Output is correct
355 Correct 103 ms 14984 KB Output is correct
356 Correct 135 ms 17768 KB Output is correct
357 Correct 78 ms 13032 KB Output is correct
358 Correct 124 ms 15108 KB Output is correct
359 Correct 103 ms 15104 KB Output is correct
360 Correct 63 ms 12676 KB Output is correct
361 Correct 63 ms 12584 KB Output is correct
362 Correct 180 ms 19504 KB Output is correct
363 Correct 177 ms 19416 KB Output is correct
364 Correct 120 ms 27516 KB Output is correct
365 Correct 99 ms 21808 KB Output is correct
366 Correct 121 ms 27532 KB Output is correct
367 Correct 149 ms 30400 KB Output is correct
368 Correct 144 ms 17920 KB Output is correct
369 Correct 130 ms 16692 KB Output is correct
370 Correct 111 ms 14728 KB Output is correct
371 Correct 144 ms 17716 KB Output is correct
372 Correct 4 ms 1100 KB Output is correct
373 Correct 3 ms 1100 KB Output is correct
374 Correct 4 ms 1088 KB Output is correct
375 Correct 4 ms 1100 KB Output is correct
376 Correct 4 ms 1164 KB Output is correct
377 Correct 4 ms 1100 KB Output is correct
378 Correct 4 ms 1080 KB Output is correct
379 Correct 5 ms 1484 KB Output is correct
380 Correct 5 ms 1228 KB Output is correct
381 Correct 4 ms 1228 KB Output is correct
382 Correct 1 ms 332 KB Output is correct
383 Correct 1 ms 332 KB Output is correct
384 Correct 1 ms 332 KB Output is correct
385 Correct 1 ms 332 KB Output is correct
386 Correct 1 ms 332 KB Output is correct
387 Correct 1 ms 304 KB Output is correct
388 Correct 1 ms 332 KB Output is correct
389 Correct 1 ms 332 KB Output is correct
390 Correct 1 ms 332 KB Output is correct
391 Correct 1 ms 332 KB Output is correct
392 Correct 14 ms 3420 KB Output is correct
393 Correct 30 ms 9964 KB Output is correct
394 Correct 1 ms 460 KB Output is correct
395 Correct 69 ms 14240 KB Output is correct
396 Correct 78 ms 20980 KB Output is correct
397 Correct 2 ms 588 KB Output is correct
398 Correct 105 ms 25604 KB Output is correct
399 Correct 139 ms 34800 KB Output is correct
400 Correct 2 ms 580 KB Output is correct
401 Correct 179 ms 47408 KB Output is correct