QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#85437 | #5238. Fotografia [C] | anhduc2701 | 10 ✓ | 28ms | 50608kb | C++23 | 2.5kb | 2023-03-07 19:15:52 | 2023-03-07 19:16:37 |
Judging History
answer
/*
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
*/
#include<bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define len(x) (int)(x.size())
#define eb emplace_back
#define PI 3.14159265359
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define BIT(x,i) (1&((x)>>(i)))
#define MASK(x) (1LL<<(x))
#define task "FOT"
typedef long long ll;
const ll INF=1e18;
const int maxn=1e6+5;
const int mod=1e9+7;
const int mo=998244353;
using pi=pair<ll,ll>;
using vi=vector<ll>;
using pii=pair<pair<ll,ll>,ll>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int n;
int a[maxn];
int ok[maxn];
vector<int>vt;
vector<int>q[maxn];
int st[maxn];
vector<pair<int,int>>ans[maxn];
int k=0;
int pos[maxn];
void dequy(vector<int>q,int ti){
if(len(q)<=1){
return;
}
if(len(q)==2){
k=max(k,1);
ans[ti].pb({q[0],q[1]});
return;
}
k=max(k,ti);
int sz=len(q);
vector<int>d1=q;
for(int i=0;i<q.size();i++){
pos[q[i]]=i;
}
int so=sz-1;
ans[ti+1].pb({q[0],q[1]});
for(int i=1;i<so;i++){
ans[ti].pb({q[i],q[so]});
swap(q[i],q[so]);
so--;
}
for(int i=2;i<q.size();i++){
if(d1[pos[q[i]]+1]>d1[i]){
ans[ti+1].pb({d1[pos[q[i]]+1],d1[i]});
}
}
k=2;
}
signed main()
{
cin.tie(0),cout.tie(0)->sync_with_stdio(0);
// freopen(task".inp" , "r" , stdin);
// freopen(task".out" , "w" , stdout);
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
vt.pb(a[i]);
}
sort(vt.begin(),vt.end());
vt.resize(distance(vt.begin(),unique(vt.begin(),vt.end())));
for(int i=1;i<=n;i++){
a[i]=lower_bound(vt.begin(),vt.end(),a[i])-vt.begin()+1;
// cout<<a[i]<<" ";
}
// cout<<'\n';
int cycle=0;
int d=0;
for(int i=1;i<=n;i++){
if(ok[a[i]]==0){
int x=i;
cycle++;
while(ok[x]==0){
ok[x]=1;
q[cycle].pb(x);
x=a[x];
}
// cout<<"\n";
dequy(q[cycle],1);
}
}
cout<<k<<"\n";
for(int i=1;i<=k;i++){
deque<int>de;
for(auto v:ans[i]){
de.push_front(v.fi);
de.push_back(v.se);
}
cout<<de.size()<<"\n";
for(auto v:de){
cout<<v<<" ";
}
cout<<'\n';
}
return 0;
}
详细
Subtask #1:
score: 1
Accepted
Test #1:
score: 1
Accepted
time: 12ms
memory: 50396kb
input:
5 138 352 915 1375 2848
output:
0
result:
ok correct plan!
Test #2:
score: 0
Accepted
time: 4ms
memory: 50436kb
input:
5 2182 1715 524 2331 2791
output:
1 2 1 3
result:
ok correct plan!
Test #3:
score: 0
Accepted
time: 4ms
memory: 50352kb
input:
4 77 774 1089 2658
output:
0
result:
ok correct plan!
Test #4:
score: 0
Accepted
time: 8ms
memory: 50392kb
input:
3 517 1232 2233
output:
0
result:
ok correct plan!
Test #5:
score: 0
Accepted
time: 8ms
memory: 50396kb
input:
2 2174 2569
output:
0
result:
ok correct plan!
Test #6:
score: 0
Accepted
time: 11ms
memory: 50400kb
input:
2 1790 2393
output:
0
result:
ok correct plan!
Test #7:
score: 0
Accepted
time: 17ms
memory: 50416kb
input:
5 1111 1996 228 2700 1740
output:
2 4 4 2 3 5 4 4 1 2 3
result:
ok correct plan!
Test #8:
score: 0
Accepted
time: 11ms
memory: 50352kb
input:
3 378 274 1644
output:
1 2 1 2
result:
ok correct plan!
Test #9:
score: 0
Accepted
time: 4ms
memory: 50300kb
input:
5 2108 2822 2877 55 743
output:
2 4 5 3 4 2 4 5 1 3 4
result:
ok correct plan!
Test #10:
score: 0
Accepted
time: 16ms
memory: 50344kb
input:
2 1998 2103
output:
0
result:
ok correct plan!
Test #11:
score: 0
Accepted
time: 3ms
memory: 50436kb
input:
5 2415 697 1067 813 2616
output:
2 2 4 2 2 1 4
result:
ok correct plan!
Test #12:
score: 0
Accepted
time: 15ms
memory: 50432kb
input:
5 1979 605 1578 2181 2305
output:
2 2 3 2 2 1 3
result:
ok correct plan!
Test #13:
score: 0
Accepted
time: 12ms
memory: 50428kb
input:
5 2918 2570 2733 959 356
output:
2 4 3 1 5 4 2 2 3
result:
ok correct plan!
Test #14:
score: 0
Accepted
time: 11ms
memory: 50396kb
input:
2 2906 395
output:
1 2 1 2
result:
ok correct plan!
Test #15:
score: 0
Accepted
time: 11ms
memory: 50428kb
input:
2 283 1574
output:
0
result:
ok correct plan!
Test #16:
score: 0
Accepted
time: 5ms
memory: 50360kb
input:
3 1530 462 2203
output:
1 2 1 2
result:
ok correct plan!
Test #17:
score: 0
Accepted
time: 12ms
memory: 50388kb
input:
5 1266 1707 1664 555 478
output:
2 4 4 3 5 2 4 5 1 3 4
result:
ok correct plan!
Subtask #2:
score: 1
Accepted
Test #18:
score: 1
Accepted
time: 12ms
memory: 50404kb
input:
10 321 457 797 885 892 1367 2480 2742 2767 2955
output:
0
result:
ok correct plan!
Test #19:
score: 0
Accepted
time: 15ms
memory: 50464kb
input:
10 1237 39 2762 2728 2645 2669 1833 1836 1572 1560
output:
1 10 6 5 4 3 1 2 10 9 7 8
result:
ok correct plan!
Test #20:
score: 0
Accepted
time: 13ms
memory: 50416kb
input:
5 1274 1245 959 1921 2047
output:
1 2 1 3
result:
ok correct plan!
Test #21:
score: 0
Accepted
time: 8ms
memory: 50296kb
input:
8 706 742 2453 1051 1813 1996 924 2834
output:
1 2 3 7
result:
ok correct plan!
Test #22:
score: 0
Accepted
time: 4ms
memory: 50352kb
input:
7 1829 1214 637 1509 263 2824 2661
output:
1 6 6 2 1 5 3 7
result:
ok correct plan!
Test #23:
score: 0
Accepted
time: 4ms
memory: 50400kb
input:
4 2812 1607 216 2984
output:
1 2 1 3
result:
ok correct plan!
Test #24:
score: 0
Accepted
time: 7ms
memory: 50388kb
input:
10 667 1242 121 2290 382 197 616 2857 2685 1637
output:
2 6 8 2 5 3 6 7 6 10 4 1 5 8 7
result:
ok correct plan!
Test #25:
score: 0
Accepted
time: 8ms
memory: 50440kb
input:
5 307 228 1861 1304 1280
output:
1 4 3 1 2 5
result:
ok correct plan!
Test #26:
score: 0
Accepted
time: 8ms
memory: 50364kb
input:
9 1027 956 2912 2501 1885 2595 1302 2631 2847
output:
2 6 4 9 1 2 7 5 4 8 3 9 7
result:
ok correct plan!
Test #27:
score: 0
Accepted
time: 17ms
memory: 50396kb
input:
2 2609 1996
output:
1 2 1 2
result:
ok correct plan!
Test #28:
score: 0
Accepted
time: 8ms
memory: 50404kb
input:
5 2499 798 1853 1792 2223
output:
2 2 5 2 4 4 1 5 2
result:
ok correct plan!
Test #29:
score: 0
Accepted
time: 17ms
memory: 50336kb
input:
10 2746 1093 2954 1693 2431 1698 2687 2029 355 597
output:
2 6 7 3 1 9 10 6 6 8 5 2 3 7 6
result:
ok correct plan!
Test #30:
score: 0
Accepted
time: 16ms
memory: 50364kb
input:
3 1499 2919 1039
output:
2 2 2 3 2 1 2
result:
ok correct plan!
Test #31:
score: 0
Accepted
time: 4ms
memory: 50432kb
input:
8 178 1662 2902 2717 2054 776 1960 245
output:
2 6 5 7 4 8 3 6 6 5 8 2 4 7 3
result:
ok correct plan!
Test #32:
score: 0
Accepted
time: 8ms
memory: 50396kb
input:
4 2892 2087 1565 180
output:
1 4 2 1 4 3
result:
ok correct plan!
Test #33:
score: 0
Accepted
time: 12ms
memory: 50352kb
input:
1 1871
output:
0
result:
ok correct plan!
Test #34:
score: 0
Accepted
time: 13ms
memory: 50368kb
input:
10 2101 2832 2413 291 2116 1119 2447 1746 205 731
output:
2 8 10 2 4 6 9 7 5 8 10 10 8 7 9 1 6 4 2 3 5
result:
ok correct plan!
Subtask #3:
score: 1
Accepted
Test #35:
score: 1
Accepted
time: 8ms
memory: 50400kb
input:
20 29 2902 1870 1908 711 1878 2034 1658 1690 533 1080 689 2282 2637 1599 1912 2365 2015 2659 275
output:
1 14 14 13 7 6 4 3 2 20 10 12 11 15 16 18
result:
ok correct plan!
Test #36:
score: 0
Accepted
time: 8ms
memory: 50364kb
input:
17 2814 163 182 457 2403 1817 981 1639 922 779 1216 1497 1545 875 679 459 143
output:
1 10 8 7 6 5 1 17 16 15 10 14
result:
ok correct plan!
Test #37:
score: 0
Accepted
time: 8ms
memory: 50396kb
input:
16 18 1723 2335 1290 1674 1341 523 1094 2529 2185 572 273 1642 287 1398 2584
output:
1 14 10 9 6 5 4 3 2 12 14 7 11 8 15 13
result:
ok correct plan!
Test #38:
score: 0
Accepted
time: 8ms
memory: 50348kb
input:
7 872 1040 468 220 370 2490 2599
output:
1 4 2 1 4 5
result:
ok correct plan!
Test #39:
score: 0
Accepted
time: 11ms
memory: 50440kb
input:
12 2576 1207 2984 1769 1888 2139 2002 2314 2281 2382 157 1729
output:
1 8 8 6 3 1 11 12 7 9
result:
ok correct plan!
Test #40:
score: 0
Accepted
time: 16ms
memory: 50404kb
input:
20 452 2228 1112 264 812 56 2827 2442 1285 1432 2007 1874 2837 2684 1918 2812 61 1585 2839 2167
output:
2 12 19 11 15 18 14 4 6 17 9 10 12 20 16 13 11 8 7 17 2 6 1 4 3 14 16 18 15 10 19
result:
ok correct plan!
Test #41:
score: 0
Accepted
time: 22ms
memory: 50352kb
input:
3 1873 229 1114
output:
2 2 3 2 2 1 3
result:
ok correct plan!
Test #42:
score: 0
Accepted
time: 18ms
memory: 50436kb
input:
5 511 1208 2045 1272 535
output:
2 2 3 5 2 2 3
result:
ok correct plan!
Test #43:
score: 0
Accepted
time: 4ms
memory: 50440kb
input:
2 1589 1045
output:
1 2 1 2
result:
ok correct plan!
Test #44:
score: 0
Accepted
time: 12ms
memory: 50352kb
input:
11 2255 1687 2717 177 802 965 512 2606 2521 1243 2948
output:
2 8 8 10 2 7 4 6 5 9 6 3 4 1 7 2 10
result:
ok correct plan!
Test #45:
score: 0
Accepted
time: 15ms
memory: 50460kb
input:
20 2536 2603 2822 2949 2772 1703 336 396 2965 2476 2059 2140 2767 637 579 1545 2268 2665 139 222
output:
2 18 10 17 5 15 18 3 7 16 13 19 4 8 6 14 2 20 9 12 18 7 18 15 5 11 20 8 19 1 13 16 3 17 9 2 14 6 4
result:
ok correct plan!
Test #46:
score: 0
Accepted
time: 14ms
memory: 50396kb
input:
4 1997 1471 2861 1506
output:
2 2 3 2 4 4 1 3 2
result:
ok correct plan!
Test #47:
score: 0
Accepted
time: 12ms
memory: 50396kb
input:
6 1963 1190 229 2118 2630 31
output:
2 4 2 4 6 3 4 6 1 4 5
result:
ok correct plan!
Test #48:
score: 0
Accepted
time: 15ms
memory: 50420kb
input:
4 392 69 447 239
output:
2 2 3 2 4 4 1 3 2
result:
ok correct plan!
Test #49:
score: 0
Accepted
time: 5ms
memory: 50364kb
input:
7 345 230 1730 967 1435 2572 2533
output:
2 6 6 5 1 2 4 7 2 3 5
result:
ok correct plan!
Test #50:
score: 0
Accepted
time: 12ms
memory: 50368kb
input:
20 1363 878 95 2911 1609 2500 2208 1656 78 561 2306 1878 2320 1543 150 1151 2389 572 1850 1662
output:
2 18 19 6 2 3 15 7 16 11 8 9 14 12 20 4 10 5 18 17 20 11 16 6 19 17 10 4 20 12 1 8 7 15 3 2 13 18 5 14 9
result:
ok correct plan!
Subtask #4:
score: 1
Accepted
Test #51:
score: 1
Accepted
time: 14ms
memory: 50352kb
input:
100 2985 38 1126 111 1953 886 2186 417 776 326 2961 388 240 1592 1203 1768 581 514 494 2762 1954 641 1731 685 723 1718 1143 761 318 2532 1193 1596 194 2014 2703 2515 2107 1049 2504 1088 1327 102 744 1162 1177 830 2579 461 1362 1100 1273 2471 2077 2628 1541 426 839 1643 1708 732 652 2665 1765 483 191...
output:
1 72 97 80 78 75 62 54 53 52 49 47 41 39 37 36 35 34 32 31 30 27 26 23 21 20 17 16 15 14 11 9 8 7 6 5 3 1 99 42 66 33 74 13 29 98 56 48 64 19 93 67 61 60 43 84 46 57 68 92 83 73 82 50 85 51 79 71 89 90 76 95 81 100
result:
ok correct plan!
Test #52:
score: 0
Accepted
time: 8ms
memory: 50432kb
input:
55 953 121 130 1548 1252 2293 2389 1344 2533 2668 654 715 1012 868 887 1509 939 16 994 757 1150 1269 2216 351 1153 1832 2427 2573 549 1353 1365 1391 909 269 1612 1665 1284 2417 1942 1945 2151 1181 391 461 2391 1889 1304 646 1342 2598 2601 2803 649 2723 2607
output:
1 34 52 38 28 27 26 23 22 16 13 10 9 8 7 6 5 4 1 18 34 24 43 44 29 48 53 20 33 25 42 37 47 49 46 55
result:
ok correct plan!
Test #53:
score: 0
Accepted
time: 11ms
memory: 50392kb
input:
63 157 2767 1602 272 366 821 644 1630 1912 417 1668 2114 416 893 914 2772 962 1673 1050 1089 2123 2851 1152 1250 2752 1418 1927 1510 1555 2715 215 443 719 984 1957 2364 2242 1904 1885 569 1497 1693 2609 722 1119 1862 2859 1844 2406 2526 2035 2622 2714 1597 2751 1284 177 946 2836 1129 2322 2908 2947
output:
1 42 47 43 38 37 36 35 30 27 25 22 21 18 16 12 11 9 8 7 6 3 2 57 31 13 10 32 40 33 44 58 34 45 60 56 41 54 42 48 46 39 51 61
result:
ok correct plan!
Test #54:
score: 0
Accepted
time: 9ms
memory: 50396kb
input:
65 1212 2294 45 152 2234 500 1765 1025 437 234 1394 755 632 688 748 596 2592 1092 892 901 1403 982 987 1004 2637 403 2037 834 1116 1125 1626 16 591 976 1512 1140 2000 2053 1709 2565 388 1868 2303 1960 1631 2024 1090 1697 2842 2945 174 33 1922 1752 766 2596 1020 2808 2647 2839 2087 2874 2889 2200 2996
output:
1 42 58 50 49 43 40 38 37 31 27 25 21 18 17 12 11 8 7 6 5 2 1 32 52 51 10 41 26 33 16 55 28 34 57 47 36 45 48 54 53 61 64 59
result:
ok correct plan!
Test #55:
score: 0
Accepted
time: 14ms
memory: 50304kb
input:
46 181 313 2481 276 1408 983 862 560 2920 814 448 1713 2828 2469 389 2459 2246 359 1957 1446 1912 1558 881 1727 1557 1426 2272 2081 1288 2029 2579 2390 2403 2581 993 921 2472 302 2501 2312 2446 2726 909 2865 639 2997
output:
1 32 34 31 27 21 19 17 16 14 13 12 9 7 6 5 3 2 4 38 18 15 11 45 23 43 36 35 29 26 25 30 40 41
result:
ok correct plan!
Test #56:
score: 0
Accepted
time: 8ms
memory: 50400kb
input:
100 2399 1088 94 2815 1295 2746 2576 1061 2689 2468 137 2198 1222 886 2449 531 2923 1190 631 2131 1157 924 2622 2596 58 647 767 1196 1726 2137 2246 479 653 931 1433 1873 129 738 689 239 752 2024 607 2685 2585 1923 675 242 983 1341 300 2853 1446 1980 2992 1948 2571 627 2377 368 1761 532 2245 2906 206...
output:
2 66 80 96 56 100 52 67 75 59 50 70 54 57 85 87 22 41 20 18 98 28 78 31 13 71 79 9 90 83 91 48 4 38 1 76 25 99 37 11 40 81 89 51 60 46 32 88 44 62 43 58 26 33 47 39 82 72 77 49 84 45 68 94 92 61 86 95 72 66 97 64 55 68 42 84 36 35 30 72 29 57 24 74 23 21 69 19 17 88 15 73 14 60 12 53 10 90 7 6 37 5...
result:
ok correct plan!
Test #57:
score: 0
Accepted
time: 18ms
memory: 50344kb
input:
9 1054 167 2039 153 2316 2073 1110 2104 554
output:
2 6 7 6 1 4 9 5 4 9 3 6 7
result:
ok correct plan!
Test #58:
score: 0
Accepted
time: 8ms
memory: 50400kb
input:
8 2204 1364 2131 1248 2817 947 415 1709
output:
2 6 5 4 1 7 6 8 4 6 2 4 3
result:
ok correct plan!
Test #59:
score: 0
Accepted
time: 12ms
memory: 50404kb
input:
68 1399 2385 1575 958 632 1612 401 1605 2355 880 2075 2883 575 1764 2455 1807 1264 123 607 2722 1103 1358 2481 690 1233 1511 2073 1620 2862 2310 2069 471 2778 2694 1019 1722 1005 2324 2515 1589 882 2835 310 205 2234 400 2252 2841 2829 720 1315 976 2463 1897 954 260 2423 94 1649 2238 2874 1795 2926 1...
output:
2 42 61 49 48 42 22 59 57 39 40 54 67 14 50 8 33 11 17 29 52 28 26 58 34 18 44 56 43 46 32 13 19 24 41 31 55 53 35 25 68 64 62 66 48 38 30 68 27 20 57 16 41 15 51 12 37 10 9 60 6 5 56 4 65 3 2 58 1 26 28 52 29 44 17 23 11 33 46 50 14 19 67 24 54 40 39 55 59 42 63 48 49
result:
ok correct plan!
Test #60:
score: 0
Accepted
time: 3ms
memory: 50316kb
input:
98 525 1890 2961 1280 2617 33 172 1709 1537 311 2704 497 532 2171 1627 28 374 2368 946 1492 1827 2983 59 1049 1936 1690 1615 904 474 2220 1901 2372 1315 2628 2872 1797 1179 1951 933 2411 88 1673 434 1692 2440 1088 292 1722 1629 393 1433 1908 1566 2135 132 2272 610 2845 2752 647 2165 1993 2946 1975 5...
output:
2 64 71 63 66 75 36 81 92 74 83 69 56 24 76 98 52 37 26 44 42 67 18 86 25 39 8 78 82 32 94 96 55 17 16 6 65 54 23 41 27 47 91 58 79 50 43 29 46 77 68 57 60 38 28 70 90 89 59 93 85 51 53 64 95 80 66 61 40 93 35 89 34 70 31 76 22 21 68 20 77 19 44 15 49 14 72 13 11 91 9 78 5 73 4 94 3 2 16 1 17 12 55...
result:
ok correct plan!
Test #61:
score: 0
Accepted
time: 8ms
memory: 50324kb
input:
100 2592 2323 2107 2807 1627 869 235 779 2628 86 309 948 2503 976 2117 1154 1361 617 1653 486 1903 1576 1015 1802 5 936 24 911 2489 1263 1773 1255 1913 2876 571 2266 52 1833 2665 913 1549 2553 1483 1054 219 89 2096 212 1737 1270 2809 2698 1744 2079 60 734 1447 1464 2945 2018 844 1261 2260 1791 1401 ...
output:
2 98 79 66 24 94 39 23 56 22 67 97 51 58 75 3 37 14 11 45 30 6 46 100 59 19 35 80 92 85 82 36 12 7 96 4 55 41 44 62 53 43 32 28 70 33 40 72 69 21 91 25 68 38 81 63 73 54 77 15 88 99 34 26 8 78 87 13 90 76 89 42 16 95 52 98 84 2 27 83 93 9 71 60 74 47 50 57 10 48 17 20 18 86 29 61 49 65 64 31 98 51 ...
result:
ok correct plan!
Test #62:
score: 0
Accepted
time: 16ms
memory: 50356kb
input:
76 1924 2129 734 648 2244 2274 1239 1788 605 1896 958 140 1071 1765 2821 1920 723 2742 93 2585 508 1545 527 302 1942 82 1118 460 137 1501 2163 229 2414 2530 2188 444 2170 2520 471 677 1243 2429 1808 2095 2364 2379 135 2937 398 2710 2069 2800 447 2582 152 1033 665 953 650 1367 2043 1780 699 358 932 1...
output:
2 70 76 48 43 22 59 35 13 36 27 17 74 52 25 63 45 14 53 61 6 29 68 38 41 60 56 21 4 19 23 57 31 65 70 54 51 75 15 28 3 26 72 50 16 39 73 69 47 8 55 44 66 33 11 64 46 62 67 42 30 71 20 9 32 58 37 7 12 49 10 24 76 38 68 61 53 63 52 74 27 36 59 22 43 76 40 49 58 32 71 67 46 64 66 44 47 5 69 2 70 65 31...
result:
ok correct plan!
Test #63:
score: 0
Accepted
time: 16ms
memory: 50396kb
input:
53 2380 2927 2328 2374 2313 2345 1688 215 1467 2818 1237 2392 1158 1005 490 2816 301 875 2400 2783 624 2151 2389 2948 1496 1733 182 1555 1684 265 605 2571 1457 171 240 1503 342 2437 1079 224 725 2042 1544 440 2858 1240 2158 520 108 1963 1796 889 1353
output:
2 50 26 25 30 29 28 43 23 53 24 33 51 45 19 39 3 27 36 22 46 38 5 40 6 35 42 49 16 18 14 21 11 15 41 4 8 17 52 2 34 50 10 44 12 48 20 13 31 7 37 47 52 47 37 9 40 38 46 22 27 39 45 51 24 53 23 28 29 31 48 50 52 8 41 14 16 49 1 42 35 6 5 36 3 19 33 43 30 13 20 12 44 10 34 2 17 4 15 11 21 18 25 26 32
result:
ok correct plan!
Test #64:
score: 0
Accepted
time: 4ms
memory: 50436kb
input:
24 2860 1534 2825 721 214 608 789 2794 242 2338 2283 1243 535 27 702 597 2771 2493 1174 1215 1149 469 1170 405
output:
2 20 20 18 11 7 16 12 21 17 4 24 14 19 5 22 8 6 13 23 3 9 24 21 16 7 20 15 23 13 22 2 19 14 1 24 4 10 17 12 11 18 9 3 6 8 5
result:
ok correct plan!
Test #65:
score: 0
Accepted
time: 18ms
memory: 50464kb
input:
22 267 2488 1628 2266 516 1154 1452 2588 2793 781 2583 2903 168 1948 402 2200 2339 785 1246 1861 2589 1031
output:
2 18 21 9 19 8 6 18 11 17 2 13 14 15 4 5 10 7 22 12 22 18 6 8 19 9 20 22 3 17 16 1 2 14 13 11 21 12 7 10 5 4 15
result:
ok correct plan!
Test #66:
score: 0
Accepted
time: 8ms
memory: 50416kb
input:
100 868 1764 2473 1167 1836 474 605 855 446 2604 1145 393 1333 621 1963 2548 311 968 394 1334 1654 2980 2952 1635 1609 1845 2711 540 1622 1103 196 211 1872 158 2329 839 607 2398 2157 1263 1478 2923 1820 476 1611 1172 2081 2351 145 361 2583 2403 2233 1199 2036 1482 2909 266 814 221 1420 812 1506 1452...
output:
2 98 92 27 62 77 39 46 97 42 78 53 71 33 79 87 3 49 41 40 54 90 10 17 44 20 76 47 61 21 7 32 82 35 18 68 70 26 99 22 37 11 50 56 66 85 52 63 69 5 31 89 51 95 67 43 13 12 88 16 6 75 98 23 14 19 28 59 29 36 30 8 60 24 100 91 81 73 15 9 58 45 65 74 55 83 48 64 2 84 38 4 34 96 57 25 93 94 86 72 100 69 ...
result:
ok correct plan!
Subtask #5:
score: 1
Accepted
Test #67:
score: 1
Accepted
time: 9ms
memory: 50444kb
input:
1000 2271 250 4 10 11 13 404 15 1911 2785 308 32 975 2111 1010 2335 2200 1626 45 46 2125 52 53 59 63 2138 2101 837 71 2503 2508 2659 79 542 90 92 299 602 106 2181 159 2167 2550 482 2702 1390 1487 2903 125 1687 129 466 143 279 1319 748 132 148 1141 111 336 164 175 2267 633 186 483 548 946 196 1085 20...
output:
1 678 960 940 937 918 903 890 886 869 855 846 843 839 837 836 830 827 808 806 797 792 786 785 781 779 762 748 744 731 720 719 714 705 698 688 687 685 682 679 678 673 672 666 665 655 651 650 647 646 641 636 633 632 626 624 623 618 616 614 613 607 597 596 595 590 588 583 580 577 573 560 559 554 548 54...
result:
ok correct plan!
Test #68:
score: 0
Accepted
time: 8ms
memory: 50484kb
input:
381 4 32 1296 15 1120 232 1706 1413 46 2560 2265 54 58 67 1877 2918 84 1561 282 2005 2596 2573 152 2623 1399 281 187 194 2794 226 39 2399 1460 1246 178 114 292 2783 367 2940 319 320 593 2406 769 2109 350 300 370 1880 2341 377 2551 385 431 393 505 2416 2902 614 391 821 897 2444 2345 1617 2432 1552 29...
output:
1 252 369 349 348 341 329 327 299 297 296 294 291 284 282 269 265 254 249 229 227 224 218 213 211 208 207 206 205 201 199 197 191 189 185 184 182 179 176 171 170 169 168 165 162 161 160 159 156 154 153 149 146 141 140 139 136 135 134 130 128 126 124 123 117 115 113 110 109 98 96 94 92 90 89 87 83 80...
result:
ok correct plan!
Test #69:
score: 0
Accepted
time: 7ms
memory: 50420kb
input:
633 80 1590 412 1592 2437 17 257 20 2163 2063 24 987 2144 2296 42 886 413 2440 1085 1646 229 69 70 703 75 2 81 2545 1781 112 116 1615 2136 1737 1411 156 159 1660 170 174 2145 843 191 2971 259 197 1395 463 2001 2576 571 1218 2990 1822 410 220 2045 224 228 67 2318 239 2316 1641 2810 19 195 263 2724 38...
output:
1 420 553 530 516 512 510 507 496 479 471 461 455 445 443 440 438 436 417 416 414 413 411 410 396 395 389 379 372 369 367 364 362 361 356 355 350 346 344 343 336 334 328 327 325 322 314 312 311 308 307 305 302 297 295 290 288 286 285 284 283 282 280 278 273 272 271 270 269 268 267 259 258 252 251 25...
result:
ok correct plan!
Test #70:
score: 0
Accepted
time: 8ms
memory: 50364kb
input:
56 6 44 850 105 591 372 1539 440 2773 460 692 241 1438 513 749 2844 103 1052 2083 2085 1269 1100 1140 1167 2659 1080 1298 2258 2138 1436 639 407 1574 1729 1879 1934 2836 1967 2378 1074 1077 1433 1300 2262 2289 2056 2511 2569 1216 449 2835 1965 786 2848 2868 2976
output:
1 30 39 37 29 28 25 21 20 19 16 13 11 9 7 5 3 17 12 32 50 14 31 53 40 41 26 49 43 42 52 46
result:
ok correct plan!
Test #71:
score: 0
Accepted
time: 3ms
memory: 50388kb
input:
842 14 719 1818 9 1782 6 1186 903 25 1787 29 33 1627 38 40 1842 1085 2192 64 56 1625 2956 60 63 55 2446 2353 1700 69 1962 973 78 2224 1328 2456 89 1745 2759 102 110 113 117 119 2834 2317 126 128 132 1810 1100 1477 141 2335 2678 2763 1798 1550 167 176 177 410 185 356 561 198 204 981 855 2389 220 2483...
output:
1 538 773 770 737 736 725 714 706 702 696 686 685 682 675 671 653 646 645 642 638 637 631 628 623 609 608 607 600 599 594 593 588 582 580 570 559 557 551 550 549 546 543 539 534 533 531 527 525 520 518 512 503 501 498 497 489 487 486 481 480 479 475 472 470 469 464 463 461 458 454 442 437 433 431 42...
result:
ok correct plan!
Test #72:
score: 0
Accepted
time: 20ms
memory: 50428kb
input:
1000 369 505 2388 1625 20 1023 94 2624 2181 2606 572 132 66 2061 1060 2275 1346 2743 1357 2678 2147 1289 2837 1728 1411 1371 2660 231 963 1784 1566 1301 1013 641 1793 453 2049 2974 121 633 1491 2690 620 2111 1364 2252 2373 1806 1320 26 1036 2263 2754 927 27 2703 784 2303 644 2646 1751 1142 715 1905 ...
output:
2 998 216 584 86 248 159 437 89 352 142 36 493 911 382 825 854 765 585 136 515 516 188 191 725 720 715 77 433 296 707 511 788 464 744 423 645 571 730 144 700 897 20 66 418 819 960 918 997 671 37 702 424 524 806 829 985 653 576 910 415 22 13 55 714 945 168 767 573 811 189 202 595 539 851 555 572 644 ...
result:
ok correct plan!
Test #73:
score: 0
Accepted
time: 12ms
memory: 50432kb
input:
547 2883 1901 1840 2452 2377 2862 2279 721 368 1776 1010 1879 811 1983 2099 429 2916 1044 2550 1210 2657 2802 1792 1013 2219 1081 460 619 2860 2095 2153 2400 2699 1541 2243 2544 1882 1266 1212 2795 61 1415 1699 2209 2122 1844 869 194 746 1921 1987 1890 2320 590 960 1932 175 2183 1104 2205 2187 1888 ...
output:
2 544 95 421 464 442 424 53 296 367 295 149 380 458 452 487 21 57 305 64 259 346 335 134 288 110 514 517 378 171 462 509 40 343 350 87 315 435 446 125 49 195 387 107 516 466 36 488 410 35 205 88 444 388 390 266 360 104 198 522 227 207 112 506 173 317 496 123 377 45 418 477 147 89 146 426 538 210 238...
result:
ok correct plan!
Test #74:
score: 0
Accepted
time: 8ms
memory: 50476kb
input:
592 2063 2524 577 2108 2185 2165 774 1853 2256 1296 796 2571 205 1952 2081 2541 1808 2941 2526 2942 2889 2984 189 264 1237 1784 1561 788 1563 246 920 454 2020 2603 2450 1053 2739 317 2937 2038 803 474 2736 802 2414 2549 1597 114 2400 1384 1779 1423 877 2758 1462 2568 258 2078 949 887 838 568 583 437...
output:
2 588 203 435 531 510 551 315 540 189 439 125 87 412 230 475 226 462 121 214 366 63 361 101 580 566 399 457 163 44 485 279 322 419 162 174 348 421 306 29 546 71 499 386 270 243 25 376 422 286 80 310 292 120 396 124 544 479 414 231 515 416 89 42 428 573 195 410 432 397 313 466 409 171 297 225 145 342...
result:
ok correct plan!
Test #75:
score: 0
Accepted
time: 4ms
memory: 50436kb
input:
822 2408 240 300 883 1412 2250 2930 2623 2708 14 2769 2069 1944 1987 740 1870 2599 399 1817 2923 2779 859 151 2600 704 1499 1672 1679 1866 375 639 2866 238 984 665 612 2070 2777 1310 163 19 2136 1566 768 115 231 2382 933 686 785 2715 1116 2661 2663 1810 1599 1489 1497 2825 421 1020 1839 160 112 828 ...
output:
2 820 770 467 776 139 793 522 62 775 234 124 243 231 489 269 450 117 714 278 381 228 671 600 264 75 312 631 563 418 297 645 733 9 72 802 546 86 147 647 224 745 772 206 262 543 155 603 101 510 105 403 171 291 315 487 663 672 165 707 256 429 184 394 290 266 549 680 569 417 319 350 618 236 744 362 218 ...
result:
ok correct plan!
Test #76:
score: 0
Accepted
time: 16ms
memory: 50372kb
input:
168 2529 1437 1433 2675 593 1573 1533 1415 884 423 355 2873 1543 97 932 1196 2321 651 2020 1962 310 1030 718 796 2591 2432 2329 1561 385 1875 15 230 2388 2378 2284 754 1710 476 2368 1943 2903 176 1689 488 183 506 2774 1528 2644 1142 28 2632 1577 490 2331 2989 847 2254 872 426 2025 1063 173 2132 571 ...
output:
2 164 97 122 147 166 140 33 65 88 76 104 137 39 168 56 50 22 133 129 110 108 123 58 16 119 71 82 161 85 160 114 151 126 157 47 9 63 135 83 6 14 156 145 96 125 35 152 52 113 115 64 103 20 150 116 118 141 26 138 34 5 99 30 80 69 8 98 144 70 120 84 53 62 159 148 93 67 142 111 66 143 121 146 31 54 78 7 ...
result:
ok correct plan!
Test #77:
score: 0
Accepted
time: 7ms
memory: 50512kb
input:
1000 1669 1288 605 1630 693 277 2913 2755 14 265 2500 957 760 1189 1967 1914 88 569 1378 250 2125 428 2285 855 452 2725 965 1691 327 2601 2527 1393 1976 2092 1894 1633 2633 574 619 1610 73 1592 1765 1458 2479 944 2015 2208 2802 1204 355 223 961 2244 2071 1825 1850 2187 35 77 1880 2141 1269 248 908 2...
output:
2 998 880 424 223 771 998 442 796 371 481 71 202 281 630 61 924 866 256 190 899 235 893 848 977 443 68 795 463 692 55 678 996 776 449 992 737 70 188 18 59 725 293 523 572 914 570 908 399 575 658 33 129 394 623 868 945 952 599 241 189 38 289 103 920 91 695 180 504 224 341 304 757 517 226 119 181 345 ...
result:
ok correct plan!
Subtask #6:
score: 1
Accepted
Test #78:
score: 1
Accepted
time: 4ms
memory: 50488kb
input:
3000 1 2 3 2029 1711 669 2046 1892 2438 2863 279 12 2604 478 1122 2318 17 497 1969 775 21 2173 865 24 2682 1567 27 551 29 2699 600 32 33 2996 2960 1779 37 38 214 2590 1241 2518 43 1781 2824 390 1384 524 432 50 51 2975 53 406 55 56 57 2188 1410 2578 1447 1060 63 2081 580 2755 67 2560 2722 1071 71 72 ...
output:
1 2016 2907 2903 2873 2862 2852 2846 2814 2793 2781 2758 2752 2737 2732 2710 2695 2693 2679 2665 2663 2638 2625 2607 2588 2580 2577 2562 2554 2551 2548 2545 2505 2503 2472 2446 2445 2429 2421 2393 2391 2380 2379 2372 2363 2357 2352 2341 2330 2324 2312 2306 2304 2294 2284 2276 2270 2268 2266 2262 223...
result:
ok correct plan!
Test #79:
score: 0
Accepted
time: 20ms
memory: 50492kb
input:
2996 1 2 1519 4 426 6 7 2441 2877 10 11 2615 13 248 15 16 1583 2045 2262 20 2224 22 704 24 25 26 1365 354 34 2057 31 32 1968 29 2502 198 831 2328 485 2236 1608 1169 1513 2034 1740 1867 1030 2695 1715 50 2495 1178 449 719 55 742 1199 58 902 2875 1098 62 1634 291 1639 2604 1629 1157 69 70 1367 72 1441...
output:
1 1994 2876 2863 2858 2780 2767 2749 2721 2718 2706 2689 2681 2669 2638 2626 2624 2621 2601 2594 2587 2565 2561 2551 2541 2536 2525 2511 2509 2506 2504 2485 2473 2460 2448 2447 2439 2429 2411 2410 2407 2405 2401 2376 2373 2367 2363 2349 2347 2340 2333 2326 2316 2299 2278 2276 2269 2250 2249 2247 224...
result:
ok correct plan!
Test #80:
score: 0
Accepted
time: 10ms
memory: 50488kb
input:
2053 2296 1069 4 1981 2409 13 1573 481 1840 2559 20 1269 1917 1603 1030 28 29 162 1765 32 2243 927 39 41 42 43 82 1704 2988 2620 1958 1492 2206 57 1035 60 2138 2519 65 817 1798 69 1076 72 1325 1168 202 1893 2062 1198 1199 45 83 524 85 103 1396 89 91 1078 1263 96 100 839 1982 86 2615 1651 207 1750 11...
output:
1 1368 1989 1943 1883 1875 1871 1870 1866 1856 1820 1815 1806 1790 1759 1741 1724 1721 1711 1710 1700 1681 1679 1671 1658 1653 1651 1643 1630 1623 1610 1606 1601 1596 1590 1588 1583 1579 1573 1565 1551 1545 1522 1515 1504 1499 1497 1484 1478 1477 1472 1471 1470 1467 1466 1462 1458 1445 1442 1436 143...
result:
ok correct plan!
Test #81:
score: 0
Accepted
time: 16ms
memory: 50372kb
input:
1707 1707 10 1838 1145 1269 16 2917 2098 2813 2506 298 177 1236 396 27 30 1460 34 38 929 725 1338 2765 2987 51 2832 55 102 1303 1911 1525 678 1606 2905 71 625 450 74 76 758 1413 1866 81 2071 2078 1887 88 2324 2445 2622 1624 2008 1817 99 56 103 2272 105 106 2252 2440 1596 647 121 863 2926 2655 129 13...
output:
1 1080 1666 1628 1625 1577 1548 1542 1541 1504 1487 1476 1468 1461 1456 1455 1454 1425 1424 1403 1388 1377 1375 1370 1363 1354 1353 1350 1349 1344 1337 1334 1333 1329 1321 1290 1287 1279 1275 1271 1256 1249 1247 1245 1235 1231 1230 1229 1226 1220 1217 1214 1211 1208 1207 1206 1203 1197 1193 1192 119...
result:
ok correct plan!
Test #82:
score: 0
Accepted
time: 4ms
memory: 50436kb
input:
676 2146 1846 17 18 796 2192 27 35 62 2030 867 2916 804 58 42 2763 68 344 339 73 81 2707 858 1521 1772 89 1847 1464 1309 174 1004 282 116 122 287 1603 135 638 148 1170 167 169 1575 103 1256 178 2379 181 2034 2249 2345 390 207 209 211 556 1340 363 2177 755 242 367 245 250 1337 935 257 1421 262 115 13...
output:
1 428 648 621 599 591 570 565 552 518 517 509 502 499 494 478 474 465 464 459 458 451 449 442 440 438 437 436 434 431 430 428 418 412 404 401 396 395 393 391 389 388 385 380 378 369 368 367 365 355 352 349 348 346 345 344 342 338 337 331 329 327 317 316 313 304 303 300 299 296 291 285 284 283 282 27...
result:
ok correct plan!
Test #83:
score: 0
Accepted
time: 10ms
memory: 50464kb
input:
3000 1193 621 2709 2314 152 1799 45 2270 1655 2982 2367 724 1336 758 2860 2074 2614 1672 2626 638 871 22 759 1534 679 383 2277 2753 2031 2961 518 2493 2299 620 830 41 2403 824 49 2211 1314 1605 83 1759 2308 1363 1926 1784 2809 2814 1943 1206 181 130 1958 2610 415 1603 2234 1491 1923 651 2044 1485 80...
output:
2 2000 2803 2908 2457 2921 2483 2410 2405 2514 2392 2384 2269 2235 2453 2849 2508 2183 2431 2161 2122 2425 2331 2102 2773 2886 2060 2009 1980 1963 1948 1964 1935 1929 1893 1891 2377 1824 1816 1813 1794 1905 2166 1763 2252 2261 2094 2970 2835 2473 2985 2737 1724 2675 1782 1711 1697 2272 1896 1985 200...
result:
ok correct plan!
Test #84:
score: 0
Accepted
time: 12ms
memory: 50504kb
input:
2528 1341 2216 1010 2389 605 1868 30 1142 1789 2634 476 1300 739 290 1154 911 2680 1897 2031 2869 558 2483 2426 2771 812 1215 2837 1242 378 1511 1505 2717 1438 1023 2313 1758 2173 41 42 2776 1528 2325 1991 516 2611 2452 1417 152 1837 2496 2849 249 1683 967 2564 2738 1851 821 1267 1428 2875 2862 2803...
output:
2 1690 2381 2340 2309 2281 2275 2272 2106 2047 2451 1988 1997 1976 1939 1915 2455 1903 2311 1972 1862 1792 1779 1757 1832 1794 1733 2334 2115 1722 1711 1666 1654 1650 1636 2169 1615 1579 1726 1556 2355 1584 1535 1775 1501 1708 1824 1626 1981 1443 1435 1419 2505 1408 1712 1399 1644 1471 2197 1961 135...
result:
ok correct plan!
Test #85:
score: 0
Accepted
time: 11ms
memory: 50416kb
input:
1232 910 1782 903 125 949 2138 1852 1732 2304 1795 991 2461 2109 510 2227 146 2333 1678 380 2937 44 769 1151 50 2074 2119 53 1994 1546 389 1149 2872 1899 2661 123 167 312 409 832 1399 86 1101 2059 2953 1265 2398 2709 2705 1758 1837 361 432 11 1643 2731 503 631 560 583 1608 2741 137 35 1336 733 1670 ...
output:
2 822 1221 1053 1106 995 929 907 882 944 852 962 829 823 1213 1088 787 1009 761 747 1214 760 1154 874 725 715 713 960 893 1174 737 1034 701 695 691 1055 1015 870 634 633 620 616 1080 973 875 891 1016 1148 860 1228 587 1014 683 578 575 963 566 925 1011 692 549 869 880 1070 718 1052 1184 529 669 511 6...
result:
ok correct plan!
Test #86:
score: 0
Accepted
time: 12ms
memory: 50420kb
input:
1903 2433 1807 1503 794 945 431 2303 2805 1631 500 1792 136 1421 1953 1948 1435 1753 2064 1143 917 694 2794 1318 29 2904 2291 2761 1165 194 2120 42 2149 1482 235 180 620 1865 1296 100 58 1386 2115 1709 2903 66 2493 2196 1658 2949 2813 553 819 1225 613 2951 513 2125 2863 2052 1342 1213 747 1228 1773 ...
output:
2 1234 1857 1677 1658 1610 1491 1478 1428 1606 1657 1381 1339 1312 1559 1292 1611 1286 1272 1249 1350 1792 1709 1688 1702 1525 1184 1693 1178 1163 1847 1147 1842 1141 1475 1270 1102 1099 1415 1300 1089 1158 1146 1331 1768 1159 1527 1038 1018 1013 998 992 1457 1432 1069 1886 1234 1445 1541 1644 1814 ...
result:
ok correct plan!
Test #87:
score: 0
Accepted
time: 8ms
memory: 50476kb
input:
182 923 385 2406 766 620 1621 2443 1542 37 509 1017 542 1854 2775 1577 532 2360 2 838 2737 2395 1513 663 1592 2826 1454 1608 1415 53 2040 1241 263 1224 1820 431 644 2671 687 2993 2685 1326 323 231 29 2324 1447 2426 2631 2920 885 915 2082 2665 1756 1375 2978 1007 1545 1390 1436 441 2197 707 1099 224 ...
output:
2 126 151 127 132 117 114 108 95 81 79 118 155 86 140 137 56 55 54 53 154 174 90 141 121 77 162 126 180 112 116 74 120 128 163 170 101 37 96 172 145 60 166 47 143 27 15 168 13 28 98 58 91 26 89 97 149 103 72 33 4 3 2 129 52 85 59 18 147 44 9 161 29 144 125 68 65 173 43 105 87 119 32 100 83 42 75 66 ...
result:
ok correct plan!
Test #88:
score: 0
Accepted
time: 10ms
memory: 50484kb
input:
3000 2156 534 732 212 942 399 736 2678 2455 519 241 2979 191 360 752 264 888 1654 1310 1369 1757 2725 1528 1412 1030 2330 922 565 1553 1583 532 2515 1847 307 1172 273 2447 4 2321 311 1278 1031 2836 2566 2302 36 1858 2132 1515 916 391 1585 1959 2033 180 1659 591 1201 178 2518 2884 726 2046 2993 737 5...
output:
2 2996 2976 1632 383 1466 2139 2055 1365 2748 2469 2362 2218 429 2589 2502 2698 495 2778 72 1402 1393 1600 2089 902 754 1815 919 2419 174 2595 2450 2552 1053 493 2113 378 2564 1288 2895 2836 43 830 2988 1615 965 898 1521 2697 775 2914 2859 477 2666 1583 30 2933 2945 707 2412 1108 1531 1210 1880 1023...
result:
ok correct plan!
Test #89:
score: 0
Accepted
time: 15ms
memory: 50536kb
input:
1386 237 2658 206 1045 2821 4 1299 2272 443 1672 2184 2496 900 107 134 2426 95 2403 631 2383 1621 497 2976 1386 2212 1840 1174 541 2411 1727 42 2956 2231 2366 745 343 760 145 329 2502 2889 1788 843 791 1917 1054 1 788 1572 1908 1394 281 1088 735 2864 2125 328 2688 2222 865 2114 2290 1350 1485 787 14...
output:
2 1378 1343 1238 219 310 720 93 357 332 995 1325 701 361 623 689 1367 692 533 1170 1319 386 165 1000 809 745 572 335 986 849 1362 1373 1037 939 366 596 384 88 1311 653 202 79 38 288 1213 943 188 390 1211 210 102 796 30 864 1146 1284 461 402 141 775 1351 87 535 991 830 705 224 255 283 1013 752 734 13...
result:
ok correct plan!
Test #90:
score: 0
Accepted
time: 12ms
memory: 50524kb
input:
2006 476 1634 584 2324 1496 1999 2322 887 225 500 102 681 329 2608 2840 2310 2350 2645 2141 835 1249 1923 2648 683 1358 1378 1879 1110 529 2826 244 2197 1297 1776 2037 2325 544 2544 2204 2210 2510 2758 1861 1190 108 2726 943 212 1010 2205 1105 2243 1874 865 1414 1665 1947 171 707 1153 560 1810 2538 ...
output:
2 2004 1223 203 484 1121 497 110 1213 672 489 227 1394 1943 1604 1486 146 1071 235 942 1308 1576 511 1238 746 775 742 623 798 958 1109 686 887 745 1874 635 432 430 272 1395 917 799 1086 1977 1343 948 1831 680 1246 663 1447 660 477 1099 552 550 1610 1789 1102 1868 369 886 202 1180 282 1819 1397 526 4...
result:
ok correct plan!
Test #91:
score: 0
Accepted
time: 11ms
memory: 50468kb
input:
1453 1102 1289 1889 560 2345 2842 2381 2042 1678 1126 1786 1619 25 2185 1556 63 357 1426 1177 2039 2255 347 2537 1701 1361 518 2996 1553 305 1833 2527 1243 370 1120 71 218 1496 734 590 1079 2607 597 327 2427 2375 12 933 1028 611 2402 19 1791 895 2545 1971 1815 2833 1746 1847 2074 1341 2539 741 1045 ...
output:
2 1450 1106 916 524 999 513 40 291 811 604 1205 667 969 190 1139 1180 754 941 778 326 913 1199 1086 660 497 496 64 202 254 486 347 1391 1435 900 96 581 915 1417 1038 964 1191 1170 903 494 140 1123 1179 290 899 501 670 265 1276 360 572 708 257 650 1092 1105 1322 1143 716 764 428 1217 750 448 1000 826...
result:
ok correct plan!
Test #92:
score: 0
Accepted
time: 15ms
memory: 50432kb
input:
1553 509 2 949 91 1979 1720 1580 2574 1192 272 516 358 2952 558 611 2277 841 291 2020 1307 1698 2099 1176 899 2508 2869 2826 1917 788 128 2579 1513 2926 1646 2323 1960 688 1352 1424 389 1967 1793 2651 461 774 2809 1888 678 659 1405 1709 201 639 2409 501 1013 2789 1173 2539 1112 613 2404 1975 2859 22...
output:
2 1550 184 1126 966 1525 737 1001 225 205 936 248 908 716 675 1482 846 163 91 1137 645 972 68 1293 733 1190 1461 103 52 1330 1472 319 1548 1370 267 554 922 1535 1344 663 1124 366 347 48 1528 674 1314 178 1375 1507 566 1395 1191 305 439 886 698 1299 1480 26 1035 582 523 431 456 1181 378 1230 244 112 ...
result:
ok correct plan!
Test #93:
score: 0
Accepted
time: 8ms
memory: 50500kb
input:
3000 1910 1335 909 1795 111 64 1274 1824 1932 159 260 2633 215 2390 2367 321 1723 860 2712 43 1291 2755 2608 2440 610 1894 907 80 2128 1630 1225 748 1922 596 463 2376 2898 578 1840 2500 2413 611 372 2125 1523 412 593 951 1263 2109 345 1972 2018 1567 1017 757 2797 2464 1871 722 2724 1096 2873 1870 24...
output:
2 2998 2064 707 1267 1638 1477 1474 2920 2315 1812 472 1960 834 567 2029 2296 708 2070 1558 636 1227 2986 845 2783 1706 660 705 244 77 1104 2024 2060 2418 2898 37 2374 2274 1065 922 2537 176 2523 820 1590 206 2527 2405 2483 829 542 2786 2793 2664 518 822 2279 1361 2657 588 1007 2198 1168 78 383 1056...
result:
ok correct plan!
Subtask #7:
score: 1
Accepted
Test #94:
score: 1
Accepted
time: 11ms
memory: 50508kb
input:
3000 729 1498 1848 569 1429 1721 2356 2504 483 158 2104 2471 2942 994 2046 2784 1613 1648 2834 1108 1805 1328 1984 1853 1180 2517 109 2601 2144 30 53 2173 1992 944 121 1595 1943 755 2732 2833 233 2934 1147 1091 2478 1948 252 962 221 400 1235 1486 31 69 1318 804 70 851 1026 930 2731 1922 713 1282 292...
output:
2 2028 2940 2821 2753 2712 2711 2666 2663 2631 2612 2531 2491 2873 2405 2398 2383 2455 2689 2375 2736 2323 2342 2271 2263 2212 2211 2190 2288 2160 2984 2796 2262 2090 2443 2072 2053 2625 2026 2819 2669 2343 1994 2654 2208 1960 1940 1931 1919 1896 1976 2719 1890 1882 2163 2865 2706 2384 2994 1843 264...
result:
ok correct plan!
Test #95:
score: 0
Accepted
time: 8ms
memory: 50444kb
input:
1896 257 851 2741 2650 1491 477 459 1239 146 12 996 1462 1016 685 115 1226 2428 575 2685 589 429 1535 828 1779 2493 2926 1363 37 1069 1806 910 42 2278 860 65 209 2840 1131 107 2787 912 1727 1117 206 2434 2993 1789 672 2347 223 2316 1922 154 345 1659 1088 2970 122 1220 619 1151 547 2784 2658 730 700 ...
output:
2 1270 1861 1727 1515 1502 1487 1664 1855 1462 1737 1629 1632 1387 1742 1369 1368 1362 1359 1357 1349 1300 1281 1279 1263 1846 1254 1842 1222 1220 1512 1338 1183 1271 1568 1397 1143 1205 1137 1132 1128 1118 1101 1084 1080 1100 1654 1053 1314 1051 1036 1029 1768 1550 1730 1380 1394 1190 1605 1602 990...
result:
ok correct plan!
Test #96:
score: 0
Accepted
time: 7ms
memory: 50376kb
input:
538 1160 2396 1759 138 112 1148 62 1051 49 1046 2756 1888 2190 702 77 257 610 1243 2469 1002 181 1381 131 2402 19 876 2967 186 1318 627 2902 1465 2681 2727 1684 211 808 2230 2491 559 2087 246 1179 325 1146 2110 220 2962 717 927 1147 878 1436 584 2786 2319 773 1991 1151 2551 2456 1872 1895 1665 91 87...
output:
2 350 484 471 462 457 412 434 371 499 365 348 327 535 410 439 286 431 466 461 333 452 416 252 433 331 405 358 497 231 342 504 218 241 476 515 483 522 197 370 363 191 190 454 183 512 270 525 172 441 354 242 349 401 217 368 455 537 291 288 150 281 417 142 481 355 243 362 230 182 328 205 315 346 274 12...
result:
ok correct plan!
Test #97:
score: 0
Accepted
time: 8ms
memory: 50524kb
input:
2032 1172 411 318 655 9 2901 1816 2054 1480 1473 2948 2032 940 1206 2073 410 2819 1270 2272 2508 1088 965 1567 2993 2254 2863 1529 2025 1754 1681 1975 147 679 44 57 1994 1513 462 1998 62 2754 708 530 1853 2172 762 70 816 1482 827 1033 1338 966 137 664 200 1498 2256 2862 2186 1510 100 308 375 838 258...
output:
2 1362 1847 1820 1816 1777 1645 1627 1617 1605 1595 1594 1560 1540 1536 1529 1514 1565 1819 1497 1981 1460 1446 1683 1783 1733 1450 1379 1991 1580 1537 1329 1327 1305 1835 1493 1281 1867 1277 1271 1630 1266 1437 2007 1870 1212 1198 1195 1186 1179 1175 1166 1374 1975 1128 1554 1160 1124 1661 1117 156...
result:
ok correct plan!
Test #98:
score: 0
Accepted
time: 16ms
memory: 50472kb
input:
1846 1273 179 1131 1179 963 1869 1675 2609 2413 17 1724 19 1154 577 2650 905 678 1469 2636 1792 714 2726 40 1799 2703 1913 44 1440 2012 2401 2519 760 170 58 947 1833 676 1209 2130 1057 1485 2336 876 1331 79 1344 934 2611 2765 882 84 1016 461 1922 850 2448 175 964 2409 2473 2281 2477 1588 1293 2371 8...
output:
2 1228 1710 1692 1770 1642 1634 1514 1489 1485 1493 1538 1460 1431 1403 1378 1347 1338 1331 1679 1307 1283 1505 1354 1787 1541 1661 1382 1223 1222 1396 1216 1467 1204 1198 1190 1834 1318 1400 1524 1413 1386 1210 1113 1564 1581 1358 1520 1082 1416 1061 1052 1567 1595 1528 1418 1021 1532 1512 1412 149...
result:
ok correct plan!
Test #99:
score: 0
Accepted
time: 8ms
memory: 50540kb
input:
3000 2824 997 1531 849 384 5 1212 1342 1018 2568 606 2755 390 2805 1133 2227 2602 61 321 1173 1167 2808 1049 740 391 2973 2671 1508 927 394 1474 2877 2130 2537 640 297 2586 1008 2428 1986 1727 944 1499 496 369 2224 41 2010 974 155 2789 180 2304 1497 2594 241 1175 135 2583 2946 1376 727 619 2198 1309...
output:
2 2998 1799 1579 191 2522 1584 2371 2845 820 1125 2536 142 1410 1215 1652 2202 1178 657 1472 457 359 916 2186 795 690 1680 889 1106 2675 1115 1500 2171 2010 48 397 860 834 844 506 1605 975 305 2178 869 2999 2292 2262 2607 416 1330 1437 1552 1543 652 2352 755 2070 2164 698 1617 97 2015 958 2306 1126 ...
result:
ok correct plan!
Test #100:
score: 0
Accepted
time: 12ms
memory: 50424kb
input:
1857 459 2017 466 2262 1513 771 2277 115 2288 265 2428 2445 701 2766 1226 1216 614 593 79 2112 1038 220 2702 1682 2599 1823 338 1124 1690 1940 2260 1892 363 254 2981 652 646 2914 1322 1576 1284 1801 559 2014 1479 1795 1139 2980 2541 1475 218 108 2130 1048 1973 2549 2046 2770 2073 2245 148 1180 2306 ...
output:
2 1854 536 1671 558 464 1596 524 1472 160 1199 407 1265 600 1180 162 782 492 914 900 1069 1419 1446 552 1447 921 565 1382 1498 736 378 224 362 1245 859 1758 1113 1326 495 1222 1445 1606 1112 1755 313 328 1231 1155 1852 270 1444 864 754 1809 1085 1691 1178 32 204 888 602 739 47 1244 684 1449 1358 445...
result:
ok correct plan!
Test #101:
score: 0
Accepted
time: 19ms
memory: 50548kb
input:
2657 1446 1483 1704 2281 2909 100 2727 2521 1182 2197 1101 1161 1469 2791 683 126 1313 785 2355 549 2866 806 1860 1267 2230 1710 2405 1335 92 1427 1032 2002 2896 1732 471 1096 10 1980 1870 1199 2879 682 148 434 658 1939 9 2959 737 2216 2121 2955 2219 370 2612 2476 246 1918 912 1291 193 2223 1538 299...
output:
2 2652 183 688 1572 1414 1676 1007 2262 1650 23 1892 1371 1180 1769 1339 2450 2054 1182 28 787 228 2530 1246 2492 852 98 1308 2404 1058 121 1306 508 1404 1100 1293 2502 2476 240 1334 2648 825 2057 2529 1112 1893 1028 2341 717 22 726 737 1832 1819 901 1475 707 2113 1394 1841 1977 1489 1939 931 2521 2...
result:
ok correct plan!
Test #102:
score: 0
Accepted
time: 16ms
memory: 50396kb
input:
909 2431 1563 2315 208 389 2954 2160 2557 847 568 1472 1333 713 1209 921 944 42 2921 1931 2245 539 2808 194 1223 2516 1190 1583 2503 1186 1752 1366 2538 1530 186 1663 1448 1086 230 1475 2994 1337 1782 1046 1496 2130 1611 2384 517 1233 917 2847 1922 1919 2821 2470 1362 1894 144 902 2330 2186 1728 254...
output:
2 904 829 484 876 128 178 867 282 475 755 337 146 103 295 275 50 857 180 479 516 564 79 658 226 194 838 869 561 559 285 633 255 428 208 99 318 611 855 579 117 478 205 177 830 395 747 879 659 655 45 408 90 757 669 538 252 374 77 257 422 890 465 265 351 95 550 460 181 447 837 628 713 345 883 556 211 1...
result:
ok correct plan!
Test #103:
score: 0
Accepted
time: 28ms
memory: 50476kb
input:
2692 1796 2216 1160 2599 108 1789 708 939 2429 569 533 495 1533 2493 1842 2477 399 1611 340 125 1149 699 38 785 2893 701 1281 1005 2749 1830 2573 2776 1319 2480 542 496 2178 2674 2955 805 497 2661 1236 439 20 746 2374 2585 1763 885 1072 747 2773 761 472 949 625 1451 2565 2450 377 1906 294 2543 1293 ...
output:
2 2686 1936 1615 2228 2351 215 222 1311 426 859 913 1768 1110 904 1500 1186 173 1832 392 914 1012 2227 2070 1752 1355 2078 1539 895 1636 108 1552 958 378 1821 379 695 1770 395 1174 2292 1812 996 1298 2521 1996 2559 1524 556 1007 1211 1647 1995 2160 2565 1899 280 2050 1948 2520 1805 930 442 2123 1449...
result:
ok correct plan!
Test #104:
score: 0
Accepted
time: 17ms
memory: 50500kb
input:
3000 1596 1286 10 2577 2208 747 2473 2082 266 2964 2606 1302 1771 1816 2320 556 386 1814 2198 2257 1221 621 282 2808 2236 821 2816 507 720 27 1422 225 690 1189 641 1053 2151 2215 2797 2782 766 2189 2938 2142 1689 28 2434 2723 705 2873 1342 2487 2304 2321 634 210 274 2117 1145 2867 1131 1323 2027 406...
output:
2 2998 1682 2585 712 2151 37 2444 2044 556 16 364 1725 2824 2056 106 799 474 389 476 1453 2634 1547 1741 2805 2790 2724 2530 841 1431 1470 296 1942 1886 1427 1546 1011 933 2705 1420 1164 227 780 1982 501 2170 761 1178 1972 1820 1588 174 2895 1978 824 81 547 1125 1643 952 465 1941 2006 276 1703 602 1...
result:
ok correct plan!
Subtask #8:
score: 1
Accepted
Test #105:
score: 1
Accepted
time: 4ms
memory: 50420kb
input:
3000 766 1622 2731 1980 5 6 200 671 2792 1172 2005 1950 2806 557 2069 2552 1768 2600 2312 346 21 2376 2267 691 2995 26 2319 28 2148 30 970 2779 2645 1580 2627 1900 149 226 1642 1383 928 2575 1648 1859 2203 2701 1100 1391 1745 293 1625 670 1189 54 1413 1733 2878 2501 1765 841 61 454 2372 2901 1420 25...
output:
2 1990 2935 2642 2558 2514 2493 2446 2389 2314 2287 2384 2241 2828 2752 2679 2225 2218 2197 2973 2170 2169 2162 2610 2056 2040 2038 2146 2329 1991 1987 2239 1971 1970 1955 1925 2929 1889 2336 2201 1870 1828 1820 2640 2490 2763 1800 1865 2304 2766 2685 1781 1762 1761 2101 1742 2911 2717 1734 1723 170...
result:
ok correct plan!
Test #106:
score: 0
Accepted
time: 4ms
memory: 50404kb
input:
1094 294 642 1682 1224 2350 1053 1730 1513 69 2058 2111 2309 793 34 2419 595 667 1710 2407 1046 637 1480 1115 578 2349 2652 22 77 2087 80 2306 894 1199 1173 2436 2289 1616 110 1111 2380 194 164 2141 311 2050 725 1148 2941 1560 1076 1094 153 157 1677 2418 1643 2664 172 754 28 1014 1792 1809 1100 1871...
output:
2 732 934 959 899 948 962 868 820 1062 791 902 950 832 755 741 733 828 910 1061 703 833 691 826 683 1065 811 653 644 642 849 628 619 602 944 800 1045 565 528 566 1058 506 623 767 500 1021 808 718 490 484 529 477 709 857 472 469 891 901 449 447 928 436 434 574 423 983 840 409 516 407 457 401 1015 724...
result:
ok correct plan!
Test #107:
score: 0
Accepted
time: 9ms
memory: 50532kb
input:
2123 2176 2 1686 1947 1851 7 915 1044 2111 1023 1355 2680 1426 2742 1211 1351 898 1511 1240 2116 804 1008 2454 2993 1251 1341 41 1041 2711 460 1122 1145 2455 1610 93 159 1720 1187 1183 263 164 2019 1418 948 2212 550 2636 2844 1215 2604 22 369 2357 2544 1287 2160 2400 1605 1783 2860 624 2843 1012 138...
output:
2 1410 2015 1887 1835 1829 1774 1764 1921 1694 2082 1660 2109 1581 1558 1641 1998 1836 1528 1519 1903 1678 1448 1433 1870 1537 1429 1391 1390 1640 2002 1364 1968 1458 1899 2107 1477 1321 1979 1269 1258 2041 1238 1235 1919 1275 1208 1981 1611 1201 1794 1484 1702 1776 1586 1155 1146 1933 1140 1124 111...
result:
ok correct plan!
Test #108:
score: 0
Accepted
time: 8ms
memory: 50484kb
input:
937 85 6 1650 976 219 1694 344 1164 1739 209 2168 969 223 1698 2602 533 2576 2152 686 1107 945 535 2863 776 2907 2502 2473 2365 235 1760 1952 1388 270 1094 2157 2314 144 2435 2299 2150 1493 2635 2410 2045 2374 2413 250 2874 2854 499 762 100 2476 1432 1617 2953 731 2227 2837 680 380 1059 1027 2070 68...
output:
2 616 852 933 802 764 758 738 936 749 845 801 904 892 704 867 833 626 916 594 816 781 725 587 640 523 782 506 475 873 851 459 849 455 659 443 437 430 429 712 425 561 474 504 560 401 685 590 718 890 893 788 369 733 385 435 347 519 345 608 807 551 333 324 322 448 412 753 765 488 478 649 476 301 297 34...
result:
ok correct plan!
Test #109:
score: 0
Accepted
time: 14ms
memory: 50448kb
input:
1023 115 1589 769 2831 1857 1278 18 1934 2974 2596 2076 856 395 2419 109 594 2705 1679 175 1667 1230 72 289 2293 2884 861 2330 2191 1749 1694 112 2315 779 1478 2145 133 1647 2401 1493 2840 1192 1409 1554 2466 2044 2582 1949 2259 1916 1304 498 2449 572 1145 177 2183 181 2946 1604 2370 2813 1473 2960 ...
output:
2 690 946 924 878 868 839 824 821 873 799 889 785 967 696 714 676 643 640 877 622 897 613 985 906 591 571 711 952 642 1010 1012 678 542 911 681 525 884 746 1003 615 779 568 502 704 800 727 909 763 471 712 699 605 436 1022 864 415 977 403 1011 394 627 520 372 869 457 362 365 744 387 819 442 560 368 3...
result:
ok correct plan!
Test #110:
score: 0
Accepted
time: 7ms
memory: 50492kb
input:
3000 2247 2049 1210 20 1724 597 2592 2499 2899 2720 2358 1310 826 486 1728 2212 343 1308 2516 1080 1749 1023 1986 759 2414 829 1198 2692 2545 338 1393 2954 2678 2225 1710 1744 1322 2123 2432 23 1565 1908 1694 2543 2306 1721 2728 1579 897 1899 1595 1490 128 781 2727 1866 1701 1820 1383 1818 2151 2902...
output:
2 2996 115 2369 1261 1970 2306 45 2317 2158 999 783 897 49 1559 1835 2504 1108 2000 1801 2354 2732 2047 224 2581 1474 2991 1676 2820 1370 83 237 1851 173 812 1910 623 2936 1558 1265 1269 2786 1072 584 1502 2054 1391 504 1962 639 2897 199 1904 260 1547 1351 477 969 578 1120 1745 423 1199 1029 831 134...
result:
ok correct plan!
Test #111:
score: 0
Accepted
time: 24ms
memory: 50384kb
input:
1472 1003 328 2445 533 2080 2253 1928 1827 2030 1143 2998 1904 2121 1140 900 134 970 2915 608 625 641 2539 747 2559 1443 1983 133 789 2031 1086 1647 1563 2651 1328 2702 2611 459 2015 1631 1817 2723 2643 2511 1307 2637 1940 1101 2984 1553 2093 281 1634 1682 43 1977 1717 212 1085 1408 2297 714 33 2222...
output:
2 1468 1299 36 599 1030 368 711 936 866 489 414 1152 136 545 134 1077 277 1193 472 529 397 459 1106 873 1108 715 340 292 836 1240 169 999 717 927 1070 231 1199 776 865 609 76 96 1017 71 886 1271 24 184 1380 1449 630 1338 843 56 1415 1288 1132 1026 155 1317 165 917 1008 921 109 1181 153 1460 583 690 ...
result:
ok correct plan!
Test #112:
score: 0
Accepted
time: 14ms
memory: 50424kb
input:
354 1608 2018 844 604 1696 2030 172 1109 1904 988 941 2893 2488 2076 317 214 367 2965 885 253 1341 1976 1643 1015 2407 1718 889 1089 2966 2814 1320 985 1029 1973 2685 1698 2746 108 3 508 48 2967 2195 1279 2664 700 681 2890 1131 217 269 1062 847 2619 2745 2616 1920 1364 251 258 1461 866 2176 2834 200...
output:
2 350 337 64 226 276 340 194 291 215 111 313 108 62 227 82 288 119 243 6 222 214 309 54 351 115 339 98 330 112 19 334 30 20 277 126 138 8 312 176 103 139 271 196 23 336 298 197 297 323 73 164 216 169 236 131 33 325 211 279 244 267 136 206 220 228 171 241 68 335 91 294 329 148 135 275 25 242 198 318 ...
result:
ok correct plan!
Test #113:
score: 0
Accepted
time: 8ms
memory: 50412kb
input:
203 2387 2159 2952 1 1179 616 1152 2383 2524 2428 772 1142 1312 2162 1361 941 1381 1523 1070 2479 1412 969 2110 2996 1884 1310 536 35 638 2244 659 369 281 2878 223 851 579 1344 1580 2828 2424 2157 2392 1579 2337 2271 2104 2893 2915 269 636 2035 306 2020 1272 1507 1546 103 1675 1314 1059 1428 149 299...
output:
2 200 34 27 32 118 194 48 85 55 91 180 78 76 99 21 33 184 98 90 172 185 162 41 29 203 127 105 95 72 88 13 150 74 7 58 155 69 19 81 138 181 120 116 158 186 192 197 187 73 12 63 89 60 16 35 37 168 165 139 47 183 110 44 121 156 45 11 195 112 77 5 132 54 190 40 51 36 173 161 43 174 66 83 170 71 100 134 ...
result:
ok correct plan!
Test #114:
score: 0
Accepted
time: 4ms
memory: 50380kb
input:
863 1530 2074 1986 1772 1582 1822 573 1428 861 1143 1123 2445 908 541 1448 134 609 408 2522 2011 2046 1824 807 2881 1033 1055 888 2390 961 178 1078 2379 2189 2347 460 1871 2007 1589 1912 2615 1427 268 935 1343 2371 2585 1799 1631 1730 2024 110 720 2008 294 1561 175 2401 2555 758 705 2951 1215 2366 1...
output:
2 860 9 131 806 381 730 468 146 412 522 330 699 218 537 272 704 109 682 28 609 679 354 115 233 96 703 255 258 717 430 184 329 748 729 87 588 498 601 348 173 74 665 261 140 345 193 182 270 640 456 653 245 27 637 599 458 424 491 205 777 210 437 178 306 843 496 106 555 263 299 31 764 90 84 291 394 267 ...
result:
ok correct plan!
Test #115:
score: 0
Accepted
time: 8ms
memory: 50560kb
input:
3000 2508 2356 1326 1800 2895 1743 1120 2548 2505 2736 2375 1619 2490 2795 1039 1495 549 1660 2129 2289 1951 2049 2434 2910 1030 1628 2062 195 2920 1600 1955 267 2652 2516 188 2056 1256 489 1714 2498 2559 1206 268 1971 2889 994 2209 1112 788 10 2454 1233 2314 1238 1845 2685 2927 163 652 2365 2945 21...
output:
2 2998 1180 179 122 1734 2075 743 64 1514 708 2249 746 691 2905 430 807 1715 560 627 2659 400 1725 306 2651 1395 2938 714 2057 1204 1871 1792 828 2346 1957 2018 2645 2850 2167 556 1393 633 576 2715 1292 985 426 2700 1721 450 939 1136 2665 1004 2220 223 2744 660 2081 634 282 557 1471 2618 2747 1723 1...
result:
ok correct plan!
Subtask #9:
score: 1
Accepted
Test #116:
score: 1
Accepted
time: 17ms
memory: 50444kb
input:
3000 361 2 3 1184 5 6 7 8 2192 866 1680 935 13 14 618 16 140 18 1462 20 21 600 23 24 749 26 27 28 29 1947 54 2298 33 1313 303 2036 742 723 39 40 41 42 1381 2372 1112 46 2748 2536 49 50 51 52 53 31 1080 2481 57 82 59 2238 1647 62 2271 64 65 2773 67 167 2308 2022 252 794 73 74 2020 916 1141 1461 2287 ...
output:
1 1944 2970 2851 2846 2787 2758 2738 2728 2695 2681 2669 2642 2636 2633 2595 2568 2552 2551 2549 2545 2543 2533 2530 2524 2521 2515 2514 2502 2499 2485 2461 2459 2453 2452 2445 2433 2432 2428 2426 2422 2418 2417 2414 2409 2398 2397 2393 2388 2381 2378 2376 2375 2341 2338 2326 2320 2318 2316 2313 230...
result:
ok correct plan!
Test #117:
score: 0
Accepted
time: 8ms
memory: 50400kb
input:
2354 508 2599 448 124 862 1613 2247 2475 12 2234 1454 1241 1979 1093 21 23 24 2734 556 2321 28 29 728 31 32 2624 34 37 38 39 2933 2286 42 2342 2501 1133 47 48 1282 894 2629 52 53 2082 441 61 1279 1375 64 65 66 67 68 69 548 401 2895 464 484 372 1513 2908 79 467 477 2164 84 1037 977 736 90 91 92 93 94...
output:
1 1610 2296 2286 2270 2177 2171 2153 2147 2141 2104 2094 2093 2065 2063 2056 2053 2051 2042 2037 2033 2022 2001 2000 1989 1987 1980 1978 1969 1959 1949 1930 1925 1922 1919 1916 1906 1905 1904 1890 1886 1882 1878 1865 1859 1858 1854 1853 1836 1831 1824 1823 1821 1815 1810 1803 1799 1789 1781 1769 176...
result:
ok correct plan!
Test #118:
score: 0
Accepted
time: 7ms
memory: 50440kb
input:
1055 2486 5 606 2601 12 16 17 21 1378 2911 1216 29 2793 2297 985 997 2435 1886 398 974 2434 64 66 67 2829 2265 2520 76 79 2374 82 2127 448 1483 1892 445 2842 2465 692 1792 110 2326 536 116 117 119 121 1454 1983 125 1591 1005 132 1666 139 147 1967 2626 1866 2801 880 156 157 694 356 547 1589 2949 2389...
output:
1 728 995 978 955 903 902 898 897 890 885 880 878 857 856 852 848 845 844 841 832 807 801 799 796 791 789 784 781 778 764 763 751 747 743 737 735 733 731 730 727 726 725 724 713 710 706 695 694 689 688 687 682 674 673 670 662 660 652 650 639 629 628 622 621 619 614 612 605 603 602 589 582 580 579 57...
result:
ok correct plan!
Test #119:
score: 0
Accepted
time: 4ms
memory: 50468kb
input:
1370 2189 944 1215 1154 12 417 1467 2693 17 19 1834 2616 2185 1240 1696 499 2097 764 1046 1014 35 1654 2404 41 2802 2790 45 48 2316 1886 51 145 2986 61 2900 66 2732 536 275 850 74 1741 2258 2039 2756 85 2051 89 1850 551 2636 97 98 99 101 105 2638 107 2564 109 271 1019 521 1217 126 1737 1860 130 2586...
output:
1 952 1309 1297 1286 1250 1233 1200 1192 1179 1166 1164 1157 1154 1140 1139 1138 1124 1122 1117 1116 1081 1063 1061 1058 1046 1027 1022 1021 1012 1010 1005 997 992 989 982 977 974 973 966 955 950 949 942 941 940 939 936 935 931 927 912 906 901 896 895 888 885 881 880 870 866 862 861 857 855 854 852 ...
result:
ok correct plan!
Test #120:
score: 0
Accepted
time: 12ms
memory: 50360kb
input:
910 1384 1888 1225 290 23 1729 1079 2691 1122 39 1251 2702 50 2243 2527 1274 1535 69 2627 648 1304 82 83 86 94 97 2661 105 111 112 578 2884 2919 313 2001 269 1219 135 2444 1063 734 1104 171 1142 1068 1387 183 847 701 2956 1373 1422 855 2962 202 1757 210 211 918 678 1819 225 2251 2692 707 1248 901 84...
output:
1 592 835 833 831 813 795 778 774 763 756 750 745 743 730 713 699 698 693 686 684 681 664 661 658 657 643 642 638 634 624 619 616 608 603 601 600 596 594 590 587 584 582 579 578 574 572 569 566 555 552 548 543 541 532 528 527 526 524 522 517 515 510 505 500 498 497 490 489 488 487 483 481 476 475 47...
result:
ok correct plan!
Test #121:
score: 0
Accepted
time: 18ms
memory: 50520kb
input:
3000 2844 461 820 23 103 2381 115 2017 2666 2303 405 2169 1670 1335 842 1207 2988 1645 92 2142 402 1191 225 2960 2249 729 1242 607 738 2858 2596 488 985 1723 2183 2624 2081 1833 1966 1197 2240 508 1778 725 408 1304 440 471 552 1819 1040 670 2638 182 530 1801 410 799 652 1575 1356 1095 1205 1420 1135...
output:
2 2004 2914 2845 2843 2795 2759 2740 2696 2538 2827 2882 2383 2317 2316 2309 2241 2232 2187 2322 2704 2163 2155 2148 2145 2112 2406 2289 2104 2063 2052 2008 2361 1946 2164 1941 2523 1919 1894 1891 1878 1869 2095 1857 2407 1845 2224 1811 2479 2695 1800 2916 1836 2967 1767 1848 2295 1751 2646 2492 198...
result:
ok correct plan!
Test #122:
score: 0
Accepted
time: 12ms
memory: 50516kb
input:
2364 1889 684 934 1376 1684 1642 2003 1890 2227 2999 585 2574 253 1573 1061 946 1419 464 2126 2622 610 2346 2554 153 173 2315 2044 2288 1675 723 356 2125 285 822 256 1664 2984 841 104 1313 1291 2801 1898 264 304 1900 2390 2589 1955 22 410 2351 711 854 420 2711 1942 243 1083 2382 2618 1279 2139 296 9...
output:
2 1578 2265 2256 2248 2143 2067 1970 1934 1923 2182 1823 2078 1808 2090 2011 1786 2152 2113 1681 1836 2082 1645 2170 2333 2166 1854 2362 2327 2290 1729 1879 1556 1764 1541 1523 1521 1710 1504 1503 1779 1467 1463 1706 2046 2222 2285 1524 1433 1414 1408 1386 2093 1418 2173 1359 2033 2251 1446 1789 198...
result:
ok correct plan!
Test #123:
score: 0
Accepted
time: 4ms
memory: 50452kb
input:
1281 2074 1522 2686 1870 2228 1962 356 816 19 2378 1651 2061 2577 1573 1786 621 2192 2772 1127 715 2245 47 2447 1235 705 2461 62 2891 66 1189 1333 2283 1591 268 124 2171 1408 881 259 1251 1647 1183 99 381 2564 2172 210 2655 2650 713 2913 252 536 776 1625 1175 1171 133 822 1679 2352 1663 2759 1820 24...
output:
2 844 1255 1125 1164 1173 993 984 983 976 974 956 940 897 896 877 1241 1140 1127 1014 1016 1036 1080 831 1117 1042 800 779 778 773 1176 885 733 781 715 1084 710 825 685 1102 672 671 670 662 780 1167 950 792 646 642 878 1254 619 1089 1081 1174 850 1128 703 749 730 1219 796 552 910 690 1150 975 1249 5...
result:
ok correct plan!
Test #124:
score: 0
Accepted
time: 17ms
memory: 50404kb
input:
940 2645 2855 624 128 838 1650 2773 22 869 2154 1537 1925 2968 177 832 1962 1373 2739 1675 2706 2125 1702 1620 53 448 975 988 934 1699 914 2723 1347 2005 1581 1039 1569 656 727 155 2858 1011 119 1352 1415 1154 13 42 2332 1031 585 2948 1363 347 1763 1491 2138 1720 2738 1385 102 2224 1692 2002 2490 20...
output:
2 632 894 801 776 770 765 740 719 634 692 600 595 712 936 752 778 552 546 584 538 536 527 522 884 518 631 893 916 697 504 805 499 590 490 747 560 743 656 478 468 920 637 626 742 658 450 569 438 650 427 869 672 746 405 662 559 481 564 464 815 379 796 401 937 883 731 359 908 356 489 722 909 332 330 32...
result:
ok correct plan!
Test #125:
score: 0
Accepted
time: 19ms
memory: 50440kb
input:
2095 2631 792 649 2080 2986 49 1029 1481 2808 283 1296 2528 2531 462 1767 1257 1043 2145 78 2551 1230 2850 914 129 2318 31 2517 232 402 62 174 1141 2536 1172 41 378 466 44 2660 2872 498 185 1193 1045 909 1151 886 58 453 949 1978 2873 64 2428 171 1909 214 2835 2632 2905 2964 2017 2650 1439 1744 285 2...
output:
2 1400 1943 1893 1830 1814 1719 1717 1660 1643 1601 1950 1577 1561 1560 1547 1544 1795 1533 1822 1497 1489 1454 1619 1591 1419 1408 1862 1401 2085 1402 1439 1372 1777 1749 1512 1855 1766 1635 1318 1450 1744 1243 1241 1324 1786 2077 2007 1481 2094 1180 1369 1166 1890 1153 1237 1159 1433 1764 1134 149...
result:
ok correct plan!
Test #126:
score: 0
Accepted
time: 6ms
memory: 50608kb
input:
3000 2939 325 1954 1899 2042 258 908 2948 732 2697 2370 2087 2709 236 1945 348 1604 2677 610 2209 1309 1790 125 367 1668 2428 1730 122 358 373 501 1964 2554 1149 2151 2679 449 2869 2795 2126 2807 2517 138 2998 2875 752 2615 280 2726 513 2769 2038 2917 145 2878 398 493 1421 2025 1432 870 2062 2653 13...
output:
2 2996 268 796 565 340 73 2048 1734 2807 2139 673 167 2727 1991 2295 2074 1401 2032 835 1502 2287 1815 1723 1674 429 1118 168 1738 200 1790 22 126 237 282 2109 1881 2246 2245 1569 101 481 2862 1995 1244 392 1545 503 2969 2904 1779 476 2479 802 2258 2412 1619 2359 1987 466 2907 2210 498 604 666 2552 ...
result:
ok correct plan!
Test #127:
score: 0
Accepted
time: 15ms
memory: 50380kb
input:
674 1880 2234 2382 2753 1061 45 2503 361 360 2359 1500 1235 2037 334 1225 658 2724 2459 1280 584 2303 1051 1272 150 545 1969 2672 2807 1999 840 1195 2806 1184 160 234 974 271 2510 916 590 723 2563 157 56 2351 1404 2684 228 2293 1255 2475 202 2048 135 244 2935 2782 98 2874 1349 654 555 1698 5 2114 18...
output:
2 672 91 468 312 60 557 377 291 23 478 335 371 270 31 560 490 322 225 274 452 341 527 143 296 19 539 585 110 344 387 330 390 300 292 272 72 380 614 578 328 179 654 166 405 172 638 318 444 298 413 532 118 132 62 48 474 150 590 583 610 509 167 421 664 332 629 183 281 565 38 24 220 607 336 211 546 373 ...
result:
ok correct plan!
Test #128:
score: 0
Accepted
time: 13ms
memory: 50412kb
input:
1320 1375 2695 182 2480 1243 2049 1774 2838 1499 202 984 1895 892 175 64 1028 508 776 2178 2727 297 80 2321 1091 539 2085 1819 789 8 2399 16 1128 1116 2946 1669 2896 2358 627 2647 2739 264 1984 130 167 2088 2037 2068 2687 1680 184 2952 54 2766 311 2289 2107 12 1799 1891 1005 2338 457 2591 2370 2936 ...
output:
2 1314 954 768 509 534 593 347 452 926 828 769 718 1233 602 399 1292 1079 1159 1046 1147 714 1145 422 652 261 807 500 33 101 1132 352 263 418 781 471 1068 878 1096 164 1209 1299 805 508 582 771 244 1058 507 667 920 902 1308 889 1281 1112 1158 1020 952 340 181 1080 4 29 794 1095 362 484 474 862 590 5...
result:
ok correct plan!
Test #129:
score: 0
Accepted
time: 8ms
memory: 50368kb
input:
463 260 271 1715 1067 1823 1827 2547 2346 2277 1724 728 889 1538 92 2431 2447 775 1942 1635 1066 466 2533 2902 2855 724 1504 832 928 2862 2789 1085 670 1393 198 533 266 1384 1729 2414 2194 598 567 2159 1083 1596 781 528 2596 2766 426 1683 1505 2597 572 2382 2901 1236 1153 304 376 2002 962 2479 2181 ...
output:
2 456 380 274 299 220 210 182 211 395 79 289 250 232 164 443 383 148 336 321 259 377 193 237 52 240 124 105 160 363 55 447 56 238 282 233 442 262 135 27 34 175 168 120 204 298 130 169 181 205 150 452 151 28 215 224 252 143 12 347 118 459 416 197 95 413 166 20 103 408 69 246 112 366 436 29 255 304 10...
result:
ok correct plan!
Test #130:
score: 0
Accepted
time: 17ms
memory: 50380kb
input:
89 1686 2166 2723 236 2809 2872 1332 1041 1700 1233 1974 1547 1312 1401 2847 1724 1454 1269 1606 2540 444 2484 2640 196 854 630 593 2957 122 2480 2913 2500 2648 238 463 2696 2801 555 1636 1880 2009 700 2329 1155 1771 1224 47 2758 1999 2925 1288 2338 2508 2419 1987 2393 715 823 1080 449 2495 1940 245...
output:
2 86 28 44 79 36 31 46 16 38 17 27 59 2 47 45 9 4 64 81 48 84 15 80 3 70 83 5 65 68 30 66 74 20 57 77 23 76 82 37 14 35 13 60 43 67 63 54 49 78 33 18 26 8 24 71 61 52 11 85 6 29 72 32 10 34 51 62 56 41 19 42 39 12 21 58 73 53 55 88 50 40 87 75 69 22 25 89 88 79 44 28 7 82 76 77 57 74 66 30 65 83 70...
result:
ok correct plan!
Test #131:
score: 0
Accepted
time: 11ms
memory: 50584kb
input:
3000 547 2735 658 2782 1947 2965 264 2903 2612 1395 1057 1923 2913 38 1479 1659 2158 2648 2299 251 1700 572 704 247 1058 2558 1940 634 2599 2774 1488 1854 35 20 1326 1926 2551 1835 2638 1515 1793 193 875 1216 2104 717 753 1844 2262 1284 1819 2235 697 898 2678 2473 772 2793 257 1242 954 987 924 2515 ...
output:
2 2998 820 1635 2307 1069 2561 454 2712 1511 2913 13 241 1966 2671 416 1580 1168 1776 1772 435 514 2138 1900 2784 73 2815 119 1135 1849 2112 2861 931 1191 193 42 2826 2099 1843 433 2998 577 2947 120 320 836 2429 2002 2633 2095 2880 2326 1076 739 1834 2918 2564 1654 409 2445 2855 604 1959 2964 1336 2...
result:
ok correct plan!
Subtask #10:
score: 1
Accepted
Test #132:
score: 1
Accepted
time: 4ms
memory: 50444kb
input:
3000 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 101...
output:
0
result:
ok correct plan!
Test #133:
score: 0
Accepted
time: 12ms
memory: 50468kb
input:
3000 1 2977 74 1664 2956 968 7 612 1394 839 147 1582 1970 506 15 16 17 18 444 1032 21 1634 1941 676 2222 1028 2266 1986 1565 30 2798 32 33 573 35 36 388 240 39 917 1047 2755 2894 44 45 257 1953 1436 49 50 51 52 1982 54 2766 1075 57 58 59 982 2441 1339 63 777 1298 816 2845 2098 69 70 2105 1868 73 3 1...
output:
1 1938 2875 2864 2853 2847 2841 2818 2800 2774 2771 2763 2758 2757 2722 2719 2713 2691 2652 2640 2617 2601 2592 2582 2579 2576 2568 2567 2552 2551 2538 2535 2522 2513 2509 2508 2496 2474 2473 2472 2468 2462 2459 2457 2450 2449 2439 2426 2425 2424 2421 2410 2404 2403 2399 2395 2394 2380 2369 2366 233...
result:
ok correct plan!
Test #134:
score: 0
Accepted
time: 16ms
memory: 50396kb
input:
1120 958 204 1391 2548 824 319 325 488 34 175 1658 43 2386 46 1218 547 1695 52 868 2643 1484 1230 2179 318 1984 1319 548 1308 83 1645 2710 798 92 556 2536 101 1405 105 413 108 2766 110 191 1211 113 723 559 1978 985 129 130 924 2934 1532 1537 138 804 1242 2935 153 149 1003 1223 2001 159 1814 2852 441...
output:
1 752 1105 1064 1036 1024 1020 998 993 978 975 970 949 947 932 920 914 913 899 895 882 879 866 863 859 852 851 841 833 825 814 811 806 803 796 788 781 776 760 753 748 743 740 739 737 732 731 730 725 718 717 714 712 703 700 695 692 684 679 674 671 668 664 663 661 659 651 649 645 643 637 634 633 619 6...
result:
ok correct plan!
Test #135:
score: 0
Accepted
time: 12ms
memory: 50412kb
input:
1037 312 2 8 606 12 2077 2546 916 758 559 924 37 39 1792 42 1173 47 2509 1183 1770 55 2856 1342 62 1401 75 713 78 2998 83 89 90 2957 1046 2143 110 2407 1963 213 469 1735 130 131 132 1199 291 783 142 321 2767 921 804 1333 156 2237 2753 161 1038 2244 2832 980 176 186 192 2428 196 199 205 1619 1583 126...
output:
1 678 989 963 960 958 956 915 906 891 881 879 876 873 872 867 860 858 830 813 809 803 801 794 778 774 767 766 764 755 752 748 747 744 740 735 728 725 717 716 715 712 709 694 692 691 688 685 679 677 673 670 668 666 664 658 649 643 639 636 633 632 629 625 624 623 622 620 616 615 613 601 594 591 589 58...
result:
ok correct plan!
Test #136:
score: 0
Accepted
time: 12ms
memory: 50444kb
input:
675 2763 331 869 2553 2002 1937 2258 739 789 956 2662 2626 35 53 2622 58 59 1502 2637 865 2876 1271 87 92 102 110 1297 710 2303 1462 1816 2716 2850 144 2935 149 168 1842 755 353 173 685 1977 185 915 266 293 201 1545 692 2442 1708 568 2774 766 230 237 2521 252 1067 255 262 1998 188 1031 2697 785 272 ...
output:
1 458 673 658 650 595 588 552 549 548 535 529 524 513 497 494 492 489 487 486 484 483 476 468 467 464 463 451 449 446 444 443 434 432 431 427 424 420 414 413 412 404 401 400 393 390 381 378 371 369 368 365 363 361 352 350 347 346 344 342 339 337 336 334 333 331 330 320 319 318 316 310 308 305 296 29...
result:
ok correct plan!
Test #137:
score: 0
Accepted
time: 16ms
memory: 50396kb
input:
26 831 445 1431 2543 696 753 2719 818 377 849 1113 1456 1248 2259 671 1204 2233 1966 2577 2364 1804 1279 2084 675 2039 795
output:
1 18 20 19 17 14 12 7 4 3 1 9 15 24 26 16 22 21 25 23
result:
ok correct plan!
Test #138:
score: 0
Accepted
time: 12ms
memory: 50492kb
input:
3000 1400 1739 2183 418 1406 1753 552 1164 651 10 607 12 162 2581 379 1030 419 1772 642 590 533 289 1805 1783 2446 1576 1585 200 277 2525 2939 1210 174 688 2188 1032 37 1107 385 1306 375 531 2341 1267 1616 46 402 1844 2669 1066 434 22 377 740 240 1202 2879 2019 2471 836 799 2182 396 2764 2768 2610 1...
output:
2 2008 2835 2773 2707 2743 2646 2629 2924 2574 2554 2915 2978 2828 2420 2897 2344 2343 2567 2321 2455 2889 2275 2534 2242 2226 2225 2448 2165 2125 2113 2062 2310 2051 2047 2218 2042 2280 2826 2916 2021 1997 1996 2444 1973 2954 1950 1939 2953 2910 2519 1913 1911 1908 1905 2057 1893 1889 2257 1873 186...
result:
ok correct plan!
Test #139:
score: 0
Accepted
time: 4ms
memory: 50464kb
input:
1542 346 2066 1998 643 114 1000 2626 686 2335 1035 1673 1108 1870 1237 2806 588 448 738 332 2537 716 3000 36 549 2972 1143 1550 44 1149 170 1199 2720 1522 2056 2372 1918 460 291 1887 2351 2777 426 2271 2896 2871 655 1452 2539 1189 99 2470 1445 106 464 842 750 528 120 1906 742 146 2549 2942 2381 1317...
output:
2 1046 1484 1381 1313 1300 1297 1277 1186 1164 1151 1285 1209 1524 1121 1108 1420 1501 1183 1076 1535 1057 1468 1114 1243 1086 1250 985 972 970 955 954 953 1331 944 918 917 915 956 1095 933 916 1380 872 1027 862 860 1206 847 1119 837 1099 1026 822 1446 1419 808 1531 803 791 786 805 763 879 1332 892 ...
result:
ok correct plan!
Test #140:
score: 0
Accepted
time: 12ms
memory: 50488kb
input:
1663 2463 1210 7 487 2396 1241 216 822 2360 277 2610 1377 909 1345 1034 1965 735 30 2511 1082 2033 2856 292 410 1459 1964 2748 438 2195 2300 2901 2998 534 2458 1497 2386 685 267 2176 1040 1770 1382 1173 57 2523 1133 2780 1756 2110 76 159 1872 1064 691 158 657 2057 712 2099 2758 2700 690 2320 544 234...
output:
2 1106 1415 1385 1383 1299 1578 1570 1533 1261 1263 1179 1177 1175 1475 1124 1117 1112 1103 1325 1077 1230 1596 1046 1025 1007 1323 982 1018 1195 966 1283 1540 1181 1207 1395 1557 1003 1490 915 1506 892 1266 1021 1145 876 1259 1165 871 833 1189 1450 806 805 800 1329 862 1190 1199 785 1178 1276 778 1...
result:
ok correct plan!
Test #141:
score: 0
Accepted
time: 12ms
memory: 50464kb
input:
1789 951 175 2488 1756 2070 2690 813 2450 2772 2790 722 1158 1832 679 2449 2256 2826 2993 1740 55 729 2575 2867 1317 1648 399 677 2044 388 634 2922 1018 653 733 203 1491 73 2896 1968 81 587 2061 1434 827 531 1 2298 1544 142 1050 2400 2232 103 1069 1251 108 1996 1883 2582 438 1861 1479 2864 2093 48 9...
output:
2 1180 1681 1735 1522 1586 1452 1362 1358 1490 1315 1613 1542 1250 1239 1234 1591 1203 1189 1448 1438 1128 1776 1200 1307 1269 1085 1070 1049 1048 1174 1541 1027 1034 1000 1332 989 1163 980 1004 1327 957 955 1749 970 1466 926 1469 1628 1320 909 905 900 897 1292 1553 1458 1573 1539 1461 1126 854 849 ...
result:
ok correct plan!
Test #142:
score: 0
Accepted
time: 15ms
memory: 50472kb
input:
602 493 1824 1773 819 1770 1777 1581 1065 1568 2739 964 1479 367 1446 101 825 2579 2490 35 1642 110 1857 944 2358 557 1501 1151 1733 550 1025 2553 1618 2270 2589 2380 2605 436 2508 202 896 1940 373 2863 2416 1145 924 131 234 703 2488 1156 2043 2765 920 83 2385 2674 1180 2692 902 290 1771 978 2899 85...
output:
2 402 557 528 451 445 570 489 407 505 596 386 384 584 361 453 328 467 486 306 553 550 478 287 286 285 374 267 263 560 322 277 527 325 397 251 250 414 321 396 426 422 237 589 424 506 295 512 418 272 455 209 317 271 225 590 539 383 221 545 179 462 170 166 165 434 256 360 393 155 345 147 196 141 336 47...
result:
ok correct plan!
Test #143:
score: 0
Accepted
time: 12ms
memory: 50500kb
input:
3000 56 65 595 1429 1535 1667 1176 979 222 2670 2385 2519 10 125 1837 2504 1727 1249 2279 1696 556 2512 1011 1925 607 397 2328 1639 1939 192 1191 2855 2319 408 1208 1014 821 2848 1006 742 434 1448 2770 1178 1057 2786 1935 2075 206 1375 1770 555 1172 1624 1510 1350 212 1112 163 1944 295 2800 2429 186...
output:
2 2994 830 906 2764 955 587 439 2631 1283 249 2935 334 2287 2236 655 1027 239 2889 518 118 1532 621 1291 2947 2723 2625 1607 264 2732 1218 2027 143 2696 899 444 498 197 684 630 2277 1696 20 2127 1711 1902 1754 408 34 189 2652 2036 1836 384 233 2634 657 2614 1931 527 2788 1122 1678 969 1301 277 1658 ...
result:
ok correct plan!
Test #144:
score: 0
Accepted
time: 11ms
memory: 50476kb
input:
882 2990 2296 1207 374 2680 459 40 1736 716 433 2953 2701 1751 1606 627 1663 2448 1489 2226 1464 976 207 2619 825 2683 620 1882 2566 1250 1321 211 2666 346 120 2171 2404 1271 268 818 793 89 881 1856 1793 79 2122 2080 747 1731 1346 1858 548 191 2972 907 2348 269 2709 2499 559 2774 2736 154 1190 2247 ...
output:
2 878 226 853 605 101 417 50 436 344 644 46 881 426 634 576 390 857 551 484 400 208 675 614 139 810 406 478 305 696 192 651 753 683 158 284 55 154 112 473 636 785 528 573 266 869 508 93 471 456 127 443 307 21 110 766 458 369 98 695 770 204 136 358 669 739 306 249 748 498 312 569 370 3 163 772 625 46...
result:
ok correct plan!
Test #145:
score: 0
Accepted
time: 12ms
memory: 50476kb
input:
935 1339 2313 514 51 1324 2960 2574 2081 1440 2642 471 2529 1899 2808 2894 1565 1716 1175 630 1924 72 1954 1521 2856 1595 1059 2414 2455 1070 2299 2048 266 2685 1016 2675 2464 562 2366 474 839 105 2511 533 768 425 2939 785 1551 1120 1052 40 2312 107 1563 2107 2336 1731 2302 247 1821 1950 258 2122 23...
output:
2 930 658 838 33 247 735 756 89 76 64 841 211 646 137 494 16 51 260 286 732 38 53 917 221 258 770 533 98 225 776 565 118 862 156 39 785 737 842 394 238 95 713 231 912 46 546 907 611 170 578 513 108 761 795 255 342 783 529 650 8 237 535 866 343 563 244 821 900 208 324 540 918 106 870 922 822 471 327 ...
result:
ok correct plan!
Test #146:
score: 0
Accepted
time: 4ms
memory: 50464kb
input:
2218 1700 1367 2282 525 2157 744 2284 1101 994 1378 2642 1555 1005 440 1157 1383 1533 449 45 1056 1064 2389 333 595 1689 2064 186 1862 397 659 188 537 198 677 2106 1695 147 2091 660 437 1521 697 1653 2991 2109 594 266 8 1412 1023 2875 1678 115 1907 581 2736 635 2248 2694 924 319 2350 1573 1567 1608 ...
output:
2 2214 1093 1242 267 789 1834 441 1943 905 1349 1819 1958 1855 1535 1204 1191 72 1374 1529 1564 1509 114 196 530 1193 120 458 57 1513 338 1806 184 185 576 1175 364 320 2139 710 205 404 535 1305 1310 2096 690 1248 517 1815 1173 1503 740 50 2041 244 1118 1372 1730 206 731 159 1249 456 1853 366 1584 13...
result:
ok correct plan!
Test #147:
score: 0
Accepted
time: 4ms
memory: 50408kb
input:
84 416 2447 2567 412 2875 619 2282 488 561 1898 783 2347 556 2512 1723 204 2245 2839 990 1576 2215 343 2119 806 344 2104 2321 1661 156 743 676 2462 1400 1630 1675 1296 1825 2864 2249 1469 1137 500 2342 661 2745 1617 1537 2770 2990 2601 2117 2749 192 2200 1449 1925 479 2594 401 1545 2182 1685 1702 14...
output:
2 82 56 51 81 38 40 47 62 39 67 74 80 18 82 5 22 31 66 12 57 23 30 41 60 21 44 34 33 77 45 28 70 32 36 55 26 84 49 69 2 53 10 29 79 48 63 7 65 43 46 35 75 58 61 17 9 4 73 14 42 20 78 52 37 64 27 19 6 25 24 11 72 68 16 71 83 76 50 15 13 8 59 54 82 67 38 81 51 59 50 76 83 71 3 53 69 84 55 77 33 34 21...
result:
ok correct plan!
Extra Test:
score: 0
Extra Test Passed