QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#85368 | #5238. Fotografia [C] | anhduc2701 | 1 | 26ms | 52376kb | C++23 | 3.0kb | 2023-03-07 17:45:05 | 2023-03-07 17:46:46 |
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;
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);
if(len(q)%2==0){
int sz=len(q);
vector<int>d1;
int so=sz-1;
for(int i=1;i<so;i++){
ans[ti].pb({q[i],q[so]});
so--;
d1.pb(q[i]);
}
for(int i=0;i<q.size();i+=2){
ans[2].pb({q[i],q[i+1]});
}
k=2;
}
else{
int sz=len(q);
vector<int>d1;
if(sz==3){
ans[ti].pb({q[0],q[1]});
ans[ti+1].pb({q[0],q[2]});
k=2;
}
else{
ans[ti].pb({q[0],q[1]});
ans[ti].pb({q[2],q.back()});
swap(q[0],q[1]);
int so=sz-2;
for(int i=3;i<so;i++){
ans[ti].pb({q[i],q[so]});
swap(q[i],q[so]);
so--;
}
for(int i=1;i<q.size();i+=2){
ans[ti+1].pb({q[i],q[i+1]});
}
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]<<" ";
}
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];
}
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;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 1
Accepted
Test #1:
score: 1
Accepted
time: 9ms
memory: 50280kb
input:
5 138 352 915 1375 2848
output:
0
result:
ok correct plan!
Test #2:
score: 0
Accepted
time: 12ms
memory: 50384kb
input:
5 2182 1715 524 2331 2791
output:
1 2 1 3
result:
ok correct plan!
Test #3:
score: 0
Accepted
time: 18ms
memory: 50288kb
input:
4 77 774 1089 2658
output:
0
result:
ok correct plan!
Test #4:
score: 0
Accepted
time: 14ms
memory: 50568kb
input:
3 517 1232 2233
output:
0
result:
ok correct plan!
Test #5:
score: 0
Accepted
time: 7ms
memory: 50332kb
input:
2 2174 2569
output:
0
result:
ok correct plan!
Test #6:
score: 0
Accepted
time: 26ms
memory: 50408kb
input:
2 1790 2393
output:
0
result:
ok correct plan!
Test #7:
score: 0
Accepted
time: 4ms
memory: 50300kb
input:
5 1111 1996 228 2700 1740
output:
2 4 4 1 2 3 4 5 1 4 3
result:
ok correct plan!
Test #8:
score: 0
Accepted
time: 7ms
memory: 50280kb
input:
3 378 274 1644
output:
1 2 1 2
result:
ok correct plan!
Test #9:
score: 0
Accepted
time: 8ms
memory: 50424kb
input:
5 2108 2822 2877 55 743
output:
2 4 5 1 3 4 4 2 1 5 4
result:
ok correct plan!
Test #10:
score: 0
Accepted
time: 8ms
memory: 50384kb
input:
2 1998 2103
output:
0
result:
ok correct plan!
Test #11:
score: 0
Accepted
time: 7ms
memory: 50388kb
input:
5 2415 697 1067 813 2616
output:
2 2 1 4 2 1 2
result:
ok correct plan!
Test #12:
score: 0
Accepted
time: 17ms
memory: 50796kb
input:
5 1979 605 1578 2181 2305
output:
2 2 1 3 2 1 2
result:
ok correct plan!
Test #13:
score: 0
Accepted
time: 11ms
memory: 50336kb
input:
5 2918 2570 2733 959 356
output:
2 4 2 1 5 3 2 2 4
result:
ok correct plan!
Test #14:
score: 0
Accepted
time: 8ms
memory: 50376kb
input:
2 2906 395
output:
1 2 1 2
result:
ok correct plan!
Test #15:
score: 0
Accepted
time: 11ms
memory: 50348kb
input:
2 283 1574
output:
0
result:
ok correct plan!
Test #16:
score: 0
Accepted
time: 3ms
memory: 50356kb
input:
3 1530 462 2203
output:
1 2 1 2
result:
ok correct plan!
Test #17:
score: 0
Accepted
time: 7ms
memory: 50388kb
input:
5 1266 1707 1664 555 478
output:
2 4 4 1 3 5 4 2 1 4 5
result:
ok correct plan!
Subtask #2:
score: 0
Wrong Answer
Test #18:
score: 1
Accepted
time: 11ms
memory: 50376kb
input:
10 321 457 797 885 892 1367 2480 2742 2767 2955
output:
0
result:
ok correct plan!
Test #19:
score: 0
Accepted
time: 11ms
memory: 50328kb
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: 10ms
memory: 50408kb
input:
5 1274 1245 959 1921 2047
output:
1 2 1 3
result:
ok correct plan!
Test #21:
score: 0
Accepted
time: 12ms
memory: 50284kb
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: 13ms
memory: 50332kb
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: 7ms
memory: 50452kb
input:
4 2812 1607 216 2984
output:
1 2 1 3
result:
ok correct plan!
Test #24:
score: 0
Accepted
time: 15ms
memory: 50420kb
input:
10 667 1242 121 2290 382 197 616 2857 2685 1637
output:
2 6 8 2 1 5 6 7 6 10 4 1 3 8 7
result:
ok correct plan!
Test #25:
score: 0
Accepted
time: 18ms
memory: 50388kb
input:
5 307 228 1861 1304 1280
output:
1 4 3 1 2 5
result:
ok correct plan!
Test #26:
score: 0
Accepted
time: 16ms
memory: 50420kb
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: 6ms
memory: 50356kb
input:
2 2609 1996
output:
1 2 1 2
result:
ok correct plan!
Test #28:
score: 0
Accepted
time: 15ms
memory: 50384kb
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: 11ms
memory: 50352kb
input:
10 2746 1093 2954 1693 2431 1698 2687 2029 355 597
output:
2 6 7 2 1 9 3 6 6 8 5 2 10 7 6
result:
ok correct plan!
Test #30:
score: 0
Accepted
time: 3ms
memory: 50388kb
input:
3 1499 2919 1039
output:
2 2 1 2 2 1 3
result:
ok correct plan!
Test #31:
score: 0
Accepted
time: 8ms
memory: 50408kb
input:
8 178 1662 2902 2717 2054 776 1960 245
output:
2 6 5 7 2 4 8 3 6 5 3 2 7 6 8
result:
ok correct plan!
Test #32:
score: 0
Accepted
time: 4ms
memory: 50452kb
input:
4 2892 2087 1565 180
output:
1 4 2 1 4 3
result:
ok correct plan!
Test #33:
score: 0
Accepted
time: 4ms
memory: 50636kb
input:
1 1871
output:
0
result:
ok correct plan!
Test #34:
score: -1
Wrong Answer
time: 16ms
memory: 50300kb
input:
10 2101 2832 2413 291 2116 1119 2447 1746 205 731
output:
2 8 10 2 4 6 9 7 5 8 10 7 8 10 4 1 6 2 3 5 9
result:
wrong answer the array is not sorted
Subtask #3:
score: 0
Wrong Answer
Test #35:
score: 1
Accepted
time: 7ms
memory: 51444kb
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: 12ms
memory: 50296kb
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: 7ms
memory: 50384kb
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: 16ms
memory: 50332kb
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: 4ms
memory: 50392kb
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: 11ms
memory: 50348kb
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 13 11 8 7 14 4 6 17 18 15 10 19 16 13 12 8 7 16 2 3 1 4 6 14 17 9 11 10 20
result:
ok correct plan!
Test #41:
score: 0
Accepted
time: 4ms
memory: 50576kb
input:
3 1873 229 1114
output:
2 2 1 3 2 1 2
result:
ok correct plan!
Test #42:
score: 0
Accepted
time: 12ms
memory: 50424kb
input:
5 511 1208 2045 1272 535
output:
2 2 2 3 2 2 5
result:
ok correct plan!
Test #43:
score: 0
Accepted
time: 7ms
memory: 50332kb
input:
2 1589 1045
output:
1 2 1 2
result:
ok correct plan!
Test #44:
score: 0
Accepted
time: 3ms
memory: 50384kb
input:
11 2255 1687 2717 177 802 965 512 2606 2521 1243 2948
output:
2 8 8 3 2 1 7 4 10 9 6 3 6 1 2 4 5
result:
ok correct plan!
Test #45:
score: -1
Wrong Answer
time: 13ms
memory: 50428kb
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 4 6 2 9 17 15 3 16 1 13 7 18 5 11 20 14 8 19
result:
wrong answer the array is not sorted
Subtask #4:
score: 0
Wrong Answer
Test #51:
score: 1
Accepted
time: 7ms
memory: 50308kb
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: 11ms
memory: 52236kb
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: 10ms
memory: 50388kb
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: 14ms
memory: 50372kb
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: 7ms
memory: 51404kb
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: 50296kb
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 66 96 56 55 52 67 75 36 35 30 54 57 24 87 22 21 20 18 17 28 15 31 13 12 79 9 90 7 6 48 4 2 1 76 38 99 37 91 83 40 89 51 71 60 32 78 88 98 43 58 41 33 47 85 39 72 70 50 59 84 68 94 100 61 86 80 72 66 97 64 55 65 42 45 36 35 30 63 29 82 24 74 23 21 69 19 17 44 15 73 14 46 12 53 10 81 7 6 8 5 93 ...
result:
ok correct plan!
Test #57:
score: 0
Accepted
time: 12ms
memory: 50300kb
input:
9 1054 167 2039 153 2316 2073 1110 2104 554
output:
2 6 7 3 1 4 6 9 4 5 3 7 9
result:
ok correct plan!
Test #58:
score: 0
Accepted
time: 0ms
memory: 50376kb
input:
8 2204 1364 2131 1248 2817 947 415 1709
output:
2 6 5 4 1 7 6 8 4 3 2 4 6
result:
ok correct plan!
Test #59:
score: 0
Accepted
time: 12ms
memory: 50284kb
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 38 30 42 22 20 57 16 40 15 67 14 9 8 33 5 17 29 2 28 1 26 58 52 44 56 11 46 32 50 19 24 54 41 39 55 59 25 68 48 49 66 48 38 30 63 27 20 53 16 31 15 51 12 37 10 9 60 6 5 23 4 65 3 2 34 1 28 58 18 29 44 17 56 43 33 46 13 14 19 67 24 40 41 57 55 35 42 68 64 62
result:
ok correct plan!
Test #60:
score: 0
Accepted
time: 16ms
memory: 51612kb
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 61 40 36 81 35 74 34 69 31 24 76 22 21 37 26 44 15 67 18 11 25 9 8 78 5 32 94 3 2 17 16 55 96 65 23 82 41 47 39 91 86 50 43 42 29 77 68 52 98 60 28 56 70 83 89 92 93 51 75 66 95 80 66 61 40 85 35 59 34 90 31 38 22 21 30 20 45 19 46 15 49 14 72 13 11 58 9 27 5 73 4 54 3 2 12 1 17 16 6 94 ...
result:
ok correct plan!
Test #61:
score: -1
Wrong Answer
time: 7ms
memory: 50400kb
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 5 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 1 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 58 10 48 17 20 18 86 29 61 49 65 64 98 97 22...
result:
wrong answer the array is not sorted
Subtask #5:
score: 0
Wrong Answer
Test #67:
score: 1
Accepted
time: 13ms
memory: 51060kb
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: 11ms
memory: 50396kb
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: 11ms
memory: 50416kb
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: 4ms
memory: 50288kb
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: 12ms
memory: 50340kb
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: -1
Wrong Answer
time: 8ms
memory: 50776kb
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:
wrong answer the array is not sorted
Subtask #6:
score: 0
Wrong Answer
Test #78:
score: 1
Accepted
time: 11ms
memory: 50556kb
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: 12ms
memory: 50460kb
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: 7ms
memory: 50428kb
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: 7ms
memory: 50524kb
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: 8ms
memory: 50484kb
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: 8ms
memory: 50496kb
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 2427 2410 2405 2397 2392 2384 2269 2235 2221 2209 2184 2183 2163 2161 2122 2425 2111 2102 2083 2064 2060 2009 1980 1963 1948 1964 1935 1929 1893 1891 1867 1824 1816 1813 1794 1792 1767 1763 1761 2261 1751 2970 1749 1743 2985 2737 1724 1717 1713 1711 1697 2272 1695 1691 200...
result:
ok correct plan!
Test #84:
score: 0
Accepted
time: 11ms
memory: 50484kb
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 2180 2106 2047 1998 1988 1983 1976 1939 1915 2455 1903 2311 1897 1862 1792 1779 1757 1751 1794 1733 2334 2115 1722 1711 1666 1654 1650 1636 1629 1615 1579 1726 1556 2355 1584 1535 1523 1501 1708 1824 1626 1468 1443 1435 1419 2505 1408 1712 1399 1644 1471 1394 1391 135...
result:
ok correct plan!
Test #85:
score: 0
Accepted
time: 14ms
memory: 50444kb
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 1198 1053 1106 995 929 907 882 877 852 831 829 823 1213 807 787 776 761 747 733 727 1154 726 725 715 713 960 893 711 708 1034 701 695 691 672 665 870 634 633 620 616 613 973 609 606 598 592 860 589 587 1014 579 578 575 963 566 925 561 559 549 869 547 541 718 1052 537 529 524 511 647 886 505 97...
result:
ok correct plan!
Test #86:
score: 0
Accepted
time: 9ms
memory: 51692kb
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 1424 1381 1339 1312 1559 1292 1287 1286 1272 1249 1350 1235 1200 1199 1702 1525 1184 1182 1178 1163 1150 1147 1129 1141 1475 1270 1102 1099 1415 1094 1089 1158 1146 1074 1768 1044 1041 1038 1018 1013 998 992 991 1432 1069 974 966 1445 965 1644 960 956 1...
result:
ok correct plan!
Test #87:
score: 0
Accepted
time: 4ms
memory: 50400kb
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 124 117 114 108 95 81 79 118 155 73 140 62 56 55 54 53 154 49 90 141 121 41 162 126 39 112 34 31 120 30 163 25 24 37 96 172 21 60 20 47 143 27 15 14 13 12 98 11 91 10 89 8 7 6 72 5 4 3 2 129 1 52 85 18 147 44 33 9 103 149 97 125 26 65 58 43 28 119 168 100 83 42 75 166 66 145 138 110 35...
result:
ok correct plan!
Test #88:
score: -1
Wrong Answer
time: 8ms
memory: 50512kb
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:
wrong answer the array is not sorted
Subtask #7:
score: 0
Wrong Answer
Test #94:
score: 1
Accepted
time: 11ms
memory: 52376kb
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 2843 2821 2753 2712 2711 2666 2663 2631 2590 2531 2491 2454 2405 2398 2383 2382 2380 2375 2363 2323 2314 2271 2263 2212 2211 2190 2182 2160 2152 2106 2105 2090 2075 2072 2053 2042 2026 2024 2021 2019 1994 1993 1965 1960 1940 1931 1919 1896 1976 1892 1890 1882 2163 1881 2706 2384 1861 1843 184...
result:
ok correct plan!
Test #95:
score: 0
Accepted
time: 11ms
memory: 50496kb
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 1726 1708 1515 1502 1487 1486 1855 1462 1460 1417 1388 1387 1378 1369 1368 1362 1359 1357 1349 1300 1281 1279 1263 1259 1254 1223 1222 1220 1212 1338 1183 1176 1568 1155 1143 1138 1137 1132 1128 1118 1101 1084 1080 1079 1654 1053 1314 1051 1036 1029 1023 1550 1022 1020 1394 1010 1003 992 990 ...
result:
ok correct plan!
Test #96:
score: 0
Accepted
time: 11ms
memory: 50552kb
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 450 457 398 383 371 366 365 348 327 314 410 439 286 285 466 283 278 452 261 252 433 245 239 238 497 231 342 221 218 241 216 515 202 522 197 370 196 191 190 454 180 176 270 173 172 441 168 242 349 164 217 368 155 154 291 153 150 281 144 142 481 140 243 137 230 182 123 205 315 346 116 12...
result:
ok correct plan!
Test #97:
score: 0
Accepted
time: 8ms
memory: 50484kb
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 1636 1627 1617 1605 1595 1594 1560 1540 1536 1529 1514 1509 1498 1497 1484 1460 1446 1683 1418 1414 1450 1379 1352 1580 1339 1329 1327 1305 1287 1285 1281 1279 1277 1271 1269 1266 1437 2007 1214 1212 1198 1195 1186 1179 1175 1166 1374 1135 1128 1554 1125 1124 1120 1117 156...
result:
ok correct plan!
Test #98:
score: 0
Accepted
time: 4ms
memory: 50444kb
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 1690 1642 1634 1514 1489 1485 1493 1468 1460 1431 1403 1378 1347 1338 1331 1679 1307 1283 1280 1354 1276 1254 1661 1382 1223 1222 1219 1216 1467 1204 1198 1190 1175 1318 1160 1149 1413 1127 1126 1113 1564 1581 1093 1084 1082 1067 1061 1052 1039 1595 1035 1030 1021 1018 1013 1412 101...
result:
ok correct plan!
Test #99:
score: -1
Wrong Answer
time: 3ms
memory: 50516kb
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:
wrong answer the array is not sorted
Subtask #8:
score: 0
Wrong Answer
Test #105:
score: 1
Accepted
time: 8ms
memory: 50452kb
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 2280 2384 2241 2231 2230 2679 2225 2218 2197 2192 2170 2169 2162 2610 2056 2040 2038 2146 1997 1991 1987 1983 1971 1970 1955 1925 1917 1889 1880 2201 1870 1828 1820 2640 1813 1807 1800 1865 1794 2766 1789 1781 1762 1761 2101 1742 1741 1740 1734 1723 170...
result:
ok correct plan!
Test #106:
score: 0
Accepted
time: 9ms
memory: 50328kb
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 925 899 892 962 868 820 810 791 902 950 758 755 741 733 710 910 1061 703 833 691 690 683 666 811 653 644 642 849 628 619 602 597 594 1045 565 528 519 507 506 623 504 500 499 497 491 490 484 529 477 476 473 472 469 891 463 449 447 928 436 434 574 423 422 418 409 408 407 403 401 399 724 387 ...
result:
ok correct plan!
Test #107:
score: 0
Accepted
time: 16ms
memory: 52244kb
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 1846 1835 1829 1774 1764 1739 1694 1691 1660 1619 1581 1558 1641 1998 1531 1528 1519 1502 1500 1448 1433 1432 1430 1429 1391 1390 1640 1372 1364 1968 1362 1337 1330 1477 1321 1278 1269 1258 1255 1238 1235 1919 1275 1208 1981 1206 1201 1794 1484 1172 1776 1586 1155 1146 1933 1140 1124 111...
result:
ok correct plan!
Test #108:
score: 0
Accepted
time: 11ms
memory: 50344kb
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 831 810 802 764 758 738 736 749 735 727 724 892 654 645 639 626 606 594 577 571 725 567 549 523 513 506 475 873 463 459 849 455 446 443 437 430 429 423 425 420 474 414 560 401 398 397 390 383 893 380 369 733 358 349 347 519 345 608 337 551 333 324 322 317 412 753 313 488 311 309 476 301 297 34...
result:
ok correct plan!
Test #109:
score: 0
Accepted
time: 8ms
memory: 50496kb
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 792 785 765 696 695 676 643 640 628 622 897 613 985 596 591 571 711 570 642 552 1012 546 542 911 528 525 521 746 519 615 516 515 502 704 489 727 480 763 471 450 446 441 436 1022 430 415 412 403 400 394 627 381 372 869 369 362 360 744 359 819 357 355 368 347 ...
result:
ok correct plan!
Test #110:
score: -1
Wrong Answer
time: 15ms
memory: 50524kb
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:
wrong answer the array is not sorted
Subtask #9:
score: 0
Wrong Answer
Test #116:
score: 1
Accepted
time: 10ms
memory: 50468kb
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: 15ms
memory: 50532kb
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: 50424kb
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: 50356kb
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: 11ms
memory: 50384kb
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: 7ms
memory: 50560kb
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 2512 2417 2383 2317 2316 2309 2241 2232 2187 2182 2177 2163 2155 2148 2145 2112 2109 2108 2104 2063 2052 2008 2001 1946 2164 1941 1939 1919 1894 1891 1878 1869 2095 1857 1851 1845 1831 1811 2479 1808 1800 1787 1836 1774 1767 1763 2295 1751 2646 1734 198...
result:
ok correct plan!
Test #122:
score: 0
Accepted
time: 11ms
memory: 50476kb
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 2053 1990 1970 1934 1923 1845 1823 1819 1808 1806 1799 1786 1758 1728 1681 1660 1648 1645 1638 2333 1608 1854 1605 2327 1597 1729 1879 1556 1554 1541 1523 1521 1513 1504 1503 1498 1467 1463 1706 2046 1445 1437 1524 1433 1414 1408 1386 2093 1375 1368 1359 2033 2251 1329 1328 132...
result:
ok correct plan!
Test #123:
score: 0
Accepted
time: 13ms
memory: 50336kb
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 1227 1125 1111 1097 993 984 983 976 974 956 940 897 896 877 872 869 1127 862 849 1036 839 831 802 801 800 779 778 773 1176 751 733 717 715 1084 710 706 685 676 672 671 670 662 780 658 653 650 646 642 623 1254 619 585 1081 579 577 1128 575 749 569 1219 554 552 551 546 1150 975 538 533 532 523 1...
result:
ok correct plan!
Test #124:
score: 0
Accepted
time: 8ms
memory: 50436kb
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 710 694 634 618 600 595 582 572 752 778 549 546 539 538 536 527 522 519 518 631 509 916 508 504 805 499 494 490 747 486 743 482 478 468 467 465 463 454 452 450 439 438 432 427 419 416 412 405 662 402 395 564 464 381 379 796 366 937 365 363 359 908 356 489 336 333 332 330 32...
result:
ok correct plan!
Test #125:
score: 0
Accepted
time: 9ms
memory: 50516kb
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 1741 1719 1717 1660 1643 1601 1587 1577 1561 1560 1547 1544 1538 1533 1522 1497 1489 1454 1619 1438 1419 1408 1407 1401 1390 1402 1383 1372 1777 1346 1512 1339 1766 1337 1318 1450 1258 1243 1241 1324 1231 2077 2007 1481 1188 1180 1369 1166 1164 1153 1151 1145 1433 1139 1134 113...
result:
ok correct plan!
Test #126:
score: -1
Wrong Answer
time: 8ms
memory: 50584kb
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:
wrong answer the array is not sorted
Subtask #10:
score: 0
Wrong Answer
Test #132:
score: 1
Accepted
time: 8ms
memory: 50588kb
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: 51196kb
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: 4ms
memory: 50508kb
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: 8ms
memory: 50508kb
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: 7ms
memory: 50368kb
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: 10ms
memory: 52164kb
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: 7ms
memory: 50464kb
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 2675 2646 2629 2622 2574 2554 2551 2545 2483 2420 2897 2344 2343 2567 2321 2455 2295 2275 2265 2242 2226 2225 2189 2165 2125 2113 2062 2059 2051 2047 2218 2042 2280 2037 2031 2010 1997 1996 1993 1973 1972 1950 1939 1927 2910 1921 1913 1911 1908 1905 2057 1893 1889 2257 1873 186...
result:
ok correct plan!
Test #139:
score: 0
Accepted
time: 4ms
memory: 50404kb
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 1137 1134 1130 1121 1108 1100 1501 1098 1076 1060 1057 1033 1016 1002 1086 1000 985 972 970 955 954 953 947 944 918 917 915 906 1095 895 888 874 872 1027 862 860 1206 847 840 837 830 826 822 820 819 808 804 803 791 786 775 763 759 1332 751 748 746 ...
result:
ok correct plan!
Test #140:
score: 0
Accepted
time: 4ms
memory: 50760kb
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 1289 1570 1282 1261 1263 1179 1177 1175 1171 1124 1117 1112 1103 1096 1077 1230 1053 1046 1025 1007 1323 982 1018 978 966 1283 950 1181 940 930 927 921 919 915 1506 892 1266 890 888 876 1259 873 871 833 828 814 806 805 800 1329 862 1190 787 785 1178 783 778 777 776 745 136...
result:
ok correct plan!
Test #141:
score: 0
Accepted
time: 14ms
memory: 50412kb
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 1588 1522 1487 1452 1362 1358 1348 1315 1309 1542 1250 1239 1234 1212 1195 1189 1181 1154 1128 1776 1116 1307 1098 1085 1070 1049 1048 1174 1036 1027 1001 1000 995 989 983 980 973 967 957 955 942 932 930 926 1469 924 915 909 905 900 897 882 1553 1458 876 870 860 858 854 849 838 833 1427 ...
result:
ok correct plan!
Test #142:
score: 0
Accepted
time: 15ms
memory: 50368kb
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 430 421 407 505 392 386 384 377 361 329 328 308 307 304 553 301 478 287 286 285 374 267 263 560 261 260 259 325 254 251 250 414 247 396 426 241 237 589 424 217 295 512 212 272 210 209 208 271 194 191 186 383 184 545 179 462 170 166 165 434 161 360 156 155 149 147 146 141 336 14...
result:
ok correct plan!
Test #143:
score: -1
Wrong Answer
time: 3ms
memory: 50488kb
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:
wrong answer the array is not sorted