#define DEBUG 0
#include <bits/stdc++.h>
using namespace std;
#if DEBUG
// basic debugging macros
int __i__,__j__;
#define printLine(l) for(__i__=0;__i__<l;__i__++){cout<<"-";}cout<<endl
#define printLine2(l,c) for(__i__=0;__i__<l;__i__++){cout<<c;}cout<<endl
#define printVar(n) cout<<#n<<": "<<n<<endl
#define printArr(a,l) cout<<#a<<": ";for(__i__=0;__i__<l;__i__++){cout<<a[__i__]<<" ";}cout<<endl
#define print2dArr(a,r,c) cout<<#a<<":\n";for(__i__=0;__i__<r;__i__++){for(__j__=0;__j__<c;__j__++){cout<<a[__i__][__j__]<<" ";}cout<<endl;}
#define print2dArr2(a,r,c,l) cout<<#a<<":\n";for(__i__=0;__i__<r;__i__++){for(__j__=0;__j__<c;__j__++){cout<<setw(l)<<setfill(' ')<<a[__i__][__j__]<<" ";}cout<<endl;}
// advanced debugging class
// debug 1,2,'A',"test";
class _Debug {
public:
template<typename T>
_Debug& operator,(T val) {
cout << val << endl;
return *this;
}
};
#define debug _Debug(),
#else
#define printLine(l)
#define printLine2(l,c)
#define printVar(n)
#define printArr(a,l)
#define print2dArr(a,r,c)
#define print2dArr2(a,r,c,l)
#define debug
#endif
// define
#define MAX_VAL 999999999
#define MAX_VAL_2 999999999999999999LL
#define EPS 1e-6
#define mp make_pair
#define pb push_back
// typedef
typedef unsigned int UI;
typedef long long int LLI;
typedef unsigned long long int ULLI;
typedef unsigned short int US;
typedef pair<int,int> pii;
typedef pair<LLI,LLI> plli;
typedef vector<int> vi;
typedef vector<LLI> vlli;
typedef vector<pii> vpii;
typedef vector<plli> vplli;
// ---------- END OF TEMPLATE ----------
int N,M;
struct edge { int u,v,w; };
vector<edge> edges;
int opp(int a,int b) {
return ((a < 2*M) && (b < 2*M) && ((a^b) == 1));
}
int X[100000];
int num;
vpii adjList[10000];
vi nodes;
int tree[1 << 12];
int build(int s,int e,int i) {
if (s == e) return 0;
int mid = (s+e) / 2;
build(s,mid,2*i+1),build(mid+1,e,2*i+2);
tree[i] = num++;
if (s == mid) adjList[tree[i]].pb(mp(nodes[s],edges[nodes[s]].w));
else adjList[tree[i]].pb(mp(tree[2*i+1],0));
if (mid+1 == e) adjList[tree[i]].pb(mp(nodes[e],edges[nodes[e]].w));
else adjList[tree[i]].pb(mp(tree[2*i+2],0));
return 0;
}
int add(int s,int e,int as,int ae,int i,int u) {
if ((s > ae) || (e < as)) return 0;
else if ((s >= as) && (e <= ae)) {
if (s == e) adjList[u].pb(mp(nodes[s],edges[nodes[s]].w));
else adjList[u].pb(mp(tree[i],0));
return 0;
}
int mid = (s+e) / 2;
add(s,mid,as,ae,2*i+1,u),add(mid+1,e,as,ae,2*i+2,u);
return 0;
}
priority_queue<pair<LLI,int> > H;
LLI dist2[10000];
LLI dist[4000][4000];
struct path { int eu,ev; LLI d; };
bool comp(path a,path b) {
return a.d < b.d;
}
vector<path> paths[2001][2001];
int shorten(vector<path> &v) {
int i;
vector<path> v2;
sort(v.begin(),v.end(),comp);
while (!v.empty() && (v.back().d > 1e17)) v.pop_back();
if (v.empty()) return 0;
v2.pb(v[0]);
int m1 = -1,m2 = -1;
for (i = 1; i < v.size(); i++) {
if (v[i].eu != v[0].eu) {
if (m1 == -1) m1 = i;
else if ((m2 == -1) && (v[i].ev != v[m1].ev)) m2 = i;
}
}
if (m1 != -1) v2.pb(v[m1]),m1 = -1;
if (m2 != -1) v2.pb(v[m2]),m2 = -1;
for (i = 1; i < v.size(); i++) {
if (v[i].ev != v[0].ev) {
if (m1 == -1) m1 = i;
else if ((m2 == -1) && (v[i].eu != v[m1].eu)) m2 = i;
}
}
if (m1 != -1) v2.pb(v[m1]),m1 = -1;
if (m2 != -1) v2.pb(v[m2]),m2 = -1;
v.clear(),v = v2;
sort(v.begin(),v.end(),comp);
v.shrink_to_fit();
return 0;
}
vector<path> com(vector<path> a,vector<path> b) {
int i,j;
vector<path> c;
for (i = 0; i < a.size(); i++) {
for (j = 0; j < b.size(); j++) {
if (!opp(a[i].ev,b[j].eu)) c.pb((path){a[i].eu,b[j].ev,a[i].d+b[j].d});
}
}
shorten(c);
return c;
}
vector<path> tree2[1 << 18];
int build2(int s,int e,int i) {
if (s == e) {
tree2[i] = paths[(s == 0) ? N:X[s-1]][X[s]];
return 0;
}
int mid = (s+e) / 2;
build2(s,mid,2*i+1),build2(mid+1,e,2*i+2);
tree2[i] = com(tree2[2*i+1],tree2[2*i+2]);
return 0;
}
int update2(int s,int e,int ai,int i) {
if ((s > ai) || (e < ai)) return 0;
else if (s == e) {
tree2[i].clear();
tree2[i] = paths[(s == 0) ? N:X[s-1]][X[s]];
return 0;
}
int mid = (s+e) / 2;
update2(s,mid,ai,2*i+1),update2(mid+1,e,ai,2*i+2);
tree2[i] = com(tree2[2*i+1],tree2[2*i+2]);
return 0;
}
int main() {
int i;
int T,L;
int A,B,C,P,Q;
scanf("%d %d %d %d",&N,&M,&T,&L);
for (i = 0; i < M; i++) {
scanf("%d %d %d",&A,&B,&C);
A--,B--;
edges.pb((edge){A,B,C});
edges.pb((edge){B,A,C});
}
for (i = 0; i < L; i++) scanf("%d",&X[i]),X[i]--;
int j,k;
num = edges.size();
for (i = 0; i < N; i++) {
vi v;
for (j = 0; j < edges.size(); j++) {
if (edges[j].u == i) nodes.pb(j);
if (edges[j].v == i) v.pb(j);
}
build(0,(int) nodes.size()-1,0);
for (j = 0; j < v.size(); j++) {
for (k = 0; k < nodes.size(); k++) {
if (edges[nodes[k]].v == edges[v[j]].u) break;
}
if (k < nodes.size()) {
add(0,(int) nodes.size()-1,0,k-1,0,v[j]);
add(0,(int) nodes.size()-1,k+1,(int) nodes.size()-1,0,v[j]);
}
else add(0,(int) nodes.size()-1,0,(int) nodes.size()-1,0,v[j]);
}
nodes.clear();
}
for (i = 0; i < edges.size(); i++) {
for (j = 0; j < num; j++) dist2[j] = 1e18;
dist2[i] = 0,H.push(mp(0,i));
while (!H.empty()) {
int u = H.top().second;
LLI d = -H.top().first;
H.pop();
if (d > dist2[u]) continue;
for (j = 0; j < adjList[u].size(); j++) {
int v = adjList[u][j].first;
if (d+adjList[u][j].second < dist2[v]) {
dist2[v] = d+adjList[u][j].second;
H.push(mp(-dist2[v],v));
}
}
}
for (j = 0; j < edges.size(); j++) dist[i][j] = dist2[j];
}
for (i = 0; i < num; i++) adjList[i].clear(),adjList[i].shrink_to_fit();
for (i = 0; i < edges.size(); i++) {
for (j = 0; j < edges.size(); j++) {
if ((edges[i].u != edges[j].v) && (dist[i][j] < 1e18))
paths[edges[i].u][edges[j].v].pb((path){i,j,dist[i][j]+edges[i].w});
}
}
for (i = 0; i < N; i++) paths[N][i].pb((path){2*M+i,2*M+i,0});
for (i = 0; i <= N; i++) {
for (j = 0; j <= N; j++) shorten(paths[i][j]);
}
build2(0,L-1,0);
for (i = 0; i < T; i++) {
scanf("%d %d",&P,&Q);
P--,Q--,X[P] = Q;
update2(0,L-1,P,0);
if (P < L-1) update2(0,L-1,P+1,0);
if (tree2[0].empty()) printf("-1\n");
else printf("%lld\n",tree2[0][0].d);
}
return 0;
}
Compilation message
wild_boar.cpp: In function 'int shorten(std::vector<path>&)':
wild_boar.cpp:109:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 1; i < v.size(); i++) {
~~^~~~~~~~~~
wild_boar.cpp:117:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 1; i < v.size(); i++) {
~~^~~~~~~~~~
wild_boar.cpp: In function 'std::vector<path> com(std::vector<path>, std::vector<path>)':
wild_boar.cpp:133:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < a.size(); i++) {
~~^~~~~~~~~~
wild_boar.cpp:134:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0; j < b.size(); j++) {
~~^~~~~~~~~~
wild_boar.cpp: In function 'int main()':
wild_boar.cpp:183:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0; j < edges.size(); j++) {
~~^~~~~~~~~~~~~~
wild_boar.cpp:188:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0; j < v.size(); j++) {
~~^~~~~~~~~~
wild_boar.cpp:189:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (k = 0; k < nodes.size(); k++) {
~~^~~~~~~~~~~~~~
wild_boar.cpp:192:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (k < nodes.size()) {
~~^~~~~~~~~~~~~~
wild_boar.cpp:200:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < edges.size(); i++) {
~~^~~~~~~~~~~~~~
wild_boar.cpp:209:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0; j < adjList[u].size(); j++) {
~~^~~~~~~~~~~~~~~~~~~
wild_boar.cpp:217:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0; j < edges.size(); j++) dist[i][j] = dist2[j];
~~^~~~~~~~~~~~~~
wild_boar.cpp:220:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < edges.size(); i++) {
~~^~~~~~~~~~~~~~
wild_boar.cpp:221:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0; j < edges.size(); j++) {
~~^~~~~~~~~~~~~~
wild_boar.cpp:170:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d %d",&N,&M,&T,&L);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
wild_boar.cpp:172:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d",&A,&B,&C);
~~~~~^~~~~~~~~~~~~~~~~~~~~
wild_boar.cpp:177:46: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (i = 0; i < L; i++) scanf("%d",&X[i]),X[i]--;
~~~~~~~~~~~~~~~~~^~~~~~~
wild_boar.cpp:233:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&P,&Q);
~~~~~^~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
93 ms |
100856 KB |
Output is correct |
2 |
Correct |
92 ms |
100856 KB |
Output is correct |
3 |
Correct |
93 ms |
100856 KB |
Output is correct |
4 |
Correct |
95 ms |
100856 KB |
Output is correct |
5 |
Correct |
93 ms |
100932 KB |
Output is correct |
6 |
Correct |
93 ms |
100856 KB |
Output is correct |
7 |
Correct |
95 ms |
100856 KB |
Output is correct |
8 |
Correct |
102 ms |
100920 KB |
Output is correct |
9 |
Correct |
94 ms |
100856 KB |
Output is correct |
10 |
Correct |
94 ms |
100888 KB |
Output is correct |
11 |
Correct |
94 ms |
100856 KB |
Output is correct |
12 |
Correct |
94 ms |
100856 KB |
Output is correct |
13 |
Correct |
94 ms |
100832 KB |
Output is correct |
14 |
Correct |
94 ms |
100856 KB |
Output is correct |
15 |
Correct |
93 ms |
100828 KB |
Output is correct |
16 |
Correct |
93 ms |
100856 KB |
Output is correct |
17 |
Correct |
95 ms |
100956 KB |
Output is correct |
18 |
Correct |
96 ms |
100856 KB |
Output is correct |
19 |
Correct |
94 ms |
100812 KB |
Output is correct |
20 |
Correct |
93 ms |
100856 KB |
Output is correct |
21 |
Correct |
95 ms |
100856 KB |
Output is correct |
22 |
Correct |
124 ms |
100856 KB |
Output is correct |
23 |
Correct |
117 ms |
100984 KB |
Output is correct |
24 |
Correct |
94 ms |
100856 KB |
Output is correct |
25 |
Correct |
94 ms |
100856 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
93 ms |
100856 KB |
Output is correct |
2 |
Correct |
92 ms |
100856 KB |
Output is correct |
3 |
Correct |
93 ms |
100856 KB |
Output is correct |
4 |
Correct |
95 ms |
100856 KB |
Output is correct |
5 |
Correct |
93 ms |
100932 KB |
Output is correct |
6 |
Correct |
93 ms |
100856 KB |
Output is correct |
7 |
Correct |
95 ms |
100856 KB |
Output is correct |
8 |
Correct |
102 ms |
100920 KB |
Output is correct |
9 |
Correct |
94 ms |
100856 KB |
Output is correct |
10 |
Correct |
94 ms |
100888 KB |
Output is correct |
11 |
Correct |
94 ms |
100856 KB |
Output is correct |
12 |
Correct |
94 ms |
100856 KB |
Output is correct |
13 |
Correct |
94 ms |
100832 KB |
Output is correct |
14 |
Correct |
94 ms |
100856 KB |
Output is correct |
15 |
Correct |
93 ms |
100828 KB |
Output is correct |
16 |
Correct |
93 ms |
100856 KB |
Output is correct |
17 |
Correct |
95 ms |
100956 KB |
Output is correct |
18 |
Correct |
96 ms |
100856 KB |
Output is correct |
19 |
Correct |
94 ms |
100812 KB |
Output is correct |
20 |
Correct |
93 ms |
100856 KB |
Output is correct |
21 |
Correct |
95 ms |
100856 KB |
Output is correct |
22 |
Correct |
124 ms |
100856 KB |
Output is correct |
23 |
Correct |
117 ms |
100984 KB |
Output is correct |
24 |
Correct |
94 ms |
100856 KB |
Output is correct |
25 |
Correct |
94 ms |
100856 KB |
Output is correct |
26 |
Correct |
96 ms |
101248 KB |
Output is correct |
27 |
Correct |
136 ms |
107076 KB |
Output is correct |
28 |
Correct |
144 ms |
106572 KB |
Output is correct |
29 |
Correct |
486 ms |
129656 KB |
Output is correct |
30 |
Correct |
482 ms |
129540 KB |
Output is correct |
31 |
Correct |
453 ms |
129424 KB |
Output is correct |
32 |
Correct |
447 ms |
129436 KB |
Output is correct |
33 |
Correct |
473 ms |
131192 KB |
Output is correct |
34 |
Correct |
470 ms |
131224 KB |
Output is correct |
35 |
Correct |
395 ms |
130252 KB |
Output is correct |
36 |
Correct |
467 ms |
130784 KB |
Output is correct |
37 |
Correct |
478 ms |
131192 KB |
Output is correct |
38 |
Correct |
459 ms |
133240 KB |
Output is correct |
39 |
Correct |
457 ms |
132856 KB |
Output is correct |
40 |
Correct |
474 ms |
133300 KB |
Output is correct |
41 |
Correct |
460 ms |
133392 KB |
Output is correct |
42 |
Correct |
390 ms |
133368 KB |
Output is correct |
43 |
Correct |
449 ms |
136184 KB |
Output is correct |
44 |
Correct |
444 ms |
136208 KB |
Output is correct |
45 |
Correct |
280 ms |
125504 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
93 ms |
100856 KB |
Output is correct |
2 |
Correct |
92 ms |
100856 KB |
Output is correct |
3 |
Correct |
93 ms |
100856 KB |
Output is correct |
4 |
Correct |
95 ms |
100856 KB |
Output is correct |
5 |
Correct |
93 ms |
100932 KB |
Output is correct |
6 |
Correct |
93 ms |
100856 KB |
Output is correct |
7 |
Correct |
95 ms |
100856 KB |
Output is correct |
8 |
Correct |
102 ms |
100920 KB |
Output is correct |
9 |
Correct |
94 ms |
100856 KB |
Output is correct |
10 |
Correct |
94 ms |
100888 KB |
Output is correct |
11 |
Correct |
94 ms |
100856 KB |
Output is correct |
12 |
Correct |
94 ms |
100856 KB |
Output is correct |
13 |
Correct |
94 ms |
100832 KB |
Output is correct |
14 |
Correct |
94 ms |
100856 KB |
Output is correct |
15 |
Correct |
93 ms |
100828 KB |
Output is correct |
16 |
Correct |
93 ms |
100856 KB |
Output is correct |
17 |
Correct |
95 ms |
100956 KB |
Output is correct |
18 |
Correct |
96 ms |
100856 KB |
Output is correct |
19 |
Correct |
94 ms |
100812 KB |
Output is correct |
20 |
Correct |
93 ms |
100856 KB |
Output is correct |
21 |
Correct |
95 ms |
100856 KB |
Output is correct |
22 |
Correct |
124 ms |
100856 KB |
Output is correct |
23 |
Correct |
117 ms |
100984 KB |
Output is correct |
24 |
Correct |
94 ms |
100856 KB |
Output is correct |
25 |
Correct |
94 ms |
100856 KB |
Output is correct |
26 |
Correct |
96 ms |
101248 KB |
Output is correct |
27 |
Correct |
136 ms |
107076 KB |
Output is correct |
28 |
Correct |
144 ms |
106572 KB |
Output is correct |
29 |
Correct |
486 ms |
129656 KB |
Output is correct |
30 |
Correct |
482 ms |
129540 KB |
Output is correct |
31 |
Correct |
453 ms |
129424 KB |
Output is correct |
32 |
Correct |
447 ms |
129436 KB |
Output is correct |
33 |
Correct |
473 ms |
131192 KB |
Output is correct |
34 |
Correct |
470 ms |
131224 KB |
Output is correct |
35 |
Correct |
395 ms |
130252 KB |
Output is correct |
36 |
Correct |
467 ms |
130784 KB |
Output is correct |
37 |
Correct |
478 ms |
131192 KB |
Output is correct |
38 |
Correct |
459 ms |
133240 KB |
Output is correct |
39 |
Correct |
457 ms |
132856 KB |
Output is correct |
40 |
Correct |
474 ms |
133300 KB |
Output is correct |
41 |
Correct |
460 ms |
133392 KB |
Output is correct |
42 |
Correct |
390 ms |
133368 KB |
Output is correct |
43 |
Correct |
449 ms |
136184 KB |
Output is correct |
44 |
Correct |
444 ms |
136208 KB |
Output is correct |
45 |
Correct |
280 ms |
125504 KB |
Output is correct |
46 |
Correct |
486 ms |
135180 KB |
Output is correct |
47 |
Correct |
7539 ms |
547268 KB |
Output is correct |
48 |
Correct |
7118 ms |
547336 KB |
Output is correct |
49 |
Correct |
7135 ms |
575444 KB |
Output is correct |
50 |
Correct |
7074 ms |
563256 KB |
Output is correct |
51 |
Correct |
7031 ms |
561004 KB |
Output is correct |
52 |
Correct |
7290 ms |
592752 KB |
Output is correct |
53 |
Correct |
7061 ms |
595444 KB |
Output is correct |
54 |
Correct |
7139 ms |
590816 KB |
Output is correct |
55 |
Correct |
7210 ms |
593812 KB |
Output is correct |
56 |
Correct |
7219 ms |
596172 KB |
Output is correct |
57 |
Correct |
7021 ms |
595840 KB |
Output is correct |
58 |
Correct |
6932 ms |
597232 KB |
Output is correct |
59 |
Correct |
6916 ms |
601844 KB |
Output is correct |
60 |
Correct |
6866 ms |
598076 KB |
Output is correct |
61 |
Correct |
6875 ms |
597372 KB |
Output is correct |
62 |
Correct |
6808 ms |
589876 KB |
Output is correct |
63 |
Correct |
6651 ms |
583276 KB |
Output is correct |
64 |
Correct |
3019 ms |
508464 KB |
Output is correct |
65 |
Correct |
3084 ms |
508552 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
93 ms |
100856 KB |
Output is correct |
2 |
Correct |
92 ms |
100856 KB |
Output is correct |
3 |
Correct |
93 ms |
100856 KB |
Output is correct |
4 |
Correct |
95 ms |
100856 KB |
Output is correct |
5 |
Correct |
93 ms |
100932 KB |
Output is correct |
6 |
Correct |
93 ms |
100856 KB |
Output is correct |
7 |
Correct |
95 ms |
100856 KB |
Output is correct |
8 |
Correct |
102 ms |
100920 KB |
Output is correct |
9 |
Correct |
94 ms |
100856 KB |
Output is correct |
10 |
Correct |
94 ms |
100888 KB |
Output is correct |
11 |
Correct |
94 ms |
100856 KB |
Output is correct |
12 |
Correct |
94 ms |
100856 KB |
Output is correct |
13 |
Correct |
94 ms |
100832 KB |
Output is correct |
14 |
Correct |
94 ms |
100856 KB |
Output is correct |
15 |
Correct |
93 ms |
100828 KB |
Output is correct |
16 |
Correct |
93 ms |
100856 KB |
Output is correct |
17 |
Correct |
95 ms |
100956 KB |
Output is correct |
18 |
Correct |
96 ms |
100856 KB |
Output is correct |
19 |
Correct |
94 ms |
100812 KB |
Output is correct |
20 |
Correct |
93 ms |
100856 KB |
Output is correct |
21 |
Correct |
95 ms |
100856 KB |
Output is correct |
22 |
Correct |
124 ms |
100856 KB |
Output is correct |
23 |
Correct |
117 ms |
100984 KB |
Output is correct |
24 |
Correct |
94 ms |
100856 KB |
Output is correct |
25 |
Correct |
94 ms |
100856 KB |
Output is correct |
26 |
Correct |
96 ms |
101248 KB |
Output is correct |
27 |
Correct |
136 ms |
107076 KB |
Output is correct |
28 |
Correct |
144 ms |
106572 KB |
Output is correct |
29 |
Correct |
486 ms |
129656 KB |
Output is correct |
30 |
Correct |
482 ms |
129540 KB |
Output is correct |
31 |
Correct |
453 ms |
129424 KB |
Output is correct |
32 |
Correct |
447 ms |
129436 KB |
Output is correct |
33 |
Correct |
473 ms |
131192 KB |
Output is correct |
34 |
Correct |
470 ms |
131224 KB |
Output is correct |
35 |
Correct |
395 ms |
130252 KB |
Output is correct |
36 |
Correct |
467 ms |
130784 KB |
Output is correct |
37 |
Correct |
478 ms |
131192 KB |
Output is correct |
38 |
Correct |
459 ms |
133240 KB |
Output is correct |
39 |
Correct |
457 ms |
132856 KB |
Output is correct |
40 |
Correct |
474 ms |
133300 KB |
Output is correct |
41 |
Correct |
460 ms |
133392 KB |
Output is correct |
42 |
Correct |
390 ms |
133368 KB |
Output is correct |
43 |
Correct |
449 ms |
136184 KB |
Output is correct |
44 |
Correct |
444 ms |
136208 KB |
Output is correct |
45 |
Correct |
280 ms |
125504 KB |
Output is correct |
46 |
Correct |
486 ms |
135180 KB |
Output is correct |
47 |
Correct |
7539 ms |
547268 KB |
Output is correct |
48 |
Correct |
7118 ms |
547336 KB |
Output is correct |
49 |
Correct |
7135 ms |
575444 KB |
Output is correct |
50 |
Correct |
7074 ms |
563256 KB |
Output is correct |
51 |
Correct |
7031 ms |
561004 KB |
Output is correct |
52 |
Correct |
7290 ms |
592752 KB |
Output is correct |
53 |
Correct |
7061 ms |
595444 KB |
Output is correct |
54 |
Correct |
7139 ms |
590816 KB |
Output is correct |
55 |
Correct |
7210 ms |
593812 KB |
Output is correct |
56 |
Correct |
7219 ms |
596172 KB |
Output is correct |
57 |
Correct |
7021 ms |
595840 KB |
Output is correct |
58 |
Correct |
6932 ms |
597232 KB |
Output is correct |
59 |
Correct |
6916 ms |
601844 KB |
Output is correct |
60 |
Correct |
6866 ms |
598076 KB |
Output is correct |
61 |
Correct |
6875 ms |
597372 KB |
Output is correct |
62 |
Correct |
6808 ms |
589876 KB |
Output is correct |
63 |
Correct |
6651 ms |
583276 KB |
Output is correct |
64 |
Correct |
3019 ms |
508464 KB |
Output is correct |
65 |
Correct |
3084 ms |
508552 KB |
Output is correct |
66 |
Correct |
356 ms |
123988 KB |
Output is correct |
67 |
Correct |
618 ms |
173684 KB |
Output is correct |
68 |
Correct |
1589 ms |
354936 KB |
Output is correct |
69 |
Correct |
1793 ms |
357368 KB |
Output is correct |
70 |
Correct |
1955 ms |
361380 KB |
Output is correct |
71 |
Correct |
13255 ms |
541580 KB |
Output is correct |
72 |
Correct |
12982 ms |
555044 KB |
Output is correct |
73 |
Correct |
12864 ms |
594344 KB |
Output is correct |
74 |
Correct |
12726 ms |
596804 KB |
Output is correct |
75 |
Correct |
12993 ms |
595312 KB |
Output is correct |
76 |
Correct |
12983 ms |
573100 KB |
Output is correct |
77 |
Correct |
12396 ms |
561820 KB |
Output is correct |
78 |
Correct |
11559 ms |
556392 KB |
Output is correct |
79 |
Correct |
12218 ms |
600836 KB |
Output is correct |
80 |
Correct |
12390 ms |
601808 KB |
Output is correct |
81 |
Correct |
12125 ms |
588628 KB |
Output is correct |
82 |
Correct |
11820 ms |
603452 KB |
Output is correct |
83 |
Correct |
12308 ms |
600244 KB |
Output is correct |
84 |
Correct |
11354 ms |
586496 KB |
Output is correct |
85 |
Correct |
6023 ms |
511304 KB |
Output is correct |