#include <bits/stdc++.h>
using namespace std;
#define fileio() freopen("input.txt","r",stdin); freopen("output.txt","w",stdout)
#define fio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define all(x) (x).begin(), (x).end()
#define allr(x) x.rbegin(), x.rend()
#define cmprs(x) sort(all(x)),x.erase(unique(all(x)),x.end())
#define endl "\n"
#define sp " "
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define rz resize
#define sz(a) (int)(a.size())
#define clr(a) a.clear()
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, ll> pil;
typedef tuple<int, int, int> tpi;
typedef tuple<ll, ll, ll> tpl;
typedef pair<double, ll> pdl;
typedef pair<double, int> pdi;
const int dx[] = {1,-1,0,0,1,1,-1,-1};
const int dy[] = {0,0,1,-1,1,-1,1,-1};
const ll MOD = 1e9+7;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const int MAX = 101010; // PLZ CHK!
int N,G[MAX],C[MAX],V[MAX],F[MAX],inc[MAX];
vector<int> IN[MAX];
vector<vector<int>> CY;
void dfs(int cur, pii &c) {
V[cur]=1;
int nxt=G[cur];
if (V[nxt]) {
if (!F[nxt]) c={nxt,cur};
}
else dfs(nxt,c);
F[cur]=1;
}
int main() {
fio();
cin>>N;
for (int i=1; i<=N; i++) {
cin>>G[i]>>C[i];
IN[G[i]].pb(C[i]);
}
for (int i=1; i<=N; i++) {
if (V[i]) continue;
pii c={-1,-1};
dfs(i,c);
if (c==pii(-1,-1)) continue;
vector<int> cy;
for (int x=c.first;; x=G[x]) {
cy.pb(x);
if (x==c.second) break;
}
for (int x:cy) inc[x]=1;
CY.pb(cy);
if (sz(cy)==N) {
cout<<0;
return 0;
}
}
for (int i=1; i<=N; i++) sort(all(IN[i]),greater<>());
ll sum=0;
for (int i=1; i<=N; i++) sum+=C[i];
for (int i=1; i<=N; i++) {
if (inc[i]||IN[i].empty()) continue;
sum-=IN[i][0];
}
ll ans=0;
for (auto cy:CY) {
ll sum=0;
for (int u:cy) sum+=IN[u][0];
ll mx=0;
for (int u:cy) {
int v=G[u];
ll t=sum;
if (IN[v][0]==C[u]) {
t-=C[u];
if (1<sz(IN[v])) t+=IN[v][1];
}
mx=max(mx,t);
}
ans+=mx;
}
cout<<sum-ans<<endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2652 KB |
Output is correct |
2 |
Correct |
2 ms |
2652 KB |
Output is correct |
3 |
Correct |
1 ms |
2664 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 |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2652 KB |
Output is correct |
9 |
Correct |
1 ms |
2652 KB |
Output is correct |
10 |
Correct |
1 ms |
2652 KB |
Output is correct |
11 |
Correct |
1 ms |
2652 KB |
Output is correct |
12 |
Correct |
1 ms |
2904 KB |
Output is correct |
13 |
Correct |
1 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2652 KB |
Output is correct |
15 |
Correct |
1 ms |
2652 KB |
Output is correct |
16 |
Correct |
1 ms |
2652 KB |
Output is correct |
17 |
Correct |
1 ms |
2836 KB |
Output is correct |
18 |
Correct |
1 ms |
2652 KB |
Output is correct |
19 |
Correct |
1 ms |
2836 KB |
Output is correct |
20 |
Correct |
1 ms |
2652 KB |
Output is correct |
21 |
Correct |
1 ms |
2652 KB |
Output is correct |
22 |
Correct |
1 ms |
2840 KB |
Output is correct |
23 |
Correct |
1 ms |
2648 KB |
Output is correct |
24 |
Correct |
1 ms |
2652 KB |
Output is correct |
25 |
Correct |
1 ms |
2652 KB |
Output is correct |
26 |
Correct |
1 ms |
2652 KB |
Output is correct |
27 |
Correct |
1 ms |
2652 KB |
Output is correct |
28 |
Correct |
1 ms |
2652 KB |
Output is correct |
29 |
Correct |
1 ms |
2648 KB |
Output is correct |
30 |
Correct |
1 ms |
2652 KB |
Output is correct |
31 |
Correct |
1 ms |
2652 KB |
Output is correct |
32 |
Correct |
1 ms |
2816 KB |
Output is correct |
33 |
Correct |
2 ms |
2652 KB |
Output is correct |
34 |
Correct |
1 ms |
2652 KB |
Output is correct |
35 |
Correct |
1 ms |
2652 KB |
Output is correct |
36 |
Correct |
1 ms |
2652 KB |
Output is correct |
37 |
Correct |
1 ms |
2652 KB |
Output is correct |
38 |
Correct |
1 ms |
2652 KB |
Output is correct |
39 |
Correct |
1 ms |
2652 KB |
Output is correct |
40 |
Correct |
1 ms |
2648 KB |
Output is correct |
41 |
Correct |
1 ms |
2652 KB |
Output is correct |
42 |
Correct |
1 ms |
2652 KB |
Output is correct |
43 |
Correct |
1 ms |
2652 KB |
Output is correct |
44 |
Correct |
1 ms |
2652 KB |
Output is correct |
45 |
Correct |
1 ms |
2652 KB |
Output is correct |
46 |
Correct |
1 ms |
2652 KB |
Output is correct |
47 |
Correct |
1 ms |
2648 KB |
Output is correct |
48 |
Correct |
1 ms |
2652 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2652 KB |
Output is correct |
2 |
Correct |
2 ms |
2652 KB |
Output is correct |
3 |
Correct |
1 ms |
2664 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 |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2652 KB |
Output is correct |
9 |
Correct |
1 ms |
2652 KB |
Output is correct |
10 |
Correct |
1 ms |
2652 KB |
Output is correct |
11 |
Correct |
1 ms |
2652 KB |
Output is correct |
12 |
Correct |
1 ms |
2904 KB |
Output is correct |
13 |
Correct |
1 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2652 KB |
Output is correct |
15 |
Correct |
1 ms |
2652 KB |
Output is correct |
16 |
Correct |
1 ms |
2652 KB |
Output is correct |
17 |
Correct |
1 ms |
2836 KB |
Output is correct |
18 |
Correct |
1 ms |
2652 KB |
Output is correct |
19 |
Correct |
1 ms |
2836 KB |
Output is correct |
20 |
Correct |
1 ms |
2652 KB |
Output is correct |
21 |
Correct |
1 ms |
2652 KB |
Output is correct |
22 |
Correct |
1 ms |
2840 KB |
Output is correct |
23 |
Correct |
1 ms |
2648 KB |
Output is correct |
24 |
Correct |
1 ms |
2652 KB |
Output is correct |
25 |
Correct |
1 ms |
2652 KB |
Output is correct |
26 |
Correct |
1 ms |
2652 KB |
Output is correct |
27 |
Correct |
1 ms |
2652 KB |
Output is correct |
28 |
Correct |
1 ms |
2652 KB |
Output is correct |
29 |
Correct |
1 ms |
2648 KB |
Output is correct |
30 |
Correct |
1 ms |
2652 KB |
Output is correct |
31 |
Correct |
1 ms |
2652 KB |
Output is correct |
32 |
Correct |
1 ms |
2816 KB |
Output is correct |
33 |
Correct |
2 ms |
2652 KB |
Output is correct |
34 |
Correct |
1 ms |
2652 KB |
Output is correct |
35 |
Correct |
1 ms |
2652 KB |
Output is correct |
36 |
Correct |
1 ms |
2652 KB |
Output is correct |
37 |
Correct |
1 ms |
2652 KB |
Output is correct |
38 |
Correct |
1 ms |
2652 KB |
Output is correct |
39 |
Correct |
1 ms |
2652 KB |
Output is correct |
40 |
Correct |
1 ms |
2648 KB |
Output is correct |
41 |
Correct |
1 ms |
2652 KB |
Output is correct |
42 |
Correct |
1 ms |
2652 KB |
Output is correct |
43 |
Correct |
1 ms |
2652 KB |
Output is correct |
44 |
Correct |
1 ms |
2652 KB |
Output is correct |
45 |
Correct |
1 ms |
2652 KB |
Output is correct |
46 |
Correct |
1 ms |
2652 KB |
Output is correct |
47 |
Correct |
1 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 |
2652 KB |
Output is correct |
52 |
Correct |
1 ms |
2652 KB |
Output is correct |
53 |
Correct |
1 ms |
2652 KB |
Output is correct |
54 |
Correct |
1 ms |
2652 KB |
Output is correct |
55 |
Correct |
1 ms |
2652 KB |
Output is correct |
56 |
Correct |
1 ms |
2652 KB |
Output is correct |
57 |
Correct |
1 ms |
2652 KB |
Output is correct |
58 |
Correct |
1 ms |
2652 KB |
Output is correct |
59 |
Correct |
1 ms |
2840 KB |
Output is correct |
60 |
Correct |
1 ms |
2652 KB |
Output is correct |
61 |
Correct |
2 ms |
2652 KB |
Output is correct |
62 |
Correct |
1 ms |
2652 KB |
Output is correct |
63 |
Correct |
2 ms |
2648 KB |
Output is correct |
64 |
Correct |
1 ms |
2648 KB |
Output is correct |
65 |
Correct |
1 ms |
2656 KB |
Output is correct |
66 |
Correct |
1 ms |
2652 KB |
Output is correct |
67 |
Correct |
1 ms |
2652 KB |
Output is correct |
68 |
Correct |
1 ms |
2652 KB |
Output is correct |
69 |
Correct |
1 ms |
2652 KB |
Output is correct |
70 |
Correct |
1 ms |
2652 KB |
Output is correct |
71 |
Correct |
1 ms |
2652 KB |
Output is correct |
72 |
Correct |
1 ms |
2652 KB |
Output is correct |
73 |
Correct |
1 ms |
2652 KB |
Output is correct |
74 |
Correct |
1 ms |
2652 KB |
Output is correct |
75 |
Correct |
1 ms |
2652 KB |
Output is correct |
76 |
Correct |
1 ms |
2656 KB |
Output is correct |
77 |
Correct |
1 ms |
2648 KB |
Output is correct |
78 |
Correct |
1 ms |
2648 KB |
Output is correct |
79 |
Correct |
1 ms |
2648 KB |
Output is correct |
80 |
Correct |
1 ms |
2652 KB |
Output is correct |
81 |
Correct |
1 ms |
2652 KB |
Output is correct |
82 |
Correct |
2 ms |
2648 KB |
Output is correct |
83 |
Correct |
1 ms |
2652 KB |
Output is correct |
84 |
Correct |
1 ms |
2652 KB |
Output is correct |
85 |
Correct |
1 ms |
2652 KB |
Output is correct |
86 |
Correct |
1 ms |
2652 KB |
Output is correct |
87 |
Correct |
1 ms |
2652 KB |
Output is correct |
88 |
Correct |
1 ms |
2652 KB |
Output is correct |
89 |
Correct |
1 ms |
2908 KB |
Output is correct |
90 |
Correct |
1 ms |
2652 KB |
Output is correct |
91 |
Correct |
1 ms |
2652 KB |
Output is correct |
92 |
Correct |
1 ms |
2652 KB |
Output is correct |
93 |
Correct |
1 ms |
2652 KB |
Output is correct |
94 |
Correct |
1 ms |
2652 KB |
Output is correct |
95 |
Correct |
1 ms |
2652 KB |
Output is correct |
96 |
Correct |
2 ms |
2652 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2652 KB |
Output is correct |
2 |
Correct |
2 ms |
2652 KB |
Output is correct |
3 |
Correct |
1 ms |
2664 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 |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2652 KB |
Output is correct |
9 |
Correct |
1 ms |
2652 KB |
Output is correct |
10 |
Correct |
1 ms |
2652 KB |
Output is correct |
11 |
Correct |
1 ms |
2652 KB |
Output is correct |
12 |
Correct |
1 ms |
2904 KB |
Output is correct |
13 |
Correct |
1 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2652 KB |
Output is correct |
15 |
Correct |
1 ms |
2652 KB |
Output is correct |
16 |
Correct |
1 ms |
2652 KB |
Output is correct |
17 |
Correct |
1 ms |
2836 KB |
Output is correct |
18 |
Correct |
1 ms |
2652 KB |
Output is correct |
19 |
Correct |
1 ms |
2836 KB |
Output is correct |
20 |
Correct |
1 ms |
2652 KB |
Output is correct |
21 |
Correct |
1 ms |
2652 KB |
Output is correct |
22 |
Correct |
1 ms |
2840 KB |
Output is correct |
23 |
Correct |
1 ms |
2648 KB |
Output is correct |
24 |
Correct |
1 ms |
2652 KB |
Output is correct |
25 |
Correct |
1 ms |
2652 KB |
Output is correct |
26 |
Correct |
1 ms |
2652 KB |
Output is correct |
27 |
Correct |
1 ms |
2652 KB |
Output is correct |
28 |
Correct |
1 ms |
2652 KB |
Output is correct |
29 |
Correct |
1 ms |
2648 KB |
Output is correct |
30 |
Correct |
1 ms |
2652 KB |
Output is correct |
31 |
Correct |
1 ms |
2652 KB |
Output is correct |
32 |
Correct |
1 ms |
2816 KB |
Output is correct |
33 |
Correct |
2 ms |
2652 KB |
Output is correct |
34 |
Correct |
1 ms |
2652 KB |
Output is correct |
35 |
Correct |
1 ms |
2652 KB |
Output is correct |
36 |
Correct |
1 ms |
2652 KB |
Output is correct |
37 |
Correct |
1 ms |
2652 KB |
Output is correct |
38 |
Correct |
1 ms |
2652 KB |
Output is correct |
39 |
Correct |
1 ms |
2652 KB |
Output is correct |
40 |
Correct |
1 ms |
2648 KB |
Output is correct |
41 |
Correct |
1 ms |
2652 KB |
Output is correct |
42 |
Correct |
1 ms |
2652 KB |
Output is correct |
43 |
Correct |
1 ms |
2652 KB |
Output is correct |
44 |
Correct |
1 ms |
2652 KB |
Output is correct |
45 |
Correct |
1 ms |
2652 KB |
Output is correct |
46 |
Correct |
1 ms |
2652 KB |
Output is correct |
47 |
Correct |
1 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 |
2652 KB |
Output is correct |
52 |
Correct |
1 ms |
2652 KB |
Output is correct |
53 |
Correct |
1 ms |
2652 KB |
Output is correct |
54 |
Correct |
1 ms |
2652 KB |
Output is correct |
55 |
Correct |
1 ms |
2652 KB |
Output is correct |
56 |
Correct |
1 ms |
2652 KB |
Output is correct |
57 |
Correct |
1 ms |
2652 KB |
Output is correct |
58 |
Correct |
1 ms |
2652 KB |
Output is correct |
59 |
Correct |
1 ms |
2840 KB |
Output is correct |
60 |
Correct |
1 ms |
2652 KB |
Output is correct |
61 |
Correct |
2 ms |
2652 KB |
Output is correct |
62 |
Correct |
1 ms |
2652 KB |
Output is correct |
63 |
Correct |
2 ms |
2648 KB |
Output is correct |
64 |
Correct |
1 ms |
2648 KB |
Output is correct |
65 |
Correct |
1 ms |
2656 KB |
Output is correct |
66 |
Correct |
1 ms |
2652 KB |
Output is correct |
67 |
Correct |
1 ms |
2652 KB |
Output is correct |
68 |
Correct |
1 ms |
2652 KB |
Output is correct |
69 |
Correct |
1 ms |
2652 KB |
Output is correct |
70 |
Correct |
1 ms |
2652 KB |
Output is correct |
71 |
Correct |
1 ms |
2652 KB |
Output is correct |
72 |
Correct |
1 ms |
2652 KB |
Output is correct |
73 |
Correct |
1 ms |
2652 KB |
Output is correct |
74 |
Correct |
1 ms |
2652 KB |
Output is correct |
75 |
Correct |
1 ms |
2652 KB |
Output is correct |
76 |
Correct |
1 ms |
2656 KB |
Output is correct |
77 |
Correct |
1 ms |
2648 KB |
Output is correct |
78 |
Correct |
1 ms |
2648 KB |
Output is correct |
79 |
Correct |
1 ms |
2648 KB |
Output is correct |
80 |
Correct |
1 ms |
2652 KB |
Output is correct |
81 |
Correct |
1 ms |
2652 KB |
Output is correct |
82 |
Correct |
2 ms |
2648 KB |
Output is correct |
83 |
Correct |
1 ms |
2652 KB |
Output is correct |
84 |
Correct |
1 ms |
2652 KB |
Output is correct |
85 |
Correct |
1 ms |
2652 KB |
Output is correct |
86 |
Correct |
1 ms |
2652 KB |
Output is correct |
87 |
Correct |
1 ms |
2652 KB |
Output is correct |
88 |
Correct |
1 ms |
2652 KB |
Output is correct |
89 |
Correct |
1 ms |
2908 KB |
Output is correct |
90 |
Correct |
1 ms |
2652 KB |
Output is correct |
91 |
Correct |
1 ms |
2652 KB |
Output is correct |
92 |
Correct |
1 ms |
2652 KB |
Output is correct |
93 |
Correct |
1 ms |
2652 KB |
Output is correct |
94 |
Correct |
1 ms |
2652 KB |
Output is correct |
95 |
Correct |
1 ms |
2652 KB |
Output is correct |
96 |
Correct |
2 ms |
2652 KB |
Output is correct |
97 |
Correct |
2 ms |
2908 KB |
Output is correct |
98 |
Correct |
2 ms |
2908 KB |
Output is correct |
99 |
Correct |
2 ms |
2908 KB |
Output is correct |
100 |
Correct |
2 ms |
2908 KB |
Output is correct |
101 |
Correct |
2 ms |
2908 KB |
Output is correct |
102 |
Correct |
2 ms |
2908 KB |
Output is correct |
103 |
Correct |
2 ms |
2908 KB |
Output is correct |
104 |
Correct |
2 ms |
2908 KB |
Output is correct |
105 |
Correct |
2 ms |
2908 KB |
Output is correct |
106 |
Correct |
2 ms |
2908 KB |
Output is correct |
107 |
Correct |
2 ms |
2908 KB |
Output is correct |
108 |
Correct |
3 ms |
2908 KB |
Output is correct |
109 |
Correct |
2 ms |
2908 KB |
Output is correct |
110 |
Correct |
2 ms |
2908 KB |
Output is correct |
111 |
Correct |
2 ms |
2908 KB |
Output is correct |
112 |
Correct |
2 ms |
2908 KB |
Output is correct |
113 |
Correct |
2 ms |
2908 KB |
Output is correct |
114 |
Correct |
2 ms |
2908 KB |
Output is correct |
115 |
Correct |
2 ms |
2852 KB |
Output is correct |
116 |
Correct |
2 ms |
2908 KB |
Output is correct |
117 |
Correct |
2 ms |
2908 KB |
Output is correct |
118 |
Correct |
2 ms |
2848 KB |
Output is correct |
119 |
Correct |
2 ms |
2908 KB |
Output is correct |
120 |
Correct |
2 ms |
2908 KB |
Output is correct |
121 |
Correct |
2 ms |
3160 KB |
Output is correct |
122 |
Correct |
2 ms |
2908 KB |
Output is correct |
123 |
Correct |
2 ms |
2908 KB |
Output is correct |
124 |
Correct |
2 ms |
2908 KB |
Output is correct |
125 |
Correct |
2 ms |
2908 KB |
Output is correct |
126 |
Correct |
2 ms |
2904 KB |
Output is correct |
127 |
Correct |
1 ms |
2908 KB |
Output is correct |
128 |
Correct |
1 ms |
2908 KB |
Output is correct |
129 |
Correct |
2 ms |
2908 KB |
Output is correct |
130 |
Correct |
2 ms |
2852 KB |
Output is correct |
131 |
Correct |
2 ms |
2908 KB |
Output is correct |
132 |
Correct |
3 ms |
2908 KB |
Output is correct |
133 |
Correct |
2 ms |
2908 KB |
Output is correct |
134 |
Correct |
2 ms |
2852 KB |
Output is correct |
135 |
Correct |
2 ms |
2932 KB |
Output is correct |
136 |
Correct |
2 ms |
2908 KB |
Output is correct |
137 |
Correct |
2 ms |
2908 KB |
Output is correct |
138 |
Correct |
1 ms |
2652 KB |
Output is correct |
139 |
Correct |
1 ms |
2908 KB |
Output is correct |
140 |
Correct |
1 ms |
3148 KB |
Output is correct |
141 |
Correct |
2 ms |
2908 KB |
Output is correct |
142 |
Correct |
1 ms |
2908 KB |
Output is correct |
143 |
Correct |
1 ms |
2908 KB |
Output is correct |
144 |
Correct |
1 ms |
2908 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2652 KB |
Output is correct |
2 |
Correct |
2 ms |
2652 KB |
Output is correct |
3 |
Correct |
1 ms |
2664 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 |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2652 KB |
Output is correct |
9 |
Correct |
1 ms |
2652 KB |
Output is correct |
10 |
Correct |
1 ms |
2652 KB |
Output is correct |
11 |
Correct |
1 ms |
2652 KB |
Output is correct |
12 |
Correct |
1 ms |
2904 KB |
Output is correct |
13 |
Correct |
1 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2652 KB |
Output is correct |
15 |
Correct |
1 ms |
2652 KB |
Output is correct |
16 |
Correct |
1 ms |
2652 KB |
Output is correct |
17 |
Correct |
1 ms |
2836 KB |
Output is correct |
18 |
Correct |
1 ms |
2652 KB |
Output is correct |
19 |
Correct |
1 ms |
2836 KB |
Output is correct |
20 |
Correct |
1 ms |
2652 KB |
Output is correct |
21 |
Correct |
1 ms |
2652 KB |
Output is correct |
22 |
Correct |
1 ms |
2840 KB |
Output is correct |
23 |
Correct |
1 ms |
2648 KB |
Output is correct |
24 |
Correct |
1 ms |
2652 KB |
Output is correct |
25 |
Correct |
1 ms |
2652 KB |
Output is correct |
26 |
Correct |
1 ms |
2652 KB |
Output is correct |
27 |
Correct |
1 ms |
2652 KB |
Output is correct |
28 |
Correct |
1 ms |
2652 KB |
Output is correct |
29 |
Correct |
1 ms |
2648 KB |
Output is correct |
30 |
Correct |
1 ms |
2652 KB |
Output is correct |
31 |
Correct |
1 ms |
2652 KB |
Output is correct |
32 |
Correct |
1 ms |
2816 KB |
Output is correct |
33 |
Correct |
2 ms |
2652 KB |
Output is correct |
34 |
Correct |
1 ms |
2652 KB |
Output is correct |
35 |
Correct |
1 ms |
2652 KB |
Output is correct |
36 |
Correct |
1 ms |
2652 KB |
Output is correct |
37 |
Correct |
1 ms |
2652 KB |
Output is correct |
38 |
Correct |
1 ms |
2652 KB |
Output is correct |
39 |
Correct |
1 ms |
2652 KB |
Output is correct |
40 |
Correct |
1 ms |
2648 KB |
Output is correct |
41 |
Correct |
1 ms |
2652 KB |
Output is correct |
42 |
Correct |
1 ms |
2652 KB |
Output is correct |
43 |
Correct |
1 ms |
2652 KB |
Output is correct |
44 |
Correct |
1 ms |
2652 KB |
Output is correct |
45 |
Correct |
1 ms |
2652 KB |
Output is correct |
46 |
Correct |
1 ms |
2652 KB |
Output is correct |
47 |
Correct |
1 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 |
2652 KB |
Output is correct |
52 |
Correct |
1 ms |
2652 KB |
Output is correct |
53 |
Correct |
1 ms |
2652 KB |
Output is correct |
54 |
Correct |
1 ms |
2652 KB |
Output is correct |
55 |
Correct |
1 ms |
2652 KB |
Output is correct |
56 |
Correct |
1 ms |
2652 KB |
Output is correct |
57 |
Correct |
1 ms |
2652 KB |
Output is correct |
58 |
Correct |
1 ms |
2652 KB |
Output is correct |
59 |
Correct |
1 ms |
2840 KB |
Output is correct |
60 |
Correct |
1 ms |
2652 KB |
Output is correct |
61 |
Correct |
2 ms |
2652 KB |
Output is correct |
62 |
Correct |
1 ms |
2652 KB |
Output is correct |
63 |
Correct |
2 ms |
2648 KB |
Output is correct |
64 |
Correct |
1 ms |
2648 KB |
Output is correct |
65 |
Correct |
1 ms |
2656 KB |
Output is correct |
66 |
Correct |
1 ms |
2652 KB |
Output is correct |
67 |
Correct |
1 ms |
2652 KB |
Output is correct |
68 |
Correct |
1 ms |
2652 KB |
Output is correct |
69 |
Correct |
1 ms |
2652 KB |
Output is correct |
70 |
Correct |
1 ms |
2652 KB |
Output is correct |
71 |
Correct |
1 ms |
2652 KB |
Output is correct |
72 |
Correct |
1 ms |
2652 KB |
Output is correct |
73 |
Correct |
1 ms |
2652 KB |
Output is correct |
74 |
Correct |
1 ms |
2652 KB |
Output is correct |
75 |
Correct |
1 ms |
2652 KB |
Output is correct |
76 |
Correct |
1 ms |
2656 KB |
Output is correct |
77 |
Correct |
1 ms |
2648 KB |
Output is correct |
78 |
Correct |
1 ms |
2648 KB |
Output is correct |
79 |
Correct |
1 ms |
2648 KB |
Output is correct |
80 |
Correct |
1 ms |
2652 KB |
Output is correct |
81 |
Correct |
1 ms |
2652 KB |
Output is correct |
82 |
Correct |
2 ms |
2648 KB |
Output is correct |
83 |
Correct |
1 ms |
2652 KB |
Output is correct |
84 |
Correct |
1 ms |
2652 KB |
Output is correct |
85 |
Correct |
1 ms |
2652 KB |
Output is correct |
86 |
Correct |
1 ms |
2652 KB |
Output is correct |
87 |
Correct |
1 ms |
2652 KB |
Output is correct |
88 |
Correct |
1 ms |
2652 KB |
Output is correct |
89 |
Correct |
1 ms |
2908 KB |
Output is correct |
90 |
Correct |
1 ms |
2652 KB |
Output is correct |
91 |
Correct |
1 ms |
2652 KB |
Output is correct |
92 |
Correct |
1 ms |
2652 KB |
Output is correct |
93 |
Correct |
1 ms |
2652 KB |
Output is correct |
94 |
Correct |
1 ms |
2652 KB |
Output is correct |
95 |
Correct |
1 ms |
2652 KB |
Output is correct |
96 |
Correct |
2 ms |
2652 KB |
Output is correct |
97 |
Correct |
2 ms |
2908 KB |
Output is correct |
98 |
Correct |
2 ms |
2908 KB |
Output is correct |
99 |
Correct |
2 ms |
2908 KB |
Output is correct |
100 |
Correct |
2 ms |
2908 KB |
Output is correct |
101 |
Correct |
2 ms |
2908 KB |
Output is correct |
102 |
Correct |
2 ms |
2908 KB |
Output is correct |
103 |
Correct |
2 ms |
2908 KB |
Output is correct |
104 |
Correct |
2 ms |
2908 KB |
Output is correct |
105 |
Correct |
2 ms |
2908 KB |
Output is correct |
106 |
Correct |
2 ms |
2908 KB |
Output is correct |
107 |
Correct |
2 ms |
2908 KB |
Output is correct |
108 |
Correct |
3 ms |
2908 KB |
Output is correct |
109 |
Correct |
2 ms |
2908 KB |
Output is correct |
110 |
Correct |
2 ms |
2908 KB |
Output is correct |
111 |
Correct |
2 ms |
2908 KB |
Output is correct |
112 |
Correct |
2 ms |
2908 KB |
Output is correct |
113 |
Correct |
2 ms |
2908 KB |
Output is correct |
114 |
Correct |
2 ms |
2908 KB |
Output is correct |
115 |
Correct |
2 ms |
2852 KB |
Output is correct |
116 |
Correct |
2 ms |
2908 KB |
Output is correct |
117 |
Correct |
2 ms |
2908 KB |
Output is correct |
118 |
Correct |
2 ms |
2848 KB |
Output is correct |
119 |
Correct |
2 ms |
2908 KB |
Output is correct |
120 |
Correct |
2 ms |
2908 KB |
Output is correct |
121 |
Correct |
2 ms |
3160 KB |
Output is correct |
122 |
Correct |
2 ms |
2908 KB |
Output is correct |
123 |
Correct |
2 ms |
2908 KB |
Output is correct |
124 |
Correct |
2 ms |
2908 KB |
Output is correct |
125 |
Correct |
2 ms |
2908 KB |
Output is correct |
126 |
Correct |
2 ms |
2904 KB |
Output is correct |
127 |
Correct |
1 ms |
2908 KB |
Output is correct |
128 |
Correct |
1 ms |
2908 KB |
Output is correct |
129 |
Correct |
2 ms |
2908 KB |
Output is correct |
130 |
Correct |
2 ms |
2852 KB |
Output is correct |
131 |
Correct |
2 ms |
2908 KB |
Output is correct |
132 |
Correct |
3 ms |
2908 KB |
Output is correct |
133 |
Correct |
2 ms |
2908 KB |
Output is correct |
134 |
Correct |
2 ms |
2852 KB |
Output is correct |
135 |
Correct |
2 ms |
2932 KB |
Output is correct |
136 |
Correct |
2 ms |
2908 KB |
Output is correct |
137 |
Correct |
2 ms |
2908 KB |
Output is correct |
138 |
Correct |
1 ms |
2652 KB |
Output is correct |
139 |
Correct |
1 ms |
2908 KB |
Output is correct |
140 |
Correct |
1 ms |
3148 KB |
Output is correct |
141 |
Correct |
2 ms |
2908 KB |
Output is correct |
142 |
Correct |
1 ms |
2908 KB |
Output is correct |
143 |
Correct |
1 ms |
2908 KB |
Output is correct |
144 |
Correct |
1 ms |
2908 KB |
Output is correct |
145 |
Correct |
23 ms |
8276 KB |
Output is correct |
146 |
Correct |
26 ms |
8228 KB |
Output is correct |
147 |
Correct |
23 ms |
8280 KB |
Output is correct |
148 |
Correct |
29 ms |
8272 KB |
Output is correct |
149 |
Correct |
26 ms |
8280 KB |
Output is correct |
150 |
Correct |
24 ms |
11736 KB |
Output is correct |
151 |
Correct |
25 ms |
11744 KB |
Output is correct |
152 |
Correct |
25 ms |
11924 KB |
Output is correct |
153 |
Correct |
25 ms |
11736 KB |
Output is correct |
154 |
Correct |
27 ms |
11764 KB |
Output is correct |
155 |
Correct |
24 ms |
9124 KB |
Output is correct |
156 |
Correct |
25 ms |
9172 KB |
Output is correct |
157 |
Correct |
24 ms |
9180 KB |
Output is correct |
158 |
Correct |
27 ms |
9084 KB |
Output is correct |
159 |
Correct |
24 ms |
9168 KB |
Output is correct |
160 |
Correct |
25 ms |
9172 KB |
Output is correct |
161 |
Correct |
27 ms |
9168 KB |
Output is correct |
162 |
Correct |
21 ms |
8412 KB |
Output is correct |
163 |
Correct |
20 ms |
8428 KB |
Output is correct |
164 |
Correct |
28 ms |
12112 KB |
Output is correct |
165 |
Correct |
28 ms |
12004 KB |
Output is correct |
166 |
Correct |
24 ms |
10772 KB |
Output is correct |
167 |
Correct |
24 ms |
10720 KB |
Output is correct |
168 |
Correct |
22 ms |
7516 KB |
Output is correct |
169 |
Correct |
18 ms |
7524 KB |
Output is correct |
170 |
Correct |
18 ms |
7332 KB |
Output is correct |
171 |
Correct |
18 ms |
7516 KB |
Output is correct |
172 |
Correct |
18 ms |
7260 KB |
Output is correct |
173 |
Correct |
18 ms |
7392 KB |
Output is correct |
174 |
Correct |
19 ms |
7516 KB |
Output is correct |
175 |
Correct |
18 ms |
7388 KB |
Output is correct |
176 |
Correct |
18 ms |
7376 KB |
Output is correct |
177 |
Correct |
21 ms |
10964 KB |
Output is correct |
178 |
Correct |
23 ms |
10960 KB |
Output is correct |
179 |
Correct |
22 ms |
10956 KB |
Output is correct |
180 |
Correct |
22 ms |
10960 KB |
Output is correct |
181 |
Correct |
20 ms |
6308 KB |
Output is correct |
182 |
Correct |
26 ms |
6364 KB |
Output is correct |
183 |
Correct |
23 ms |
9820 KB |
Output is correct |
184 |
Correct |
24 ms |
9724 KB |
Output is correct |
185 |
Correct |
15 ms |
6488 KB |
Output is correct |
186 |
Correct |
11 ms |
5468 KB |
Output is correct |
187 |
Correct |
6 ms |
4128 KB |
Output is correct |
188 |
Correct |
22 ms |
8280 KB |
Output is correct |
189 |
Correct |
19 ms |
6744 KB |
Output is correct |
190 |
Correct |
13 ms |
7900 KB |
Output is correct |
191 |
Correct |
10 ms |
5540 KB |
Output is correct |
192 |
Correct |
2 ms |
3416 KB |
Output is correct |