QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#118585 | #4303. New Level | include_BM | AC ✓ | 104ms | 51072kb | C++14 | 1.4kb | 2023-07-03 17:54:41 | 2023-07-03 17:54:43 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
using namespace std;
inline ll read(){
ll x(0),f(0); char ch=getchar();
while(ch<'0'||ch>'9') f|=ch=='-',ch=getchar();
while(ch>='0'&&ch<='9') x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
return f?-x:x;
}
const int N=2e6+10;
int n,m,k,c[N],u[N],v[N],head[N],cnt,vis[N]; ll dis[N];
struct edge{
int to,nxt,w;
}e[N];
inline void add(int u,int v,int w){
e[++cnt].to=v,e[cnt].nxt=head[u],e[cnt].w=w,head[u]=cnt;
}
inline int mod(int x){return (x%k+k)%k;}
struct node{
int x; ll dis;
node(int _x,ll _dis):x(_x),dis(_dis){}
friend bool operator < (node a,node b){return a.dis>b.dis;}
};
signed main(){
n=read(),m=read(),k=read();
for(int i=1;i<=n;++i) c[i]=read()-1;
for(int i=1;i<=m;++i){
u[i]=read(),v[i]=read();
add(u[i],v[i],min(mod(c[v[i]]+1-c[u[i]]),mod(c[v[i]]-1-c[u[i]])));
add(v[i],u[i],min(mod(c[u[i]]+1-c[v[i]]),mod(c[u[i]]-1-c[v[i]])));
}
memset(dis,0x3f,sizeof dis);
priority_queue<node> q; q.emplace(1,0),dis[1]=0;
while(!q.empty()){
int u=q.top().x; q.pop(); if(vis[u]) continue; vis[u]=1;
for(int i=head[u];i;i=e[i].nxt){
int v=e[i].to;
if(dis[u]+e[i].w<dis[v]) dis[v]=dis[u]+e[i].w,q.emplace(v,dis[v]);
}
}
for(int i=1;i<=n;++i) c[i]=(c[i]+dis[0]-dis[i])%k,printf("%d ",c[i]+1);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 3ms
memory: 28148kb
input:
4 4 4 1 2 3 1 1 2 1 3 2 3 3 4
output:
4 1 2 3
result:
ok n=4, m=4, k=4
Test #2:
score: 0
Accepted
time: 1ms
memory: 28240kb
input:
10 9 3 3 2 3 3 1 2 3 1 1 2 2 1 3 2 4 2 5 3 6 5 7 6 8 6 9 7 10 9
output:
3 2 3 3 1 2 3 1 1 2
result:
ok n=10, m=9, k=3
Test #3:
score: 0
Accepted
time: 2ms
memory: 28220kb
input:
239 238 10 6 1 2 10 9 1 8 10 1 10 6 4 5 2 7 8 4 9 7 5 1 3 2 8 1 7 3 4 6 4 2 6 3 10 3 10 5 1 8 8 1 1 2 3 5 5 5 9 3 8 3 4 7 10 7 5 7 8 2 6 8 10 3 3 2 1 7 5 1 4 4 1 9 9 4 2 10 1 6 10 5 3 8 4 4 10 4 4 2 9 9 6 6 8 2 3 2 4 8 5 10 10 3 3 5 1 4 8 4 2 3 6 10 4 10 2 8 2 2 5 7 5 3 3 8 1 7 10 2 8 2 6 3 10 6 5 9...
output:
5 6 7 6 8 6 8 9 7 9 8 8 10 10 9 9 9 10 10 1 1 8 2 2 3 4 3 4 4 4 5 5 3 5 6 6 4 7 7 7 5 8 6 8 9 7 9 10 8 9 8 10 8 1 2 9 2 9 3 4 3 3 5 5 4 4 6 7 3 4 6 8 7 5 6 7 7 8 9 7 8 10 10 1 1 9 1 10 2 2 2 3 3 1 3 3 2 4 5 6 5 5 6 6 6 6 5 7 7 8 6 6 7 7 8 7 8 9 9 8 10 10 1 10 2 2 2 3 3 4 4 1 4 5 5 4 4 6 7 6 8 7 7 7 ...
result:
ok n=239, m=238, k=10
Test #4:
score: 0
Accepted
time: 1ms
memory: 26168kb
input:
2392 2391 100 89 13 96 29 35 81 10 62 30 4 46 56 15 37 61 8 45 47 5 29 23 64 98 50 18 34 28 24 20 24 10 43 34 28 64 100 61 22 68 37 61 49 37 74 64 53 1 84 54 30 46 25 21 31 96 49 74 19 4 10 29 72 27 48 28 99 74 8 32 89 46 68 73 87 41 72 25 2 27 66 77 90 24 78 65 34 67 25 11 9 16 17 87 2 56 58 48 56 ...
output:
88 89 90 90 91 90 91 92 91 90 91 92 93 91 94 93 90 93 92 93 89 92 89 93 90 93 91 93 90 93 91 94 92 91 90 93 93 95 95 94 92 94 94 91 93 96 93 91 91 94 91 93 89 92 92 91 95 93 92 95 96 94 94 93 95 94 96 93 91 93 94 95 92 97 94 92 96 92 95 97 92 97 95 92 93 97 93 92 90 92 92 89 95 94 96 94 90 89 91 91 ...
result:
ok n=2392, m=2391, k=100
Test #5:
score: 0
Accepted
time: 6ms
memory: 28248kb
input:
4 3 3 1 3 1 2 2 1 3 2 4 2
output:
1 3 1 2
result:
ok n=4, m=3, k=3
Test #6:
score: 0
Accepted
time: 2ms
memory: 28288kb
input:
5000 4999 215 75 104 70 136 199 28 108 67 92 90 200 35 184 21 81 200 48 193 172 143 109 43 89 94 195 149 176 198 96 101 199 207 112 29 7 123 59 3 14 38 99 152 188 15 188 179 47 190 199 117 3 63 187 77 14 166 41 8 7 209 211 95 6 80 174 135 211 95 211 189 180 118 210 20 111 24 192 67 129 116 182 17 17...
output:
9 10 10 11 12 11 13 11 13 12 14 10 11 11 10 12 13 11 14 15 16 14 12 12 14 14 13 14 15 15 12 17 11 16 11 13 13 14 13 10 12 13 16 10 16 13 18 11 13 11 12 12 11 16 10 11 12 13 12 17 14 13 17 13 14 19 12 12 13 13 14 16 12 17 12 13 13 17 14 14 14 17 13 17 12 12 20 19 14 14 15 14 14 14 15 18 12 15 14 14 1...
result:
ok n=5000, m=4999, k=215
Test #7:
score: 0
Accepted
time: 2ms
memory: 28272kb
input:
5000 4999 215 155 162 166 204 39 176 58 184 65 113 129 76 118 27 143 103 22 1 209 135 32 117 55 152 197 66 199 5 186 166 53 101 34 91 148 2 70 51 202 80 1 41 31 143 44 102 145 13 90 100 163 185 211 77 45 48 26 123 4 104 20 168 154 142 90 153 149 163 38 172 29 133 62 189 107 89 37 210 57 24 25 55 123...
output:
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166...
result:
ok n=5000, m=4999, k=215
Test #8:
score: 0
Accepted
time: 8ms
memory: 29128kb
input:
100000 99999 215 144 87 149 51 25 51 108 78 135 17 73 188 186 148 9 184 206 1 35 53 29 31 200 78 63 136 158 54 153 103 71 83 60 94 89 7 215 85 150 179 210 130 161 112 93 213 106 189 162 43 173 141 185 192 160 210 196 197 185 33 136 85 103 150 197 140 202 45 51 133 177 16 66 106 70 140 35 66 14 112 1...
output:
78 79 80 80 81 79 80 79 81 82 80 82 82 80 83 80 81 79 82 82 83 80 83 81 82 82 83 82 81 80 84 85 82 83 84 81 80 83 86 81 81 81 82 81 82 81 80 83 81 83 83 85 84 81 81 83 86 82 84 84 82 80 86 82 83 83 82 84 79 81 81 84 80 83 82 83 81 84 84 83 83 84 85 84 83 83 83 83 81 83 84 82 80 84 82 83 81 84 85 83 ...
result:
ok n=100000, m=99999, k=215
Test #9:
score: 0
Accepted
time: 14ms
memory: 32740kb
input:
100000 99999 215 8 183 153 16 17 143 160 152 91 68 8 161 194 91 107 15 206 155 125 10 109 22 77 17 151 148 175 139 182 167 153 115 16 113 58 182 191 203 215 106 34 159 17 182 139 44 30 129 105 134 57 157 32 56 214 5 62 180 175 61 120 15 214 97 103 24 209 194 127 87 204 89 156 2 36 74 114 163 206 97 ...
output:
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2...
result:
ok n=100000, m=99999, k=215
Test #10:
score: 0
Accepted
time: 42ms
memory: 34288kb
input:
239239 239238 239 146 41 60 184 200 183 12 18 119 159 195 222 203 34 50 160 207 170 130 87 232 87 92 221 84 33 38 237 187 102 50 204 3 135 227 23 110 116 215 28 27 238 239 91 153 214 233 193 77 167 203 167 83 200 214 234 68 188 232 197 67 17 210 199 17 222 103 213 99 212 159 76 134 182 89 134 44 92 ...
output:
180 181 181 182 183 182 181 182 182 183 182 182 183 183 183 183 184 185 182 184 184 184 182 184 186 185 183 183 184 184 186 183 184 182 183 183 184 185 186 182 181 187 185 187 183 185 184 184 184 184 185 181 185 184 183 186 183 184 186 182 183 184 182 183 184 184 182 185 185 186 183 185 186 185 185 ...
result:
ok n=239239, m=239238, k=239
Test #11:
score: 0
Accepted
time: 17ms
memory: 31156kb
input:
73223 73222 456 176 375 93 323 28 186 232 176 6 374 42 15 169 308 221 137 388 221 345 86 170 251 432 288 394 21 122 351 430 78 216 133 119 278 100 163 46 278 294 234 68 239 64 202 41 194 410 253 352 153 333 363 120 379 235 286 412 299 20 71 139 369 306 390 327 78 165 245 313 275 6 140 274 417 335 24...
output:
359 360 360 361 362 363 361 361 360 360 363 364 361 360 361 364 361 362 365 364 363 361 364 364 361 361 361 362 364 361 362 366 364 365 365 361 364 362 362 364 363 362 365 361 365 361 363 362 363 366 362 365 360 366 362 362 363 364 362 363 366 364 363 363 365 367 362 361 366 365 363 367 365 365 363 ...
result:
ok n=73223, m=73222, k=456
Test #12:
score: 0
Accepted
time: 74ms
memory: 48608kb
input:
500000 499999 120 120 109 52 88 118 102 96 49 54 40 65 119 104 14 83 86 70 71 108 13 89 86 79 93 2 3 84 120 10 22 116 111 41 2 25 18 65 70 99 99 107 21 75 98 24 95 106 40 40 77 26 103 53 63 35 120 80 56 38 35 82 24 108 26 35 88 47 53 29 8 15 53 89 67 109 69 64 9 51 3 2 99 48 11 82 90 47 91 47 31 9 7...
output:
39 40 41 40 40 41 42 43 42 42 41 42 43 43 42 41 41 41 44 43 43 44 42 42 42 41 45 46 41 42 44 43 42 40 43 43 43 43 45 47 44 42 43 44 44 45 46 42 41 41 43 44 43 45 42 41 44 44 45 44 45 42 44 43 43 46 45 41 45 45 41 44 42 42 40 43 44 41 45 45 42 43 45 44 44 43 44 46 48 42 45 43 46 42 46 43 45 45 45 44 ...
result:
ok n=500000, m=499999, k=120
Test #13:
score: 0
Accepted
time: 2ms
memory: 28144kb
input:
3 2 2 1 2 2 2 1 3 1
output:
2 1 1
result:
ok n=3, m=2, k=2
Test #14:
score: 0
Accepted
time: 2ms
memory: 28252kb
input:
4 3 3 2 1 3 1 2 1 3 2 4 1
output:
2 1 3 1
result:
ok n=4, m=3, k=3
Test #15:
score: 0
Accepted
time: 1ms
memory: 26104kb
input:
2 1 2 1 2 2 1
output:
2 1
result:
ok n=2, m=1, k=2
Test #16:
score: 0
Accepted
time: 1ms
memory: 28152kb
input:
10 45 10 1 2 3 4 5 6 7 8 9 10 1 3 1 4 1 5 1 9 2 1 2 4 2 5 2 8 2 9 2 10 3 2 3 7 3 8 3 10 4 3 4 6 4 7 4 10 5 3 5 4 5 8 6 1 6 2 6 3 6 5 6 8 7 1 7 2 7 5 7 6 7 9 7 10 8 1 8 4 8 7 9 3 9 4 9 5 9 6 9 8 10 1 10 5 10 6 10 8 10 9
output:
10 1 2 3 4 5 6 7 8 9
result:
ok n=10, m=45, k=10
Test #17:
score: 0
Accepted
time: 53ms
memory: 51072kb
input:
1000 499500 1000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 9...
output:
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 ...
result:
ok n=1000, m=499500, k=1000
Test #18:
score: 0
Accepted
time: 3ms
memory: 28928kb
input:
239 28441 239 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
output:
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 1...
result:
ok n=239, m=28441, k=239
Test #19:
score: 0
Accepted
time: 5ms
memory: 28144kb
input:
4 6 4 1 2 3 4 1 4 2 1 2 4 3 1 3 2 4 3
output:
4 1 2 3
result:
ok n=4, m=6, k=4
Test #20:
score: 0
Accepted
time: 53ms
memory: 49176kb
input:
999 498501 999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
output:
910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 ...
result:
ok n=999, m=498501, k=999
Test #21:
score: 0
Accepted
time: 3ms
memory: 28164kb
input:
30 435 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 3 1 4 1 6 1 7 1 8 1 9 1 10 1 13 1 17 1 20 1 21 1 25 1 26 1 27 2 1 2 4 2 5 2 6 2 8 2 11 2 14 2 15 2 16 2 17 2 18 2 19 2 21 2 23 2 26 2 27 2 29 3 2 3 6 3 7 3 12 3 13 3 15 3 16 3 17 3 20 3 21 3 27 3 29 3 30 4 3...
output:
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5 6 7 8 9
result:
ok n=30, m=435, k=30
Test #22:
score: 0
Accepted
time: 2ms
memory: 26192kb
input:
37 666 37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 3 1 9 1 10 1 11 1 14 1 17 1 18 1 19 1 23 1 25 1 26 1 28 1 29 1 30 1 31 1 34 1 35 1 37 2 1 2 5 2 7 2 8 2 9 2 11 2 12 2 14 2 15 2 18 2 19 2 20 2 21 2 23 2 24 2 25 2 26 2 30 2 33 2 35 2 37 ...
output:
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
result:
ok n=37, m=666, k=37
Test #23:
score: 0
Accepted
time: 13ms
memory: 30872kb
input:
500 124750 500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
output:
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 ...
result:
ok n=500, m=124750, k=500
Test #24:
score: 0
Accepted
time: 58ms
memory: 47772kb
input:
988 487578 988 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
output:
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 ...
result:
ok n=988, m=487578, k=988
Test #25:
score: 0
Accepted
time: 49ms
memory: 46532kb
input:
932 433846 932 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...
output:
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 ...
result:
ok n=932, m=433846, k=932
Test #26:
score: 0
Accepted
time: 1ms
memory: 24060kb
input:
1 0 1 1
output:
1
result:
ok n=1, m=0, k=1
Test #27:
score: 0
Accepted
time: 1ms
memory: 28136kb
input:
2 1 2 1 2 2 1
output:
2 1
result:
ok n=2, m=1, k=2
Test #28:
score: 0
Accepted
time: 1ms
memory: 28140kb
input:
2 1 2 1 2 2 1
output:
2 1
result:
ok n=2, m=1, k=2
Test #29:
score: 0
Accepted
time: 1ms
memory: 28148kb
input:
10 9 4 1 2 3 1 3 1 3 2 3 1 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9
output:
4 1 2 3 4 1 2 1 2 3
result:
ok n=10, m=9, k=4
Test #30:
score: 0
Accepted
time: 6ms
memory: 28560kb
input:
1000 10000 100 87 95 7 96 16 76 19 68 100 93 31 85 63 77 82 42 85 33 98 25 89 25 99 92 24 87 80 86 77 67 3 5 19 90 33 86 89 38 26 14 19 40 28 14 99 31 60 87 19 71 10 14 37 66 68 64 89 4 91 37 28 19 76 72 91 70 31 37 28 42 26 24 38 51 63 6 22 22 44 1 55 40 36 69 82 61 5 91 32 63 60 73 99 31 54 2 66 1...
output:
86 87 90 87 93 13 94 10 21 87 95 14 4 13 11 1 12 98 87 94 19 94 20 86 93 18 14 14 14 7 88 89 92 22 98 15 21 97 94 87 93 100 94 90 22 96 7 22 92 8 21 91 100 6 9 1 15 22 20 94 96 94 14 11 23 9 97 98 93 100 94 90 98 100 5 91 95 25 97 21 4 97 99 11 15 6 88 14 95 9 6 14 21 95 4 87 6 93 88 17 19 88 23 99 ...
result:
ok n=1000, m=10000, k=100
Test #31:
score: 0
Accepted
time: 1ms
memory: 26100kb
input:
10 15 5 1 3 2 2 3 3 1 1 4 2 2 1 3 1 4 2 4 9 5 1 5 4 5 7 5 9 6 1 6 7 7 3 8 3 8 6 9 6 10 6
output:
5 1 1 5 1 1 5 5 2 5
result:
ok n=10, m=15, k=5
Test #32:
score: 0
Accepted
time: 34ms
memory: 38468kb
input:
30000 200000 1000 162 342 574 762 997 367 451 858 680 686 720 881 700 749 927 392 402 652 137 152 772 549 639 593 954 152 409 350 325 94 577 222 813 409 279 83 142 577 445 294 878 215 884 801 159 581 468 714 291 755 127 229 922 931 206 578 780 741 617 530 788 514 234 413 130 580 834 437 688 867 89 3...
output:
561 562 562 569 573 598 590 573 597 601 570 570 568 570 575 586 589 592 581 583 571 562 576 599 577 580 588 588 586 572 593 581 566 591 588 578 580 598 583 581 576 581 574 570 583 601 592 570 583 571 580 585 574 573 582 598 571 567 589 593 606 596 587 589 582 591 574 588 598 570 580 587 584 589 583 ...
result:
ok n=30000, m=200000, k=1000
Test #33:
score: 0
Accepted
time: 38ms
memory: 36832kb
input:
23923 239239 239239 218201 175552 191424 205458 207189 210258 173683 109081 22520 167503 135263 100313 116435 226001 14596 10832 101211 197385 144248 140485 196107 176044 197145 162189 51641 49690 205181 144176 22360 112556 95875 14356 44237 116133 126644 146286 41030 220736 234286 123941 201457 151...
output:
9349 9376 9379 9383 9384 9385 9373 9362 9395 9374 9370 9360 9364 9391 9391 9388 9409 9385 9371 9367 9379 9375 9386 9373 9399 9400 9384 9369 9391 9359 9409 9390 9395 9369 9363 9366 9401 9350 9390 9356 9378 9372 9400 9390 9389 9374 9361 9392 9358 9403 9386 9359 9383 9379 9377 9386 9374 9411 9385 9390 ...
result:
ok n=23923, m=239239, k=239239
Test #34:
score: 0
Accepted
time: 29ms
memory: 36016kb
input:
10000 239000 1000 830 816 588 81 331 726 933 772 964 22 226 696 247 557 199 314 89 400 609 373 678 44 645 768 52 101 704 464 79 922 623 368 973 54 823 535 467 167 693 58 933 898 502 92 881 979 768 972 923 729 14 838 473 735 255 328 719 243 727 406 164 866 178 445 74 297 567 291 792 989 866 84 523 61...
output:
229 316 287 243 264 306 327 310 328 333 256 295 257 289 252 264 243 273 294 272 301 237 299 305 235 242 304 279 241 327 298 268 234 234 309 287 274 251 301 239 328 325 276 239 319 326 312 231 328 304 331 309 281 307 254 262 301 251 308 274 246 315 247 277 239 266 291 257 314 235 317 243 286 290 322 ...
result:
ok n=10000, m=239000, k=1000
Test #35:
score: 0
Accepted
time: 78ms
memory: 48972kb
input:
20000 500000 1000 419 672 848 423 906 141 551 685 125 226 873 586 785 669 914 99 610 843 734 869 854 729 140 254 241 436 704 522 737 9 607 950 875 788 295 920 731 523 91 28 942 779 729 47 579 905 623 87 660 930 160 88 593 971 467 895 685 432 147 522 509 583 111 445 399 533 883 325 784 919 59 656 732...
output:
818 839 857 819 867 891 939 841 895 903 861 933 850 841 866 887 832 857 847 864 863 846 890 907 900 928 844 936 844 881 831 877 860 854 912 869 844 939 889 881 870 847 841 884 833 864 829 887 837 872 895 888 824 875 928 867 839 921 894 938 932 823 893 927 924 939 860 915 852 871 884 835 842 917 889 ...
result:
ok n=20000, m=500000, k=1000
Test #36:
score: 0
Accepted
time: 100ms
memory: 50792kb
input:
100000 500000 33000 9268 12341 19458 7922 16366 4090 22601 17440 25495 20980 22841 4456 12772 19555 12480 7078 27427 441 11155 27391 25695 3933 14143 30783 31007 10612 4833 8341 23303 18666 15933 32789 11645 24228 21960 5715 25308 30560 6089 21958 11067 32266 5051 13065 4942 10544 14020 32626 2690 1...
output:
18667 18668 18669 18669 18678 18670 18689 18680 18687 18687 18688 18697 18698 18686 18675 18698 18691 18687 18699 18690 18688 18695 18679 18692 18693 18694 18700 18701 18686 18686 18682 18691 18703 18687 18684 18702 18689 18690 18676 18681 18692 18696 18699 18676 18697 18676 18677 18693 18675 18678 ...
result:
ok n=100000, m=500000, k=33000
Test #37:
score: 0
Accepted
time: 104ms
memory: 50632kb
input:
500000 500000 500000 211528 388055 34644 166109 384814 413216 108307 120428 430880 36146 461434 354152 400903 328422 357107 124169 420364 153811 72615 437513 92697 194228 26206 328865 118741 274081 247329 112425 388234 73875 332122 132252 187681 256132 452658 344401 166979 32236 106225 301058 450650...
output:
41927 41928 41928 41929 41930 41929 41928 41928 41928 41930 41929 41931 41929 41930 41929 41928 41930 41932 41931 41931 41929 41931 41932 41932 41931 41932 41933 41932 41929 41932 41931 41932 41929 41933 41933 41929 41930 41932 41929 41933 41931 41930 41932 41930 41929 41933 41933 41933 41934 41929 ...
result:
ok n=500000, m=500000, k=500000
Test #38:
score: 0
Accepted
time: 91ms
memory: 48592kb
input:
500000 499999 123901 32379 104763 83694 71174 84740 51729 77708 29454 53825 32137 102754 1120 95274 11534 107584 16626 16587 108925 81688 117022 117367 116972 9134 22288 92320 20504 13277 18003 58760 31410 23254 96631 16410 84996 20154 67148 119437 60466 25231 16742 13440 36401 21212 63998 62267 765...
output:
93590 93591 93591 93592 93591 93593 93591 93593 93594 93592 93594 93592 93592 93594 93595 93592 93592 93593 93591 93592 93593 93594 93594 93593 93593 93592 93591 93595 93593 93593 93594 93593 93593 93592 93592 93592 93593 93596 93592 93594 93594 93594 93597 93595 93595 93596 93593 93596 93593 93596 ...
result:
ok n=500000, m=499999, k=123901
Test #39:
score: 0
Accepted
time: 65ms
memory: 48652kb
input:
500000 499999 10 8 10 6 1 1 4 9 7 8 1 10 1 2 5 4 2 4 4 3 6 6 2 7 8 7 7 7 10 9 5 6 3 3 10 8 10 5 7 9 7 2 9 9 8 9 10 9 4 4 5 8 9 5 5 2 5 9 4 8 4 6 5 6 1 6 3 7 7 10 9 4 8 4 3 8 5 1 2 2 2 3 3 2 4 1 2 2 4 2 5 8 5 10 4 8 1 5 6 6 8 8 6 8 2 9 6 5 4 6 8 6 8 4 4 10 1 4 1 8 4 8 2 5 1 2 2 7 5 2 7 4 10 2 9 4 3 1...
output:
7 8 9 9 10 10 10 1 9 8 8 1 10 10 10 1 1 1 9 1 10 2 10 1 9 10 2 2 3 8 1 1 9 10 2 1 10 1 1 2 10 9 2 3 10 10 3 4 3 9 9 1 1 1 3 9 10 10 3 2 2 2 10 2 1 3 2 10 10 5 3 3 10 2 3 5 1 2 3 3 4 2 4 10 1 1 1 1 2 3 10 5 3 2 4 3 1 6 4 2 3 9 3 1 9 4 4 2 3 6 3 5 3 3 10 1 2 6 5 10 7 8 2 2 3 3 2 7 4 3 5 3 3 4 4 4 5 1 ...
result:
ok n=500000, m=499999, k=10
Test #40:
score: 0
Accepted
time: 1ms
memory: 24044kb
input:
1 0 1 1
output:
1
result:
ok n=1, m=0, k=1
Test #41:
score: 0
Accepted
time: 1ms
memory: 28116kb
input:
10 16 4 1 4 3 2 3 4 3 1 4 2 2 1 3 2 4 1 4 3 5 1 5 4 6 1 6 5 7 2 7 6 8 2 8 7 9 1 9 8 10 2 10 9
output:
4 3 2 1 2 3 2 4 3 4
result:
ok n=10, m=16, k=4
Test #42:
score: 0
Accepted
time: 2ms
memory: 26420kb
input:
1000 9000 6 3 4 2 5 4 3 1 6 2 6 1 4 5 1 3 2 5 3 4 6 1 4 4 5 5 1 2 2 6 1 3 5 3 6 1 2 2 4 6 2 5 2 3 1 4 4 3 5 5 4 2 3 1 2 4 6 3 2 1 6 5 1 4 4 6 6 4 1 5 5 6 3 2 4 2 1 1 2 4 6 5 5 1 5 1 1 4 3 6 6 4 3 5 4 2 5 6 6 1 6 1 1 4 5 5 4 1 1 6 1 4 3 5 1 5 6 2 4 2 5 6 4 3 6 1 3 1 1 2 5 6 5 1 5 4 1 6 4 5 6 4 3 6 2 ...
output:
6 1 5 2 1 6 4 3 5 3 4 1 2 4 6 5 2 6 1 3 4 1 1 2 2 4 5 5 3 4 6 2 6 3 4 5 5 1 3 5 2 5 6 4 1 1 6 2 2 1 5 6 4 5 1 3 6 5 4 3 2 4 1 1 3 3 1 4 2 2 3 6 5 1 5 4 4 5 1 3 2 2 4 2 4 4 1 6 3 3 1 6 2 1 5 2 3 3 4 3 4 4 1 2 2 1 4 4 3 4 1 6 2 4 2 3 5 1 5 2 3 1 6 3 4 6 4 4 5 2 3 2 4 2 1 4 3 1 2 3 1 6 3 5 5 6 2 4 2 4 ...
result:
ok n=1000, m=9000, k=6
Test #43:
score: 0
Accepted
time: 30ms
memory: 39896kb
input:
10000 320000 15 12 13 4 9 5 1 5 5 6 7 6 10 9 10 6 9 4 9 9 7 14 6 11 11 2 6 14 8 11 11 8 4 13 9 11 4 3 15 15 11 5 11 4 15 12 6 2 7 9 12 12 8 12 3 10 4 12 14 10 12 1 8 6 1 15 8 14 15 6 5 7 2 7 4 15 4 12 2 12 7 2 3 12 3 2 9 4 5 2 14 10 12 4 8 9 10 5 14 6 6 7 7 10 5 6 3 14 15 7 8 1 11 14 11 4 1 2 6 4 15...
output:
6 7 13 3 14 10 14 14 15 1 15 4 3 4 15 3 13 3 3 1 8 15 5 5 11 15 8 2 5 5 2 13 7 3 5 13 12 9 9 5 14 5 13 9 6 15 11 1 3 6 6 2 6 12 4 13 6 8 4 6 10 2 15 10 9 2 8 9 15 14 1 11 1 13 9 13 6 11 6 1 11 12 6 12 11 3 13 14 11 8 4 6 13 2 3 4 14 8 15 15 1 1 4 14 15 12 8 9 1 2 10 5 8 5 13 10 11 15 13 9 3 6 7 9 10...
result:
ok n=10000, m=320000, k=15
Test #44:
score: 0
Accepted
time: 80ms
memory: 47484kb
input:
100000 500000 98 77 62 32 77 73 14 30 8 35 27 26 30 71 93 98 11 53 39 69 98 31 67 19 13 9 62 41 27 78 81 79 33 57 61 81 97 29 23 63 77 71 98 51 68 74 64 68 46 48 90 18 58 91 1 69 76 45 92 4 41 97 65 54 51 38 85 76 37 98 51 52 57 60 33 23 38 37 69 55 13 6 28 32 48 56 19 81 1 70 56 77 56 3 26 6 91 6 5...
output:
98 34 21 43 42 13 22 10 24 17 18 20 40 5 6 11 31 27 38 6 21 38 14 11 9 33 28 17 96 1 98 24 32 35 1 5 19 17 35 97 20 43 31 36 35 15 31 19 25 41 3 32 98 37 36 33 20 97 3 22 98 32 24 25 17 1 35 10 2 25 20 32 28 8 2 18 15 23 26 12 4 9 14 19 18 14 33 2 39 31 24 27 40 13 8 45 7 29 1 7 19 16 15 6 31 4 32 4...
result:
ok n=100000, m=500000, k=98
Test #45:
score: 0
Accepted
time: 2ms
memory: 28168kb
input:
400 797 3 3 1 2 2 1 2 1 1 2 3 3 2 2 3 1 3 1 3 2 3 1 1 3 2 3 1 3 1 1 2 3 3 1 2 3 1 2 3 3 1 1 2 1 1 3 2 2 2 3 2 3 2 1 2 1 1 3 2 2 3 3 2 3 1 2 1 3 3 1 2 1 2 2 3 2 3 1 3 1 3 2 2 1 3 2 3 1 2 3 3 2 1 1 3 1 3 3 1 1 2 3 1 3 3 2 3 3 1 1 3 3 1 1 2 2 3 3 3 1 2 2 2 1 3 2 1 3 1 2 3 2 1 3 3 3 1 1 1 2 3 3 1 3 1 3 ...
output:
3 1 2 2 1 2 1 1 2 3 3 2 2 3 1 3 1 3 2 3 1 1 3 2 3 1 3 1 1 2 3 3 1 2 3 1 2 3 3 1 1 2 1 1 3 2 2 2 3 2 3 2 1 2 1 1 3 2 2 3 3 2 3 1 2 1 3 3 1 2 1 2 2 3 2 3 1 3 1 3 2 2 1 3 2 3 1 2 3 3 2 1 1 3 1 3 3 1 1 2 3 1 3 3 2 3 3 1 1 3 3 1 1 2 2 3 3 3 1 2 2 2 1 3 2 1 3 1 2 3 2 1 3 3 3 1 1 1 2 3 3 1 3 1 3 2 3 2 3 2 ...
result:
ok n=400, m=797, k=3
Test #46:
score: 0
Accepted
time: 72ms
memory: 48560kb
input:
100000 500000 123 113 5 99 17 73 68 79 118 51 112 17 89 44 29 112 35 120 43 28 34 84 71 74 10 5 67 33 42 29 120 107 67 94 63 82 77 85 18 18 122 87 100 102 70 97 31 32 82 26 101 71 16 112 28 60 108 55 93 23 44 93 81 11 42 43 5 5 1 99 101 6 76 115 115 121 10 82 47 120 59 73 40 81 62 66 69 81 81 90 57 ...
output:
95 96 5 103 121 118 122 12 112 8 102 1 111 105 9 105 10 110 105 108 122 118 116 99 15 117 107 107 106 12 6 117 5 114 122 122 1 102 104 13 1 4 8 116 4 107 105 123 104 4 118 101 9 104 116 8 111 2 103 110 1 122 100 111 108 96 100 15 3 5 97 119 9 9 13 96 122 112 95 114 120 108 121 114 115 119 121 121 1 ...
result:
ok n=100000, m=500000, k=123
Test #47:
score: 0
Accepted
time: 62ms
memory: 47596kb
input:
100000 500000 7 3 4 2 6 5 7 2 4 3 4 1 6 2 2 4 3 2 6 1 4 1 3 5 6 1 4 1 2 6 6 1 4 4 2 4 4 3 1 7 2 7 1 6 4 6 5 3 7 3 1 5 4 5 2 4 1 1 5 2 6 1 6 4 2 2 2 5 4 3 6 1 2 5 1 2 5 1 2 5 5 6 6 1 4 1 2 5 5 7 5 1 7 3 4 2 2 7 6 1 7 3 2 2 1 5 1 4 1 4 5 2 6 3 6 2 5 4 5 2 3 1 7 4 1 5 4 7 1 2 4 5 2 5 3 5 2 1 7 3 5 3 4 ...
output:
3 4 2 6 5 7 7 4 3 4 1 5 2 2 4 3 2 6 1 4 1 3 5 6 7 4 1 2 6 6 1 4 4 2 4 4 3 1 7 2 7 1 6 4 6 5 2 7 3 1 5 4 5 2 4 1 1 5 2 6 1 6 4 2 2 2 5 4 3 6 1 2 5 1 2 5 1 2 5 5 6 6 1 3 1 2 5 5 7 5 1 6 3 4 2 2 7 6 1 7 3 2 2 1 5 1 4 1 4 5 2 6 3 6 2 5 4 5 2 3 1 7 4 1 5 4 7 1 1 4 5 2 5 3 5 2 1 7 3 5 3 4 4 2 5 3 4 4 6 3 ...
result:
ok n=100000, m=500000, k=7
Test #48:
score: 0
Accepted
time: 25ms
memory: 39580kb
input:
23923 232932 98 4 19 50 43 11 17 12 30 41 87 49 25 63 38 90 59 90 98 49 79 63 89 35 89 40 72 32 95 85 39 63 8 32 45 27 28 22 20 54 68 40 83 93 32 69 13 36 66 75 43 76 86 88 30 94 80 79 14 32 15 83 94 62 80 22 20 65 52 5 6 12 19 42 85 59 6 70 64 46 37 31 38 6 92 73 39 40 72 55 52 97 56 51 1 73 14 47 ...
output:
25 31 49 47 28 32 26 37 43 69 48 34 58 43 71 56 70 73 49 65 57 69 40 70 43 62 39 73 69 44 56 78 39 46 36 38 32 32 53 61 40 68 64 39 57 29 33 53 62 41 63 58 67 32 69 60 60 73 33 63 60 70 52 66 28 79 53 34 72 72 77 28 44 57 48 74 53 47 46 31 38 41 76 66 55 34 36 55 45 48 73 44 39 71 54 28 37 55 46 59 ...
result:
ok n=23923, m=232932, k=98
Test #49:
score: 0
Accepted
time: 53ms
memory: 41332kb
input:
76598 387654 181 179 114 15 139 123 143 162 169 143 23 141 2 70 115 173 69 136 30 156 72 181 8 126 4 7 90 46 74 154 132 92 162 2 82 99 36 21 162 100 36 163 133 79 88 79 70 108 146 67 73 170 30 7 73 70 6 169 135 160 153 72 46 49 10 133 106 147 74 157 74 107 14 137 160 32 9 109 174 88 4 135 20 105 110...
output:
130 153 135 162 157 164 169 172 164 138 163 130 145 147 173 174 154 158 155 146 173 172 148 174 132 143 176 132 154 147 147 163 164 140 139 174 132 165 148 174 165 147 140 142 146 141 149 149 171 136 150 170 166 136 141 170 157 149 154 155 138 134 136 165 154 135 160 137 158 137 137 165 155 147 131 ...
result:
ok n=76598, m=387654, k=181
Test #50:
score: 0
Accepted
time: 60ms
memory: 49716kb
input:
49999 500000 74 22 7 27 40 31 35 50 20 21 67 52 60 48 28 26 33 34 27 21 9 3 40 47 12 24 33 7 57 11 38 12 67 47 68 29 69 53 70 54 53 8 74 42 45 11 63 44 10 46 38 50 22 40 42 49 54 74 69 74 25 34 43 40 30 54 59 6 4 45 32 18 57 25 63 56 21 16 37 57 6 51 23 63 36 34 69 5 49 46 68 57 42 2 38 51 26 64 19 ...
output:
43 8 46 55 48 51 62 41 42 74 63 70 61 46 45 50 50 46 40 9 6 54 60 13 44 50 9 67 11 53 11 74 59 1 47 1 64 1 65 65 10 4 56 58 12 71 58 10 59 53 63 43 55 55 62 65 4 1 4 45 51 57 54 48 65 68 7 5 56 47 15 66 17 66 66 14 12 51 62 1 63 14 69 47 44 71 5 60 52 1 62 55 1 46 60 41 61 14 3 5 12 66 5 6 45 54 6 2...
result:
ok n=49999, m=500000, k=74
Test #51:
score: 0
Accepted
time: 1ms
memory: 28164kb
input:
10 40 244 1 1 2 2 3 3 4 4 5 5 1 3 1 4 1 6 1 7 1 10 2 4 2 6 2 9 2 10 3 2 3 6 3 9 4 5 4 6 4 7 4 8 4 10 5 1 5 2 5 3 5 9 6 9 6 10 7 2 7 3 7 5 7 6 7 9 8 1 8 2 8 3 8 5 8 6 8 9 9 1 9 4 10 3 10 5 10 7 10 8
output:
220 220 221 221 222 222 223 223 224 224
result:
ok n=10, m=40, k=244
Test #52:
score: 0
Accepted
time: 8ms
memory: 34428kb
input:
478 113068 478 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 ...
output:
274 274 275 275 276 276 277 277 278 278 279 279 280 280 281 281 282 282 283 283 284 284 285 285 286 286 287 287 288 288 289 289 290 290 291 291 292 292 293 293 294 294 295 295 296 296 297 297 298 298 299 299 300 300 301 301 302 302 303 303 304 304 305 305 306 306 307 307 308 308 309 309 310 310 311 ...
result:
ok n=478, m=113068, k=478
Test #53:
score: 0
Accepted
time: 12ms
memory: 29124kb
input:
478 102491 286 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4...
output:
72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 74 74 74 74 74 74 ...
result:
ok n=478, m=102491, k=286
Test #54:
score: 0
Accepted
time: 18ms
memory: 32884kb
input:
726 248007 278 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4...
output:
228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 228 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 229 ...
result:
ok n=726, m=248007, k=278
Test #55:
score: 0
Accepted
time: 1ms
memory: 26192kb
input:
5 8 241 1 1 2 2 3 1 3 2 4 3 2 4 1 5 1 5 2 5 3 5 4
output:
45 45 46 46 47
result:
ok n=5, m=8, k=241
Test #56:
score: 0
Accepted
time: 24ms
memory: 46340kb
input:
1002 493664 339 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13...
output:
64 64 64 64 64 64 64 64 64 64 65 65 65 65 65 65 65 65 65 65 66 66 66 66 66 66 66 66 66 66 67 67 67 67 67 67 67 67 67 67 68 68 68 68 68 68 68 68 68 68 69 69 69 69 69 69 69 69 69 69 70 70 70 70 70 70 70 70 70 70 71 71 71 71 71 71 71 71 71 71 72 72 72 72 72 72 72 72 72 72 73 73 73 73 73 73 73 73 73 73 ...
result:
ok n=1002, m=493664, k=339
Test #57:
score: 0
Accepted
time: 7ms
memory: 32272kb
input:
1100 97927 1239 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 862 ...
result:
ok n=1100, m=97927, k=1239
Test #58:
score: 0
Accepted
time: 24ms
memory: 43964kb
input:
999 490723 338 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 ...
output:
20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 22 22 22 23 23 23 23 23 23 23 23 23 23 24 24 24 24 24 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 26 26 26 26 26 26 26 26 26 26 27 27 27 27 27 27 27 27 27 27 28 28 28 28 28 28 28 28 28 28 29 29 29 29 29 29 29 29 29 29 ...
result:
ok n=999, m=490723, k=338
Test #59:
score: 0
Accepted
time: 18ms
memory: 45860kb
input:
1100 497829 439 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 273 ...
result:
ok n=1100, m=497829, k=439
Test #60:
score: 0
Accepted
time: 29ms
memory: 44904kb
input:
1040 498901 315 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 ...
result:
ok n=1040, m=498901, k=315
Test #61:
score: 0
Accepted
time: 15ms
memory: 36752kb
input:
912 311122 478 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 274 ...
result:
ok n=912, m=311122, k=478
Test #62:
score: 0
Accepted
time: 24ms
memory: 44452kb
input:
1000 487196 291 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 ...
output:
187 187 187 187 187 187 187 187 187 187 187 187 187 187 187 187 187 187 187 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 189 189 189 189 189 189 189 189 189 189 189 189 189 189 189 189 189 189 189 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 ...
result:
ok n=1000, m=487196, k=291