QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#577670 | #9301. Skeleton Dynamization | ship2077 | AC ✓ | 371ms | 17064kb | C++23 | 2.3kb | 2024-09-20 13:57:01 | 2024-09-20 13:57:03 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
constexpr int M=1e5+5;
int n,m,cur,rt,maxn;bool vis[M];
int col[M],trans[M],Col[M],Trans[M];
vector<int>adj[M],ans[M];ull Hash[M];
int read(){
int x=0;char ch=getchar();
while (!isdigit(ch)) ch=getchar();
while (isdigit(ch)) x=x*10+ch-48,ch=getchar();
return x;
}
ull F(ull x){return (x>>31)*x+x*x*x+1233;}
void solve(int u,int v){
for (int i=1;i<=n;i++) col[i]=0;
col[u]=1;col[v]=2;int siz=0;
queue<pair<int,int>>q;q.push({u,v});
while (!q.empty()){
auto [u,v]=q.front();q.pop();
trans[u]=trans[v]=v;siz++;
for (auto y:adj[v]) vis[y]=1;
for (auto y:adj[u]) if (!col[y])
for (auto z:adj[y]) if (vis[z]&&!col[z])
q.push({y,z}),col[y]=1,col[z]=2;
for (auto y:adj[v]) vis[y]=0;
} queue<int>p;
if (n%siz||n/siz<=maxn) return;
for (int i=1;i<=n;i++)
if (col[i]==2) p.push(i);
while (!p.empty()){
int x=p.front();p.pop();
for (auto y:adj[x]) if (!col[y])
col[y]=col[x]+1,trans[y]=trans[x],p.push(y);
} int num=0;
for (int i=1;i<=n;i++) num=max(num,col[i]);
for (int i=1;i<=num;i++) Hash[i]=0;
for (int i=1;i<=n;i++)
for (auto j:adj[i])
if (col[i]!=col[j]){
if (abs(col[i]-col[j])>1||trans[i]!=trans[j])
return;
}
else Hash[col[i]]+=F(trans[i])*F(trans[j]);
for (int i=2;i<=num;i++)
if (Hash[i]!=Hash[1]) return; maxn=num;
for (int i=1;i<=n;i++) Col[i]=col[i],Trans[i]=trans[i];
}
int main(){
n=read();m=read();
for (int i=1;i<=m;i++){
int x=read(),y=read();
adj[x].emplace_back(y);
adj[y].emplace_back(x);
} cur=n;
for (int i=1;i<=n;i++)
if (adj[i].size()<cur)
cur=adj[i].size(),rt=i;
for (int i=1;i<=n;i++) Col[i]=1,Trans[i]=i;
maxn=1; for (auto x:adj[rt]) solve(rt,x);
printf("%d %d\n",maxn,n/maxn);
for (int i=1;i<=n;i++) ans[Col[i]].emplace_back(i);
for (int i=1;i<=maxn;i++){
sort(ans[i].begin(),ans[i].end(),[&](int x,int y){return Trans[x]<Trans[y];});
for (auto x:ans[i]) printf("%d ",x); puts("");
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 5788kb
input:
12 20 5 12 6 10 8 1 11 3 5 1 12 4 12 2 11 8 2 8 6 4 7 11 9 1 8 10 9 6 4 1 2 5 10 3 7 2 8 4 9 10
output:
3 4 9 6 10 3 1 4 8 11 5 12 2 7
result:
ok correct, length=3
Test #2:
score: 0
Accepted
time: 1ms
memory: 6032kb
input:
3 3 1 2 2 3 3 1
output:
1 3 1 2 3
result:
ok correct, length=1
Test #3:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
4 3 1 2 2 3 4 3
output:
4 1 1 2 3 4
result:
ok correct, length=4
Test #4:
score: 0
Accepted
time: 1ms
memory: 5804kb
input:
14 22 1 2 2 3 3 4 4 5 5 1 6 7 7 8 8 9 9 10 10 6 11 12 11 13 11 14 12 13 12 14 13 14 1 6 2 7 3 8 4 9 5 10 6 11
output:
1 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14
result:
ok correct, length=1
Test #5:
score: 0
Accepted
time: 0ms
memory: 5768kb
input:
1 0
output:
1 1 1
result:
ok correct, length=1
Test #6:
score: 0
Accepted
time: 1ms
memory: 6032kb
input:
4 4 1 4 2 1 4 3 2 3
output:
2 2 2 1 3 4
result:
ok correct, length=2
Test #7:
score: 0
Accepted
time: 1ms
memory: 5868kb
input:
6 9 1 6 5 2 5 4 5 3 4 1 6 4 1 2 3 6 2 3
output:
2 3 1 6 4 2 3 5
result:
ok correct, length=2
Test #8:
score: 0
Accepted
time: 1ms
memory: 5848kb
input:
40 116 21 33 22 34 15 13 16 14 19 3 20 4 31 39 32 40 7 19 8 20 17 3 18 4 1 19 2 20 19 29 20 30 19 17 20 18 29 37 30 38 9 25 10 26 11 15 12 16 11 27 12 28 9 5 10 6 39 7 40 8 23 37 24 38 33 3 34 4 37 15 38 16 35 33 36 34 27 23 28 24 39 35 40 36 35 31 36 32 13 5 14 6 5 25 6 26 25 23 26 24 27 29 28 30 2...
output:
2 20 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40
result:
ok correct, length=2
Test #9:
score: 0
Accepted
time: 1ms
memory: 3768kb
input:
40 112 5 19 6 20 15 17 16 18 9 33 10 34 37 7 38 8 21 37 22 38 9 35 10 36 11 35 12 36 11 25 12 26 1 27 2 28 23 15 24 16 11 9 12 10 29 1 30 2 31 25 32 26 3 17 4 18 13 19 14 20 19 27 20 28 39 11 40 12 33 15 34 16 1 19 2 20 11 15 12 16 37 3 38 4 21 23 22 24 21 13 22 14 5 21 6 22 23 7 24 8 31 7 32 8 13 2...
output:
2 20 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40
result:
ok correct, length=2
Test #10:
score: 0
Accepted
time: 1ms
memory: 5872kb
input:
40 110 33 19 34 20 11 35 12 36 11 7 12 8 35 9 36 10 25 37 26 38 1 21 2 22 29 5 30 6 39 35 40 36 39 37 40 38 3 35 4 36 23 15 24 16 17 19 18 20 9 39 10 40 17 31 18 32 33 21 34 22 29 13 30 14 3 25 4 26 11 39 12 40 15 11 16 12 5 35 6 36 13 7 14 8 27 33 28 34 37 15 38 16 15 3 16 4 13 9 14 10 31 23 32 24 ...
output:
2 20 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40
result:
ok correct, length=2
Test #11:
score: 0
Accepted
time: 1ms
memory: 5860kb
input:
32 90 17 25 18 26 21 9 22 10 27 21 28 22 21 25 22 26 1 21 2 22 9 19 10 20 27 15 28 16 3 25 4 26 7 27 8 28 3 13 4 14 23 29 24 30 31 7 32 8 29 11 30 12 15 17 16 18 23 5 24 6 31 1 32 2 17 3 18 4 23 19 24 20 9 17 10 18 15 25 16 26 7 1 8 2 5 1 6 2 11 7 12 8 19 1 20 2 31 29 32 30 7 19 8 20 9 13 10 14 13 2...
output:
2 16 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
result:
ok correct, length=2
Test #12:
score: 0
Accepted
time: 0ms
memory: 5860kb
input:
40 114 9 27 10 28 31 27 32 28 13 35 14 36 5 3 6 4 1 5 2 6 33 9 34 10 5 25 6 26 19 29 20 30 7 1 8 2 7 19 8 20 29 27 30 28 25 23 26 24 33 15 34 16 39 19 40 20 35 39 36 40 1 17 2 18 19 13 20 14 11 39 12 40 23 21 24 22 37 25 38 26 3 31 4 32 21 3 22 4 29 13 30 14 39 33 40 34 1 9 2 10 27 13 28 14 33 35 34...
output:
2 20 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40
result:
ok correct, length=2
Test #13:
score: 0
Accepted
time: 0ms
memory: 5780kb
input:
20 48 4 20 16 2 7 15 9 12 9 4 16 8 18 13 11 5 9 6 5 13 3 4 10 14 8 6 12 11 19 6 10 15 9 18 14 2 3 9 6 20 4 17 5 12 15 14 20 8 1 3 17 12 18 8 17 11 7 6 13 9 18 4 13 3 10 16 19 7 18 11 3 7 13 19 20 7 15 16 19 8 1 5 1 17 10 6 20 16 1 12 19 14 8 2 10 2
output:
1 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
result:
ok correct, length=1
Test #14:
score: 0
Accepted
time: 1ms
memory: 5756kb
input:
20 46 13 7 20 2 3 7 16 4 17 15 10 16 1 7 12 19 9 13 9 11 3 18 14 6 16 2 10 7 4 12 18 5 10 8 4 10 16 1 13 11 17 13 7 5 15 13 10 2 8 12 20 18 6 19 11 3 19 8 15 11 4 5 9 17 14 12 6 2 8 14 5 17 18 7 20 10 3 2 1 15 5 1 20 14 1 3 8 6 9 18 20 4
output:
1 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
result:
ok correct, length=1
Test #15:
score: 0
Accepted
time: 1ms
memory: 5796kb
input:
20 45 4 13 7 15 16 6 3 19 11 9 11 16 17 19 3 7 14 6 17 12 14 20 18 13 2 17 7 8 17 14 11 5 9 16 6 20 7 10 15 18 13 15 5 16 1 20 11 14 4 10 8 10 9 5 10 2 3 18 2 19 1 14 6 1 19 6 4 15 13 8 12 8 18 4 2 1 19 12 3 10 5 1 20 12 20 9 8 3 17 7
output:
1 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
result:
ok correct, length=1
Test #16:
score: 0
Accepted
time: 0ms
memory: 5860kb
input:
16 37 5 15 9 14 10 5 11 16 9 13 8 13 14 7 12 4 1 4 9 6 2 12 5 11 6 3 12 8 14 16 15 11 7 10 16 15 15 13 5 16 7 11 12 9 7 13 8 1 4 6 2 9 13 14 9 8 14 10 8 2 1 6 3 4 2 3 10 2 13 10 12 7 3 1
output:
1 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
result:
ok correct, length=1
Test #17:
score: 0
Accepted
time: 1ms
memory: 5780kb
input:
20 47 2 1 11 14 20 2 5 19 19 17 16 8 3 7 7 18 12 10 18 8 4 14 11 13 16 20 2 7 7 15 3 20 10 5 10 17 4 11 5 17 16 1 12 4 20 1 12 11 15 9 8 19 18 3 15 3 15 8 14 17 9 16 18 5 14 13 1 18 10 7 20 9 13 6 10 13 6 14 6 4 17 3 12 19 9 2 17 12 15 12 5 6 8 3
output:
1 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
result:
ok correct, length=1
Test #18:
score: 0
Accepted
time: 1ms
memory: 5824kb
input:
26 61 23 15 24 7 11 3 11 1 9 11 18 17 5 26 26 19 25 7 7 11 16 19 22 24 4 16 17 6 1 7 1 19 2 10 5 21 15 6 20 22 14 15 5 10 25 2 24 9 23 20 14 12 3 25 4 22 16 24 13 25 23 18 9 14 13 1 8 7 4 17 13 3 19 9 4 12 12 18 13 10 5 1 20 4 26 16 22 6 23 17 22 14 26 12 9 26 12 20 2 13 8 16 11 5 3 10 6 23 18 15 19...
output:
1 26 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
result:
ok correct, length=1
Test #19:
score: 0
Accepted
time: 1ms
memory: 5868kb
input:
16 36 9 11 10 12 9 15 10 16 3 5 4 6 1 3 2 4 5 13 6 14 15 7 16 8 3 13 4 14 11 7 12 8 5 9 6 10 3 15 4 16 1 7 2 8 1 13 2 14 5 1 6 2 13 11 14 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
output:
2 8 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16
result:
ok correct, length=2
Test #20:
score: 0
Accepted
time: 1ms
memory: 6072kb
input:
243 1215 67 149 227 161 27 51 206 68 106 137 213 44 31 61 46 194 209 143 52 19 217 125 132 102 105 192 216 4 205 147 194 84 60 73 155 33 67 157 123 160 121 46 61 205 210 94 88 197 226 15 145 60 130 114 184 58 218 95 37 134 71 43 217 140 103 214 180 120 84 212 213 93 198 171 208 154 231 68 181 111 12...
output:
1 243 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 99 100 10...
result:
ok correct, length=1
Test #21:
score: 0
Accepted
time: 1ms
memory: 5844kb
input:
162 729 10 36 75 50 36 78 76 52 62 128 23 134 132 49 89 30 111 114 18 71 46 114 128 111 111 159 19 6 83 121 55 12 44 95 106 91 99 50 69 24 40 42 60 103 35 61 28 91 5 29 89 122 78 104 1 113 17 31 22 11 8 34 6 74 43 2 27 132 15 72 81 105 143 78 53 74 5 45 85 130 119 42 67 100 78 90 35 161 156 90 130 1...
output:
2 81 147 125 141 150 44 8 39 63 75 48 24 99 10 97 42 64 2 114 124 5 88 33 95 31 91 155 128 4 159 13 76 34 102 22 29 84 143 113 23 26 82 111 156 47 135 86 56 77 119 17 1 30 52 50 118 16 153 160 60 89 122 126 151 85 25 27 28 57 45 103 94 138 116 21 134 137 38 69 106 11 133 3 6 7 9 12 14 15 18 19 20 3...
result:
ok correct, length=2
Test #22:
score: 0
Accepted
time: 4ms
memory: 6352kb
input:
5000 19000 2567 320 3757 1281 4856 582 4786 3232 4651 3026 4746 2499 4931 1644 1110 4723 2227 4722 4238 3466 4060 489 3164 2664 2253 3356 3370 1202 774 1178 519 3400 3466 1920 3741 4356 4941 3301 4303 2327 2849 4580 4861 2289 4066 1954 4101 4187 4432 1149 3616 4873 2844 3801 3755 931 2089 689 4195 4...
output:
5 1000 404 2644 738 34 4277 143 1365 303 2138 4170 1494 2046 1504 543 3707 4688 4530 3552 3901 3000 197 3535 4837 88 3083 3664 1769 2984 4315 1329 875 1925 2114 1942 522 2308 1151 1945 841 1448 349 389 2846 592 1335 3714 3903 513 2460 3858 4650 4119 442 4231 2567 2998 2115 2459 4686 4482 3298 4794 4...
result:
ok correct, length=5
Test #23:
score: 0
Accepted
time: 1ms
memory: 5804kb
input:
8 12 4 5 8 3 8 5 4 1 5 2 2 8 5 6 2 6 6 1 7 2 3 7 8 6
output:
1 8 1 2 3 4 5 6 7 8
result:
ok correct, length=1
Test #24:
score: 0
Accepted
time: 1ms
memory: 5772kb
input:
16 32 11 9 12 10 15 11 16 12 9 3 10 4 13 5 14 6 9 13 10 14 7 1 8 2 3 5 4 6 3 13 4 14 13 1 14 2 7 5 8 6 15 3 16 4 9 5 10 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
output:
2 8 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16
result:
ok correct, length=2
Test #25:
score: 0
Accepted
time: 1ms
memory: 5788kb
input:
4 5 2 3 2 4 1 3 4 1 1 2
output:
1 4 1 2 3 4
result:
ok correct, length=1
Test #26:
score: 0
Accepted
time: 27ms
memory: 7868kb
input:
16384 114688 7724 15711 2622 11637 6678 12087 562 1017 1794 15380 2337 8273 3247 11939 4236 10764 10400 12609 11663 8529 15404 12196 16243 14355 10882 315 3181 8641 15945 2660 1752 6947 3241 3770 5914 5981 8688 6502 703 13187 9949 688 4183 2599 12150 5172 12263 2346 6910 14326 3030 3505 4874 10690 1...
output:
2 8192 8614 13139 5743 10789 883 13663 11223 11006 16118 3755 6260 16131 8342 4902 15339 6130 2102 14946 3802 867 1875 7849 3789 11534 6064 11919 6616 3182 15565 12374 8888 8927 8851 9274 9880 16376 8248 9332 14386 14970 15275 15863 9333 2341 13261 6877 6778 2212 2071 15855 14794 571 10412 11619 887...
result:
ok correct, length=2
Test #27:
score: 0
Accepted
time: 46ms
memory: 9288kb
input:
24576 176128 5861 17065 12716 19066 19 947 20854 119 117 16316 21260 20481 632 13339 1911 17818 498 23648 19585 12918 4065 5563 3896 8774 3090 15272 8077 13050 9473 16619 12008 23839 8790 17267 18509 5666 13923 16712 2046 1861 14627 12220 211 13045 18050 3452 14385 23112 5530 21387 9078 2343 5782 24...
output:
3 8192 589 4998 24093 16322 1442 109 23633 1697 18740 3633 22466 8715 555 8722 839 6828 381 1071 9972 20137 8831 20366 6054 1888 19423 4643 21998 4158 14364 11935 4739 12005 8774 6301 331 19464 23236 15518 3447 13381 15940 3915 21359 19734 18418 19339 2025 14208 12937 15147 6818 10956 8305 3655 6665...
result:
ok correct, length=3
Test #28:
score: 0
Accepted
time: 16ms
memory: 7572kb
input:
15120 81756 14074 2369 11398 3234 1596 12546 11639 1768 6042 6697 6885 1600 10471 227 9256 8330 4789 1806 188 11941 2491 7717 5831 2206 7386 1145 8491 12344 1209 14434 13997 11283 10996 4670 7429 9616 4658 10737 6224 4898 2041 9406 342 10047 4522 6993 12449 10459 11594 6930 8886 9023 12530 4847 1335...
output:
7 2160 9931 11723 12271 6297 12039 15090 8581 11154 7542 12126 3141 11253 5597 11528 1551 8065 8543 1444 2966 6417 14586 6553 6282 9720 1886 2459 11812 5833 14154 5750 656 13115 237 12059 10327 11436 4236 11841 906 1710 13355 10297 8794 6381 12140 1506 9828 6464 13762 9020 7758 7279 11279 10591 1257...
result:
ok correct, length=7
Test #29:
score: 0
Accepted
time: 41ms
memory: 11216kb
input:
99540 198449 89149 14835 33931 9990 57297 39659 96071 39113 74492 3118 68120 66797 73082 21160 74312 34410 23917 74499 31376 82735 87771 9229 52702 89517 36821 22952 80919 81907 46705 19871 50710 69762 17125 59407 32620 49896 78667 32781 16890 79230 27707 88410 62045 8145 39448 99401 71796 45195 796...
output:
316 315 29132 8831 25689 30680 20812 24701 75527 10157 8892 51008 34307 64375 74186 53651 34433 73360 44975 27056 39194 89337 30780 63483 85145 38624 30138 83047 11479 63641 43473 5947 85001 27748 78543 74789 68979 72315 66731 59257 30210 82647 45336 12146 94638 16304 97797 62242 78401 25109 565 642...
result:
ok correct, length=316
Test #30:
score: 0
Accepted
time: 268ms
memory: 5900kb
input:
894 199809 342 637 407 892 346 203 423 357 787 622 875 153 305 428 759 894 744 247 386 685 886 750 615 66 94 628 124 223 590 854 559 106 287 357 384 352 258 378 574 517 748 213 82 732 353 334 373 211 28 236 319 233 737 636 776 392 39 386 610 279 22 709 764 470 667 833 677 259 462 340 468 136 750 728...
output:
2 447 493 857 880 428 392 654 608 154 209 852 713 829 580 245 549 349 509 165 676 698 589 378 826 317 140 343 854 590 263 809 842 195 661 863 764 741 634 149 330 598 891 693 385 15 542 1 321 143 391 671 784 389 342 124 406 729 657 646 261 750 791 397 783 100 49 216 516 112 414 121 550 72 478 565 111...
result:
ok correct, length=2
Test #31:
score: 0
Accepted
time: 371ms
memory: 8392kb
input:
632 199396 18 127 538 211 381 238 303 17 604 83 387 94 80 240 344 200 416 79 34 512 11 342 11 511 533 440 456 94 197 68 558 325 474 158 417 408 5 352 590 366 28 148 465 542 109 185 260 307 610 334 302 54 611 475 173 366 373 535 409 475 294 581 283 389 418 555 591 280 479 92 431 325 492 555 183 307 1...
output:
1 632 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 99 100 10...
result:
ok correct, length=1
Test #32:
score: 0
Accepted
time: 37ms
memory: 17064kb
input:
100000 99999 2312 22077 10466 32168 95585 98942 89965 92492 86014 22653 37128 86195 76539 12452 58590 23642 45443 26165 37638 78158 21985 71538 377 26988 94246 207 84743 82823 25753 34693 48157 64168 40378 91163 76721 51819 78106 50942 17725 12071 1185 73302 51666 41753 5644 61829 4882 59047 48810 9...
output:
100000 1 58410 19619 25075 84339 18280 93895 54571 28024 83571 69924 90463 51253 72778 18929 30347 13121 19370 49013 66419 35383 66062 11489 34845 5453 51328 91881 68212 99650 77472 13139 36784 14547 8252 64355 45683 16839 77098 5626 1005 97806 2701 70749 70...
result:
ok correct, length=100000
Test #33:
score: 0
Accepted
time: 38ms
memory: 12164kb
input:
99999 188878 64862 22873 22042 45992 9377 41645 69614 16413 33362 63451 7921 47032 72802 28650 17732 77545 68508 26424 16488 52052 51202 48881 83028 92497 56073 31680 34923 80417 12114 98352 3652 8088 73774 82609 16505 89533 34672 66570 76498 7952 58722 86631 54795 1655 29608 98885 49637 54726 13832...
output:
11111 9 64417 43690 64655 99094 89296 93205 15072 73009 32336 3509 5695 46947 53874 64647 71830 85177 95411 99635 37108 79368 47602 49130 15246 73845 16854 85976 8344 72866 72139 50842 41240 5591 63448 87317 22881 96538 79025 42301 68522 27922 72311 17907 26240 77710 22069 52186 21127 55893 475...
result:
ok correct, length=11111
Test #34:
score: 0
Accepted
time: 48ms
memory: 12668kb
input:
96369 192735 66174 26431 54985 44603 56243 55417 71535 50697 11974 28932 75950 2886 10205 34789 29441 2121 77431 9570 24054 35021 89846 77109 44950 82267 55132 32517 33318 2584 55754 9025 22418 54319 50659 95499 11829 43645 77594 95086 57504 32024 90030 76308 6192 29137 67415 5652 76014 60625 76287 ...
output:
32123 3 69374 47548 9945 16016 26783 69810 95521 76320 66650 42352 38451 52357 59234 18723 37485 17397 11826 90651 32182 32982 32103 67836 81088 51696 22567 63159 9483 36747 21032 55096 72465 17916 75062 32021 71335 70398 10870 24875 59699 3942 34319 90544 64903 63893 178 2838 34893 1...
result:
ok correct, length=32123
Test #35:
score: 0
Accepted
time: 14ms
memory: 8172kb
input:
15552 70848 3346 14558 11830 7645 3398 11164 587 1283 12051 9225 12053 7696 13908 3522 4785 7039 5415 2407 11945 13740 8950 658 12809 13466 5643 9283 9057 823 7430 3522 3248 2782 1584 14517 6457 13479 2573 12520 11295 8905 13365 9395 3897 13185 6567 2543 13759 8303 12506 1484 2390 2309 10391 4673 15...
output:
12 1296 15203 14180 10336 7189 1702 10656 15049 13071 1067 9947 4694 3687 8857 13839 3836 7316 7620 2650 14545 10567 2763 9549 6944 14309 8046 5371 2046 5739 3439 15249 12440 12210 14737 15066 10995 4260 10473 53 6839 3851 8256 2614 2461 6481 2478 1046 11605 8463 8950 5023 2607 7569 9668 1744 12648 ...
result:
ok correct, length=12
Test #36:
score: 0
Accepted
time: 25ms
memory: 11792kb
input:
100000 100000 54091 14983 76439 8580 2460 83836 16022 59989 57574 5789 73735 30986 21840 32025 8324 39780 46667 84340 63520 74272 12132 10130 22196 9498 35986 45019 37679 58366 74860 52785 79536 2371 60710 8307 54861 69272 76341 42520 9062 78601 82356 19287 859 97172 59299 45257 45623 40919 72762 74...
output:
1 100000 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 99 100...
result:
ok correct, length=1
Test #37:
score: 0
Accepted
time: 40ms
memory: 11448kb
input:
100000 150000 80794 42947 86678 6817 26099 20454 66174 82645 2960 39366 72897 92882 14682 32867 81702 44441 73783 83084 16604 51431 66609 51415 22162 27338 26907 38524 80988 95078 25494 80351 43308 50371 12223 14580 44045 82563 22825 43916 69811 4268 6402 32699 26216 70440 15446 97779 32357 32843 30...
output:
2 50000 61865 13548 47246 41901 86255 80833 35421 94555 80997 35347 90029 15645 1036 30637 77096 83462 44921 7356 94805 52859 18026 67106 11424 74376 28305 15631 44136 41369 43053 82748 64690 27679 96245 93908 65412 74925 1836 33840 7095 53591 59860 20206 18249 8206 68768 57139 20701 56602 59493 346...
result:
ok correct, length=2
Test #38:
score: 0
Accepted
time: 78ms
memory: 8212kb
input:
3960 197901 577 2805 1025 811 880 3878 736 3163 3055 477 143 855 3066 654 2397 18 935 3864 2474 32 3782 529 3427 3706 3832 1440 554 1528 1081 2914 1573 3708 2387 1529 1299 3748 508 2292 2488 3272 3047 802 2512 3871 3952 1950 3392 1177 1432 2343 2707 2724 2445 1086 1996 2708 3815 980 948 1053 925 308...
output:
40 99 3091 1 696 1583 3804 3300 3736 3153 2149 2308 3251 1589 3495 3434 717 376 40 1027 3402 2897 3526 2311 1489 1676 3683 2391 831 2524 1830 3398 2245 3532 3450 383 661 876 3263 1908 1875 2052 3010 392 3808 940 1474 1290 809 698 3527 2472 1822 384 1360 2691 2743 2856 2202 3204 575 3313 3754 355 233...
result:
ok correct, length=40
Test #39:
score: 0
Accepted
time: 34ms
memory: 12100kb
input:
100000 200000 86 85182 16753 23 77158 73238 24146 30587 61319 51078 56091 9029 29658 80460 98562 91965 23300 72604 69275 5643 60613 41486 26697 14087 53285 29446 8636 13245 5725 41748 73469 71134 3156 50243 56902 60387 46928 24097 80353 35259 23881 32520 2960 4576 19578 43449 6975 28521 75687 65551 ...
output:
1 100000 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 99 100...
result:
ok correct, length=1
Test #40:
score: 0
Accepted
time: 57ms
memory: 12092kb
input:
100000 200000 91993 59625 41773 87382 37325 3233 72579 28738 54037 14135 30730 99035 21735 86648 27404 70180 68286 2646 26946 98819 15846 35730 55754 80212 40428 23521 16226 89098 98533 86698 22070 25317 92278 33830 40012 87919 87008 75431 52981 38295 72884 18898 63326 4795 3741 7304 2406 40150 6015...
output:
2 50000 13114 43886 20892 48591 27096 18206 74626 29728 33370 38447 66553 9764 5324 31855 94900 31689 66413 85629 76016 88847 4015 29627 77933 54683 35816 99535 23672 19946 90450 53263 50300 46954 75104 29282 57042 52432 56759 21821 43098 33962 85935 20095 46982 33985 72038 52601 51295 32204 25365 8...
result:
ok correct, length=2
Test #41:
score: 0
Accepted
time: 51ms
memory: 12164kb
input:
100000 200000 80787 99226 20200 85406 80249 76053 66751 49568 62297 81265 28771 46304 26206 69099 57603 55126 6327 57002 83192 34595 34529 18126 81212 77000 75945 72060 89561 37392 89176 95209 58922 85279 76806 76328 35906 47706 99208 12616 67276 28998 33753 98627 13183 22281 35463 57985 47633 11270...
output:
10 10000 3680 88843 9640 20361 37030 39020 39956 71265 42545 95520 63196 25812 31845 34809 34101 96016 13370 52263 55313 68690 34976 29172 10647 60552 26743 86227 96627 82099 44449 51388 82928 82869 99678 68248 39611 13287 25288 97981 59592 47544 51034 48914 49112 37151 11300 22918 44445 38172 72351...
result:
ok correct, length=10
Test #42:
score: 0
Accepted
time: 0ms
memory: 6352kb
input:
6531 15840 3777 2813 1527 6006 3062 2316 6079 4255 4995 1158 3579 1856 2084 5020 4544 1652 5545 3640 5126 3494 6308 4782 2843 4508 2528 3260 3590 2993 1605 5460 2666 4908 402 5601 1389 5693 1391 4667 3265 653 5418 256 848 3551 5633 1390 3605 4519 5233 5861 1252 2097 2224 4112 4570 2701 2883 5817 162...
output:
311 21 2451 1505 5745 1005 2621 1751 1387 191 4582 2328 6028 2361 4736 2602 2669 3240 1813 3575 3580 4008 409 231 304 365 764 1223 1299 1570 2325 2354 2462 2543 2636 2680 3211 4317 4335 4789 5567 5775 5838 5858 1490 6351 209 1603 5182 4745 3402 2201 6496 4902 4018 4074 873 5138 1233 1769 1192 2482...
result:
ok correct, length=311
Test #43:
score: 0
Accepted
time: 4ms
memory: 6476kb
input:
9832 22114 8236 6222 920 9270 7748 3236 6799 697 2530 680 6575 1905 2291 7596 2449 2191 6976 5976 4804 3997 1710 712 3112 3142 2493 5466 4308 2928 6724 6930 6060 8033 1247 7709 1057 9313 1341 514 2372 6534 1006 5209 6081 7443 6772 7399 8092 7819 1334 4825 6505 9791 9213 2455 1387 7090 8852 2908 4401...
output:
1229 8 5498 8379 4697 1180 1089 3253 6095 1069 111 2593 3111 3138 3148 4057 4787 8430 6710 9397 7355 2603 5888 5110 711 4311 705 77 7826 2795 8455 6970 1080 9372 2331 369 8258 4367 635 4450 1702 1461 2722 5102 2223 3199 4997 2132 4938 1986 6663 4870 8171 2873 6936 7178 1255 52 3325 6559 8860 ...
result:
ok correct, length=1229
Test #44:
score: 0
Accepted
time: 173ms
memory: 8508kb
input:
1200 180300 786 728 504 1005 450 1092 781 1114 673 599 1177 125 242 123 1082 113 759 271 602 718 1089 153 251 995 73 539 1019 957 1198 641 1139 1045 407 25 28 158 752 449 724 1174 511 947 641 471 129 957 51 447 490 1088 1080 507 492 948 362 1179 226 626 417 929 443 260 880 22 1101 229 723 41 811 56 ...
output:
4 300 746 912 539 506 1070 1126 71 765 450 984 115 458 53 560 684 180 549 1185 435 1137 85 183 756 725 878 1101 470 522 88 758 627 785 1023 426 897 1130 187 394 421 1083 802 406 904 1192 720 861 364 327 846 447 892 632 51 207 508 687 980 284 185 634 993 162 288 26 280 958 253 1084 794 1128 967 1191 ...
result:
ok correct, length=4
Extra Test:
score: 0
Extra Test Passed