Submission #93470

# Submission time Handle Problem Language Result Execution time Memory
93470 2019-01-08T16:35:22 Z Flying_dragon_02 Telegraph (JOI16_telegraph) C++14
100 / 100
88 ms 17896 KB
#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define int long long
typedef pair<int, int> ii;

const int N = 1e5 + 5;
const int inf = 1e15;

int c[N], par[N], f[2], ck[N], val[N], ans, dp[N], n, lmao[N];

vector<int> graph[N], cycle, vec;

bool vis[N];

void dfs(int u) {
    if(lmao[u]) return ;
    vec.pb(u);
    if(vis[u] == 1) {
        int p = par[u];
        cycle.pb(u);
        while(p != u) {
            cycle.pb(p);
            p = par[p];
        }
        reverse(cycle.begin(), cycle.end());
        return ;
    }
    vis[u]++;
    for(int i = 0; i < graph[u].size(); i++) {
        int v = graph[u][i];
        par[v] = u;
        dfs(v);
    }
}

void bfs(int u) {
    vis[u] = 1;
    int mx = 0;
    for(int i = 0; i < graph[u].size(); i++) {
        int v = graph[u][i];
        if(ck[v]) continue;
        bfs(v);
        dp[u] += dp[v];
        dp[u] += c[v];
        mx = max(mx, c[v]);
    }
    dp[u] -= mx;
    val[u] = mx;
}

signed main() {
    cin.tie(0), ios::sync_with_stdio(0);
    //freopen("test.inp", "r", stdin);
    //freopen("test.out", "w", stdout);
    cin >> n;
    for(int i = 1; i <= n; i++) {
        int p;
        cin >> p >> c[i];
        graph[p].pb(i);
    }
    for(int i = 1; i <= n; i++) {
        if(!vis[i]) {
            vec.clear();
            cycle.clear();
            dfs(i);
            for(int j = 0; j < vec.size(); j++)
                lmao[vec[j]] = 1;
            if(cycle.size() == 0) continue;
            if(cycle.size() == n) {
                cout << "0\n";
                exit(0);
            }
            for(int j = 0; j < cycle.size(); j++)
                ck[cycle[j]] = 1;
            memset(f, 0, sizeof(f));
            f[1] = inf;
            int m = cycle.size();
            for(int j = 0; j < m; j++) {
                int u = cycle[j], nxt = cycle[(j + 1) % m];
                bfs(u);
                f[1] = min(f[1] + dp[cycle[j]] + val[cycle[j]], f[0] + dp[cycle[j]] + c[nxt]);
                f[0] = f[0] + dp[cycle[j]] + val[cycle[j]];
                f[0] = min(f[1], f[0]);
            }
            ans = ans + f[1];
        }
    }
    cout << ans;
}

Compilation message

telegraph.cpp: In function 'void dfs(long long int)':
telegraph.cpp:34:11: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
     vis[u]++;
           ^~
telegraph.cpp:35:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < graph[u].size(); i++) {
                    ~~^~~~~~~~~~~~~~~~~
telegraph.cpp: In function 'void bfs(long long int)':
telegraph.cpp:45:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < graph[u].size(); i++) {
                    ~~^~~~~~~~~~~~~~~~~
telegraph.cpp: In function 'int main()':
telegraph.cpp:72:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j = 0; j < vec.size(); j++)
                            ~~^~~~~~~~~~~~
telegraph.cpp:75:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if(cycle.size() == n) {
                ~~~~~~~~~~~~~^~~~
telegraph.cpp:79:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int j = 0; j < cycle.size(); j++)
                            ~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 3 ms 2728 KB Output is correct
2 Correct 3 ms 2680 KB Output is correct
3 Correct 4 ms 2680 KB Output is correct
4 Correct 3 ms 2680 KB Output is correct
5 Correct 3 ms 2680 KB Output is correct
6 Correct 3 ms 2680 KB Output is correct
7 Correct 3 ms 2680 KB Output is correct
8 Correct 4 ms 2680 KB Output is correct
9 Correct 3 ms 2680 KB Output is correct
10 Correct 3 ms 2744 KB Output is correct
11 Correct 3 ms 2680 KB Output is correct
12 Correct 3 ms 2680 KB Output is correct
13 Correct 3 ms 2680 KB Output is correct
14 Correct 3 ms 2680 KB Output is correct
15 Correct 3 ms 2684 KB Output is correct
16 Correct 4 ms 2684 KB Output is correct
17 Correct 3 ms 2680 KB Output is correct
18 Correct 3 ms 2680 KB Output is correct
19 Correct 3 ms 2680 KB Output is correct
20 Correct 3 ms 2680 KB Output is correct
21 Correct 3 ms 2676 KB Output is correct
22 Correct 3 ms 2680 KB Output is correct
23 Correct 3 ms 2680 KB Output is correct
24 Correct 3 ms 2680 KB Output is correct
25 Correct 4 ms 2680 KB Output is correct
26 Correct 3 ms 2708 KB Output is correct
27 Correct 3 ms 2684 KB Output is correct
28 Correct 3 ms 2680 KB Output is correct
29 Correct 3 ms 2680 KB Output is correct
30 Correct 3 ms 2680 KB Output is correct
31 Correct 3 ms 2680 KB Output is correct
32 Correct 3 ms 2680 KB Output is correct
33 Correct 3 ms 2680 KB Output is correct
34 Correct 3 ms 2680 KB Output is correct
35 Correct 3 ms 2680 KB Output is correct
36 Correct 3 ms 2808 KB Output is correct
37 Correct 3 ms 2680 KB Output is correct
38 Correct 4 ms 2680 KB Output is correct
39 Correct 3 ms 2680 KB Output is correct
40 Correct 4 ms 2684 KB Output is correct
41 Correct 4 ms 2680 KB Output is correct
42 Correct 3 ms 2680 KB Output is correct
43 Correct 3 ms 2680 KB Output is correct
44 Correct 4 ms 2680 KB Output is correct
45 Correct 4 ms 2680 KB Output is correct
46 Correct 4 ms 2680 KB Output is correct
47 Correct 4 ms 2684 KB Output is correct
48 Correct 4 ms 2680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 2728 KB Output is correct
2 Correct 3 ms 2680 KB Output is correct
3 Correct 4 ms 2680 KB Output is correct
4 Correct 3 ms 2680 KB Output is correct
5 Correct 3 ms 2680 KB Output is correct
6 Correct 3 ms 2680 KB Output is correct
7 Correct 3 ms 2680 KB Output is correct
8 Correct 4 ms 2680 KB Output is correct
9 Correct 3 ms 2680 KB Output is correct
10 Correct 3 ms 2744 KB Output is correct
11 Correct 3 ms 2680 KB Output is correct
12 Correct 3 ms 2680 KB Output is correct
13 Correct 3 ms 2680 KB Output is correct
14 Correct 3 ms 2680 KB Output is correct
15 Correct 3 ms 2684 KB Output is correct
16 Correct 4 ms 2684 KB Output is correct
17 Correct 3 ms 2680 KB Output is correct
18 Correct 3 ms 2680 KB Output is correct
19 Correct 3 ms 2680 KB Output is correct
20 Correct 3 ms 2680 KB Output is correct
21 Correct 3 ms 2676 KB Output is correct
22 Correct 3 ms 2680 KB Output is correct
23 Correct 3 ms 2680 KB Output is correct
24 Correct 3 ms 2680 KB Output is correct
25 Correct 4 ms 2680 KB Output is correct
26 Correct 3 ms 2708 KB Output is correct
27 Correct 3 ms 2684 KB Output is correct
28 Correct 3 ms 2680 KB Output is correct
29 Correct 3 ms 2680 KB Output is correct
30 Correct 3 ms 2680 KB Output is correct
31 Correct 3 ms 2680 KB Output is correct
32 Correct 3 ms 2680 KB Output is correct
33 Correct 3 ms 2680 KB Output is correct
34 Correct 3 ms 2680 KB Output is correct
35 Correct 3 ms 2680 KB Output is correct
36 Correct 3 ms 2808 KB Output is correct
37 Correct 3 ms 2680 KB Output is correct
38 Correct 4 ms 2680 KB Output is correct
39 Correct 3 ms 2680 KB Output is correct
40 Correct 4 ms 2684 KB Output is correct
41 Correct 4 ms 2680 KB Output is correct
42 Correct 3 ms 2680 KB Output is correct
43 Correct 3 ms 2680 KB Output is correct
44 Correct 4 ms 2680 KB Output is correct
45 Correct 4 ms 2680 KB Output is correct
46 Correct 4 ms 2680 KB Output is correct
47 Correct 4 ms 2684 KB Output is correct
48 Correct 4 ms 2680 KB Output is correct
49 Correct 4 ms 2680 KB Output is correct
50 Correct 4 ms 2680 KB Output is correct
51 Correct 4 ms 2680 KB Output is correct
52 Correct 4 ms 2680 KB Output is correct
53 Correct 3 ms 2680 KB Output is correct
54 Correct 3 ms 2680 KB Output is correct
55 Correct 4 ms 2680 KB Output is correct
56 Correct 3 ms 2680 KB Output is correct
57 Correct 4 ms 2680 KB Output is correct
58 Correct 4 ms 2680 KB Output is correct
59 Correct 4 ms 2684 KB Output is correct
60 Correct 4 ms 2680 KB Output is correct
61 Correct 4 ms 2680 KB Output is correct
62 Correct 4 ms 2740 KB Output is correct
63 Correct 3 ms 2680 KB Output is correct
64 Correct 4 ms 2680 KB Output is correct
65 Correct 4 ms 2680 KB Output is correct
66 Correct 4 ms 2680 KB Output is correct
67 Correct 3 ms 2680 KB Output is correct
68 Correct 4 ms 2652 KB Output is correct
69 Correct 3 ms 2680 KB Output is correct
70 Correct 3 ms 2680 KB Output is correct
71 Correct 3 ms 2680 KB Output is correct
72 Correct 3 ms 2680 KB Output is correct
73 Correct 3 ms 2680 KB Output is correct
74 Correct 3 ms 2680 KB Output is correct
75 Correct 3 ms 2680 KB Output is correct
76 Correct 3 ms 2680 KB Output is correct
77 Correct 3 ms 2680 KB Output is correct
78 Correct 3 ms 2680 KB Output is correct
79 Correct 3 ms 2680 KB Output is correct
80 Correct 3 ms 2680 KB Output is correct
81 Correct 3 ms 2680 KB Output is correct
82 Correct 3 ms 2680 KB Output is correct
83 Correct 3 ms 2652 KB Output is correct
84 Correct 14 ms 2680 KB Output is correct
85 Correct 3 ms 2680 KB Output is correct
86 Correct 3 ms 2680 KB Output is correct
87 Correct 3 ms 2680 KB Output is correct
88 Correct 3 ms 2680 KB Output is correct
89 Correct 3 ms 2680 KB Output is correct
90 Correct 3 ms 2680 KB Output is correct
91 Correct 3 ms 2680 KB Output is correct
92 Correct 4 ms 2680 KB Output is correct
93 Correct 4 ms 2680 KB Output is correct
94 Correct 8 ms 2680 KB Output is correct
95 Correct 3 ms 2680 KB Output is correct
96 Correct 3 ms 2680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 2728 KB Output is correct
2 Correct 3 ms 2680 KB Output is correct
3 Correct 4 ms 2680 KB Output is correct
4 Correct 3 ms 2680 KB Output is correct
5 Correct 3 ms 2680 KB Output is correct
6 Correct 3 ms 2680 KB Output is correct
7 Correct 3 ms 2680 KB Output is correct
8 Correct 4 ms 2680 KB Output is correct
9 Correct 3 ms 2680 KB Output is correct
10 Correct 3 ms 2744 KB Output is correct
11 Correct 3 ms 2680 KB Output is correct
12 Correct 3 ms 2680 KB Output is correct
13 Correct 3 ms 2680 KB Output is correct
14 Correct 3 ms 2680 KB Output is correct
15 Correct 3 ms 2684 KB Output is correct
16 Correct 4 ms 2684 KB Output is correct
17 Correct 3 ms 2680 KB Output is correct
18 Correct 3 ms 2680 KB Output is correct
19 Correct 3 ms 2680 KB Output is correct
20 Correct 3 ms 2680 KB Output is correct
21 Correct 3 ms 2676 KB Output is correct
22 Correct 3 ms 2680 KB Output is correct
23 Correct 3 ms 2680 KB Output is correct
24 Correct 3 ms 2680 KB Output is correct
25 Correct 4 ms 2680 KB Output is correct
26 Correct 3 ms 2708 KB Output is correct
27 Correct 3 ms 2684 KB Output is correct
28 Correct 3 ms 2680 KB Output is correct
29 Correct 3 ms 2680 KB Output is correct
30 Correct 3 ms 2680 KB Output is correct
31 Correct 3 ms 2680 KB Output is correct
32 Correct 3 ms 2680 KB Output is correct
33 Correct 3 ms 2680 KB Output is correct
34 Correct 3 ms 2680 KB Output is correct
35 Correct 3 ms 2680 KB Output is correct
36 Correct 3 ms 2808 KB Output is correct
37 Correct 3 ms 2680 KB Output is correct
38 Correct 4 ms 2680 KB Output is correct
39 Correct 3 ms 2680 KB Output is correct
40 Correct 4 ms 2684 KB Output is correct
41 Correct 4 ms 2680 KB Output is correct
42 Correct 3 ms 2680 KB Output is correct
43 Correct 3 ms 2680 KB Output is correct
44 Correct 4 ms 2680 KB Output is correct
45 Correct 4 ms 2680 KB Output is correct
46 Correct 4 ms 2680 KB Output is correct
47 Correct 4 ms 2684 KB Output is correct
48 Correct 4 ms 2680 KB Output is correct
49 Correct 4 ms 2680 KB Output is correct
50 Correct 4 ms 2680 KB Output is correct
51 Correct 4 ms 2680 KB Output is correct
52 Correct 4 ms 2680 KB Output is correct
53 Correct 3 ms 2680 KB Output is correct
54 Correct 3 ms 2680 KB Output is correct
55 Correct 4 ms 2680 KB Output is correct
56 Correct 3 ms 2680 KB Output is correct
57 Correct 4 ms 2680 KB Output is correct
58 Correct 4 ms 2680 KB Output is correct
59 Correct 4 ms 2684 KB Output is correct
60 Correct 4 ms 2680 KB Output is correct
61 Correct 4 ms 2680 KB Output is correct
62 Correct 4 ms 2740 KB Output is correct
63 Correct 3 ms 2680 KB Output is correct
64 Correct 4 ms 2680 KB Output is correct
65 Correct 4 ms 2680 KB Output is correct
66 Correct 4 ms 2680 KB Output is correct
67 Correct 3 ms 2680 KB Output is correct
68 Correct 4 ms 2652 KB Output is correct
69 Correct 3 ms 2680 KB Output is correct
70 Correct 3 ms 2680 KB Output is correct
71 Correct 3 ms 2680 KB Output is correct
72 Correct 3 ms 2680 KB Output is correct
73 Correct 3 ms 2680 KB Output is correct
74 Correct 3 ms 2680 KB Output is correct
75 Correct 3 ms 2680 KB Output is correct
76 Correct 3 ms 2680 KB Output is correct
77 Correct 3 ms 2680 KB Output is correct
78 Correct 3 ms 2680 KB Output is correct
79 Correct 3 ms 2680 KB Output is correct
80 Correct 3 ms 2680 KB Output is correct
81 Correct 3 ms 2680 KB Output is correct
82 Correct 3 ms 2680 KB Output is correct
83 Correct 3 ms 2652 KB Output is correct
84 Correct 14 ms 2680 KB Output is correct
85 Correct 3 ms 2680 KB Output is correct
86 Correct 3 ms 2680 KB Output is correct
87 Correct 3 ms 2680 KB Output is correct
88 Correct 3 ms 2680 KB Output is correct
89 Correct 3 ms 2680 KB Output is correct
90 Correct 3 ms 2680 KB Output is correct
91 Correct 3 ms 2680 KB Output is correct
92 Correct 4 ms 2680 KB Output is correct
93 Correct 4 ms 2680 KB Output is correct
94 Correct 8 ms 2680 KB Output is correct
95 Correct 3 ms 2680 KB Output is correct
96 Correct 3 ms 2680 KB Output is correct
97 Correct 5 ms 2936 KB Output is correct
98 Correct 5 ms 2936 KB Output is correct
99 Correct 5 ms 2936 KB Output is correct
100 Correct 5 ms 2936 KB Output is correct
101 Correct 5 ms 2936 KB Output is correct
102 Correct 5 ms 3064 KB Output is correct
103 Correct 5 ms 3064 KB Output is correct
104 Correct 5 ms 3064 KB Output is correct
105 Correct 5 ms 3064 KB Output is correct
106 Correct 5 ms 3064 KB Output is correct
107 Correct 5 ms 3064 KB Output is correct
108 Correct 5 ms 3064 KB Output is correct
109 Correct 5 ms 3064 KB Output is correct
110 Correct 5 ms 3068 KB Output is correct
111 Correct 5 ms 3064 KB Output is correct
112 Correct 5 ms 3064 KB Output is correct
113 Correct 5 ms 3064 KB Output is correct
114 Correct 5 ms 3064 KB Output is correct
115 Correct 5 ms 3064 KB Output is correct
116 Correct 5 ms 2936 KB Output is correct
117 Correct 5 ms 2936 KB Output is correct
118 Correct 5 ms 3064 KB Output is correct
119 Correct 5 ms 3064 KB Output is correct
120 Correct 4 ms 2936 KB Output is correct
121 Correct 5 ms 2936 KB Output is correct
122 Correct 4 ms 2936 KB Output is correct
123 Correct 5 ms 2936 KB Output is correct
124 Correct 5 ms 2936 KB Output is correct
125 Correct 5 ms 2936 KB Output is correct
126 Correct 5 ms 2940 KB Output is correct
127 Correct 5 ms 2936 KB Output is correct
128 Correct 4 ms 2936 KB Output is correct
129 Correct 5 ms 3192 KB Output is correct
130 Correct 5 ms 3192 KB Output is correct
131 Correct 4 ms 3192 KB Output is correct
132 Correct 5 ms 3192 KB Output is correct
133 Correct 4 ms 2936 KB Output is correct
134 Correct 4 ms 2936 KB Output is correct
135 Correct 5 ms 2936 KB Output is correct
136 Correct 4 ms 2936 KB Output is correct
137 Correct 4 ms 2808 KB Output is correct
138 Correct 4 ms 2808 KB Output is correct
139 Correct 4 ms 2808 KB Output is correct
140 Correct 4 ms 2808 KB Output is correct
141 Correct 4 ms 2808 KB Output is correct
142 Correct 4 ms 2808 KB Output is correct
143 Correct 4 ms 2936 KB Output is correct
144 Correct 5 ms 2936 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 2728 KB Output is correct
2 Correct 3 ms 2680 KB Output is correct
3 Correct 4 ms 2680 KB Output is correct
4 Correct 3 ms 2680 KB Output is correct
5 Correct 3 ms 2680 KB Output is correct
6 Correct 3 ms 2680 KB Output is correct
7 Correct 3 ms 2680 KB Output is correct
8 Correct 4 ms 2680 KB Output is correct
9 Correct 3 ms 2680 KB Output is correct
10 Correct 3 ms 2744 KB Output is correct
11 Correct 3 ms 2680 KB Output is correct
12 Correct 3 ms 2680 KB Output is correct
13 Correct 3 ms 2680 KB Output is correct
14 Correct 3 ms 2680 KB Output is correct
15 Correct 3 ms 2684 KB Output is correct
16 Correct 4 ms 2684 KB Output is correct
17 Correct 3 ms 2680 KB Output is correct
18 Correct 3 ms 2680 KB Output is correct
19 Correct 3 ms 2680 KB Output is correct
20 Correct 3 ms 2680 KB Output is correct
21 Correct 3 ms 2676 KB Output is correct
22 Correct 3 ms 2680 KB Output is correct
23 Correct 3 ms 2680 KB Output is correct
24 Correct 3 ms 2680 KB Output is correct
25 Correct 4 ms 2680 KB Output is correct
26 Correct 3 ms 2708 KB Output is correct
27 Correct 3 ms 2684 KB Output is correct
28 Correct 3 ms 2680 KB Output is correct
29 Correct 3 ms 2680 KB Output is correct
30 Correct 3 ms 2680 KB Output is correct
31 Correct 3 ms 2680 KB Output is correct
32 Correct 3 ms 2680 KB Output is correct
33 Correct 3 ms 2680 KB Output is correct
34 Correct 3 ms 2680 KB Output is correct
35 Correct 3 ms 2680 KB Output is correct
36 Correct 3 ms 2808 KB Output is correct
37 Correct 3 ms 2680 KB Output is correct
38 Correct 4 ms 2680 KB Output is correct
39 Correct 3 ms 2680 KB Output is correct
40 Correct 4 ms 2684 KB Output is correct
41 Correct 4 ms 2680 KB Output is correct
42 Correct 3 ms 2680 KB Output is correct
43 Correct 3 ms 2680 KB Output is correct
44 Correct 4 ms 2680 KB Output is correct
45 Correct 4 ms 2680 KB Output is correct
46 Correct 4 ms 2680 KB Output is correct
47 Correct 4 ms 2684 KB Output is correct
48 Correct 4 ms 2680 KB Output is correct
49 Correct 4 ms 2680 KB Output is correct
50 Correct 4 ms 2680 KB Output is correct
51 Correct 4 ms 2680 KB Output is correct
52 Correct 4 ms 2680 KB Output is correct
53 Correct 3 ms 2680 KB Output is correct
54 Correct 3 ms 2680 KB Output is correct
55 Correct 4 ms 2680 KB Output is correct
56 Correct 3 ms 2680 KB Output is correct
57 Correct 4 ms 2680 KB Output is correct
58 Correct 4 ms 2680 KB Output is correct
59 Correct 4 ms 2684 KB Output is correct
60 Correct 4 ms 2680 KB Output is correct
61 Correct 4 ms 2680 KB Output is correct
62 Correct 4 ms 2740 KB Output is correct
63 Correct 3 ms 2680 KB Output is correct
64 Correct 4 ms 2680 KB Output is correct
65 Correct 4 ms 2680 KB Output is correct
66 Correct 4 ms 2680 KB Output is correct
67 Correct 3 ms 2680 KB Output is correct
68 Correct 4 ms 2652 KB Output is correct
69 Correct 3 ms 2680 KB Output is correct
70 Correct 3 ms 2680 KB Output is correct
71 Correct 3 ms 2680 KB Output is correct
72 Correct 3 ms 2680 KB Output is correct
73 Correct 3 ms 2680 KB Output is correct
74 Correct 3 ms 2680 KB Output is correct
75 Correct 3 ms 2680 KB Output is correct
76 Correct 3 ms 2680 KB Output is correct
77 Correct 3 ms 2680 KB Output is correct
78 Correct 3 ms 2680 KB Output is correct
79 Correct 3 ms 2680 KB Output is correct
80 Correct 3 ms 2680 KB Output is correct
81 Correct 3 ms 2680 KB Output is correct
82 Correct 3 ms 2680 KB Output is correct
83 Correct 3 ms 2652 KB Output is correct
84 Correct 14 ms 2680 KB Output is correct
85 Correct 3 ms 2680 KB Output is correct
86 Correct 3 ms 2680 KB Output is correct
87 Correct 3 ms 2680 KB Output is correct
88 Correct 3 ms 2680 KB Output is correct
89 Correct 3 ms 2680 KB Output is correct
90 Correct 3 ms 2680 KB Output is correct
91 Correct 3 ms 2680 KB Output is correct
92 Correct 4 ms 2680 KB Output is correct
93 Correct 4 ms 2680 KB Output is correct
94 Correct 8 ms 2680 KB Output is correct
95 Correct 3 ms 2680 KB Output is correct
96 Correct 3 ms 2680 KB Output is correct
97 Correct 5 ms 2936 KB Output is correct
98 Correct 5 ms 2936 KB Output is correct
99 Correct 5 ms 2936 KB Output is correct
100 Correct 5 ms 2936 KB Output is correct
101 Correct 5 ms 2936 KB Output is correct
102 Correct 5 ms 3064 KB Output is correct
103 Correct 5 ms 3064 KB Output is correct
104 Correct 5 ms 3064 KB Output is correct
105 Correct 5 ms 3064 KB Output is correct
106 Correct 5 ms 3064 KB Output is correct
107 Correct 5 ms 3064 KB Output is correct
108 Correct 5 ms 3064 KB Output is correct
109 Correct 5 ms 3064 KB Output is correct
110 Correct 5 ms 3068 KB Output is correct
111 Correct 5 ms 3064 KB Output is correct
112 Correct 5 ms 3064 KB Output is correct
113 Correct 5 ms 3064 KB Output is correct
114 Correct 5 ms 3064 KB Output is correct
115 Correct 5 ms 3064 KB Output is correct
116 Correct 5 ms 2936 KB Output is correct
117 Correct 5 ms 2936 KB Output is correct
118 Correct 5 ms 3064 KB Output is correct
119 Correct 5 ms 3064 KB Output is correct
120 Correct 4 ms 2936 KB Output is correct
121 Correct 5 ms 2936 KB Output is correct
122 Correct 4 ms 2936 KB Output is correct
123 Correct 5 ms 2936 KB Output is correct
124 Correct 5 ms 2936 KB Output is correct
125 Correct 5 ms 2936 KB Output is correct
126 Correct 5 ms 2940 KB Output is correct
127 Correct 5 ms 2936 KB Output is correct
128 Correct 4 ms 2936 KB Output is correct
129 Correct 5 ms 3192 KB Output is correct
130 Correct 5 ms 3192 KB Output is correct
131 Correct 4 ms 3192 KB Output is correct
132 Correct 5 ms 3192 KB Output is correct
133 Correct 4 ms 2936 KB Output is correct
134 Correct 4 ms 2936 KB Output is correct
135 Correct 5 ms 2936 KB Output is correct
136 Correct 4 ms 2936 KB Output is correct
137 Correct 4 ms 2808 KB Output is correct
138 Correct 4 ms 2808 KB Output is correct
139 Correct 4 ms 2808 KB Output is correct
140 Correct 4 ms 2808 KB Output is correct
141 Correct 4 ms 2808 KB Output is correct
142 Correct 4 ms 2808 KB Output is correct
143 Correct 4 ms 2936 KB Output is correct
144 Correct 5 ms 2936 KB Output is correct
145 Correct 86 ms 10488 KB Output is correct
146 Correct 88 ms 10436 KB Output is correct
147 Correct 86 ms 9968 KB Output is correct
148 Correct 53 ms 9852 KB Output is correct
149 Correct 58 ms 9916 KB Output is correct
150 Correct 71 ms 14752 KB Output is correct
151 Correct 72 ms 14700 KB Output is correct
152 Correct 71 ms 14696 KB Output is correct
153 Correct 73 ms 14696 KB Output is correct
154 Correct 80 ms 14700 KB Output is correct
155 Correct 66 ms 13140 KB Output is correct
156 Correct 51 ms 13036 KB Output is correct
157 Correct 62 ms 13164 KB Output is correct
158 Correct 60 ms 13164 KB Output is correct
159 Correct 59 ms 13164 KB Output is correct
160 Correct 71 ms 13136 KB Output is correct
161 Correct 54 ms 13040 KB Output is correct
162 Correct 49 ms 13168 KB Output is correct
163 Correct 48 ms 13164 KB Output is correct
164 Correct 55 ms 10616 KB Output is correct
165 Correct 60 ms 12152 KB Output is correct
166 Correct 79 ms 15472 KB Output is correct
167 Correct 72 ms 15472 KB Output is correct
168 Correct 60 ms 10608 KB Output is correct
169 Correct 58 ms 10992 KB Output is correct
170 Correct 54 ms 10840 KB Output is correct
171 Correct 48 ms 10716 KB Output is correct
172 Correct 61 ms 10360 KB Output is correct
173 Correct 49 ms 10988 KB Output is correct
174 Correct 56 ms 10872 KB Output is correct
175 Correct 73 ms 10716 KB Output is correct
176 Correct 75 ms 10488 KB Output is correct
177 Correct 83 ms 17860 KB Output is correct
178 Correct 81 ms 17748 KB Output is correct
179 Correct 78 ms 17736 KB Output is correct
180 Correct 63 ms 17896 KB Output is correct
181 Correct 30 ms 9964 KB Output is correct
182 Correct 30 ms 9840 KB Output is correct
183 Correct 74 ms 12280 KB Output is correct
184 Correct 75 ms 12152 KB Output is correct
185 Correct 45 ms 8572 KB Output is correct
186 Correct 25 ms 7032 KB Output is correct
187 Correct 14 ms 4856 KB Output is correct
188 Correct 75 ms 11636 KB Output is correct
189 Correct 50 ms 9428 KB Output is correct
190 Correct 36 ms 10352 KB Output is correct
191 Correct 19 ms 7028 KB Output is correct
192 Correct 7 ms 3704 KB Output is correct