QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#85257#5238. Fotografia [C]anhduc27010 11ms34324kbC++231.8kb2023-03-07 14:25:262023-03-07 14:27:36

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-07 14:27:36]
  • 评测
  • 测评结果:0
  • 用时:11ms
  • 内存:34324kb
  • [2023-03-07 14:25:26]
  • 提交

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];
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;
    }
    int cycle=0;
    int d=0;
    for(int i=1;i<=n;i++){
    	if(ok[a[i]]==0){
    		int x=a[i];
    		cycle++;
    		while(ok[x]==0){
    			ok[x]=1;
    			q[cycle].pb(x);
    			x=a[x];
    		}
    		d=max(d,len(q[cycle]));
    	}
    }
    cout<<d-1<<"\n";
    for(int i=1;i<d;i++){
    	deque<int>de;
    	for(int j=1;j<=cycle;j++){
    		if(len(q[j])>i){

    			de.push_front(q[j][0]);
    			de.push_back(q[j][i]);
    		}
    	}
    	cout<<de.size()<<"\n";
    	for(auto v:de){
    		cout<<v<<" ";
    	}
    	cout<<'\n';
    }
    return 0;
}


详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 1
Accepted
time: 2ms
memory: 30040kb

input:

5
138
352
915
1375
2848

output:

0

result:

ok correct plan!

Test #2:

score: 0
Accepted
time: 4ms
memory: 30032kb

input:

5
2182
1715
524
2331
2791

output:

1
2
3 1 

result:

ok correct plan!

Test #3:

score: 0
Accepted
time: 3ms
memory: 30096kb

input:

4
77
774
1089
2658

output:

0

result:

ok correct plan!

Test #4:

score: 0
Accepted
time: 4ms
memory: 32172kb

input:

3
517
1232
2233

output:

0

result:

ok correct plan!

Test #5:

score: 0
Accepted
time: 4ms
memory: 32096kb

input:

2
2174
2569

output:

0

result:

ok correct plan!

Test #6:

score: 0
Accepted
time: 3ms
memory: 30092kb

input:

2
1790
2393

output:

0

result:

ok correct plan!

Test #7:

score: -1
Wrong Answer
time: 8ms
memory: 30080kb

input:

5
1111
1996
228
2700
1740

output:

4
2
2 4 
2
2 5 
2
2 3 
2
2 1 

result:

wrong answer you used 4 operation(s) but jury used only 2

Subtask #2:

score: 0
Wrong Answer

Test #18:

score: 1
Accepted
time: 6ms
memory: 30048kb

input:

10
321
457
797
885
892
1367
2480
2742
2767
2955

output:

0

result:

ok correct plan!

Test #19:

score: 0
Accepted
time: 4ms
memory: 32092kb

input:

10
1237
39
2762
2728
2645
2669
1833
1836
1572
1560

output:

1
10
8 7 9 10 2 1 3 4 5 6 

result:

ok correct plan!

Test #20:

score: 0
Accepted
time: 7ms
memory: 30088kb

input:

5
1274
1245
959
1921
2047

output:

1
2
3 1 

result:

ok correct plan!

Test #21:

score: 0
Accepted
time: 6ms
memory: 30200kb

input:

8
706
742
2453
1051
1813
1996
924
2834

output:

1
2
7 3 

result:

ok correct plan!

Test #22:

score: 0
Accepted
time: 6ms
memory: 32216kb

input:

7
1829
1214
637
1509
263
2824
2661

output:

1
6
7 3 5 1 2 6 

result:

ok correct plan!

Test #23:

score: 0
Accepted
time: 4ms
memory: 30072kb

input:

4
2812
1607
216
2984

output:

1
2
3 1 

result:

ok correct plan!

Test #24:

score: -1
Wrong Answer
time: 2ms
memory: 30132kb

input:

10
667
1242
121
2290
382
197
616
2857
2685
1637

output:

3
6
8 6 5 3 2 10 
4
8 5 1 7 
2
8 4 

result:

wrong answer you used 3 operation(s) but jury used only 2

Subtask #3:

score: 0
Wrong Answer

Test #35:

score: 1
Accepted
time: 3ms
memory: 30124kb

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
18 16 15 11 12 10 20 2 3 4 6 7 13 14 

result:

ok correct plan!

Test #36:

score: 0
Accepted
time: 3ms
memory: 32184kb

input:

17
2814
163
182
457
2403
1817
981
1639
922
779
1216
1497
1545
875
679
459
143

output:

1
10
14 10 15 16 17 1 5 6 7 8 

result:

ok correct plan!

Test #37:

score: 0
Accepted
time: 1ms
memory: 32084kb

input:

16
18
1723
2335
1290
1674
1341
523
1094
2529
2185
572
273
1642
287
1398
2584

output:

1
14
13 15 8 11 7 14 12 2 3 4 5 6 9 10 

result:

ok correct plan!

Test #38:

score: 0
Accepted
time: 7ms
memory: 30088kb

input:

7
872
1040
468
220
370
2490
2599

output:

1
4
5 4 1 2 

result:

ok correct plan!

Test #39:

score: 0
Accepted
time: 7ms
memory: 32216kb

input:

12
2576
1207
2984
1769
1888
2139
2002
2314
2281
2382
157
1729

output:

1
8
9 7 12 11 1 3 6 8 

result:

ok correct plan!

Test #40:

score: -1
Wrong Answer
time: 1ms
memory: 32180kb

input:

20
452
2228
1112
264
812
56
2827
2442
1285
1432
2007
1874
2837
2684
1918
2812
61
1585
2839
2167

output:

4
10
19 15 18 14 4 3 16 9 11 20 
10
19 15 18 14 4 6 17 7 12 13 
6
15 14 4 1 2 10 
2
15 8 

result:

wrong answer you used 4 operation(s) but jury used only 2

Subtask #4:

score: 0
Wrong Answer

Test #51:

score: 1
Accepted
time: 4ms
memory: 30120kb

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
100 81 95 76 90 89 71 79 51 85 50 82 73 83 92 68 57 46 84 43 60 61 67 93 19 64 48 56 98 29 13 74 33 66 42 99 1 3 5 6 7 8 9 11 14 15 16 17 20 21 23 26 27 30 31 32 34 35 36 37 39 41 47 49 52 53 54 62 75 78 80 97 

result:

ok correct plan!

Test #52:

score: 0
Accepted
time: 3ms
memory: 30004kb

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
55 46 49 47 37 42 25 33 20 53 48 29 44 43 24 34 18 1 4 5 6 7 8 9 10 13 16 22 23 26 27 28 38 52 

result:

ok correct plan!

Test #53:

score: 0
Accepted
time: 7ms
memory: 30080kb

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
61 51 39 46 48 42 54 41 56 60 45 34 58 44 33 40 32 10 13 31 57 2 3 6 7 8 9 11 12 16 18 21 22 25 27 30 35 36 37 38 43 47 

result:

ok correct plan!

Test #54:

score: 0
Accepted
time: 0ms
memory: 30076kb

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
59 64 61 53 54 48 45 36 47 57 34 28 55 16 33 26 41 10 51 52 32 1 2 5 6 7 8 11 12 17 18 21 25 27 31 37 38 40 43 49 50 58 

result:

ok correct plan!

Test #55:

score: 0
Accepted
time: 7ms
memory: 32176kb

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
41 40 30 25 26 29 35 36 43 23 45 11 15 18 38 4 2 3 5 6 7 9 12 13 14 16 17 19 21 27 31 34 

result:

ok correct plan!

Test #56:

score: -1
Wrong Answer
time: 4ms
memory: 32188kb

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:

4
56
80 96 61 100 94 67 59 50 70 54 85 87 33 41 20 43 98 78 31 71 79 89 83 91 48 4 38 76 1 25 93 8 11 90 9 53 13 73 28 62 18 69 26 22 74 57 63 77 49 75 65 52 92 56 97 95 
44
80 96 100 67 59 50 70 54 85 87 41 20 98 78 31 71 79 83 91 48 4 38 2 99 37 6 81 51 46 32 44 17 58 21 47 82 72 30 35 45 68 55 86...

result:

wrong answer you used 4 operation(s) but jury used only 2

Subtask #5:

score: 0
Wrong Answer

Test #67:

score: 1
Accepted
time: 5ms
memory: 32164kb

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
1000 956 987 979 914 989 898 933 906 874 970 951 946 865 962 892 929 932 805 834 942 849 824 901 924 943 841 733 774 721 715 926 953 867 697 704 695 958 823 983 734 912 861 725 945 916 876 668 749 871 726 975 870 693 775 761 889 893 809 769 931 928 615 743 656 825 829 882 862 852 955 739 746 8...

result:

ok correct plan!

Test #68:

score: 0
Accepted
time: 4ms
memory: 32240kb

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
375 379 371 361 378 358 300 366 306 311 365 377 292 277 287 259 288 340 368 230 325 264 286 370 272 321 346 293 241 209 334 345 258 221 281 212 318 322 242 266 342 285 252 210 231 352 193 303 246 339 152 343 172 276 278 338 323 132 133 239 302 248 219 174 301 307 332 255 138 137 317 198 280 10...

result:

ok correct plan!

Test #69:

score: 0
Accepted
time: 4ms
memory: 30160kb

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
566 607 565 590 544 532 559 578 583 609 570 456 531 519 458 473 420 575 434 457 594 534 527 569 558 622 488 378 480 453 500 589 422 448 401 563 538 462 584 585 522 403 459 491 509 352 472 351 451 518 460 444 335 633 433 623 381 612 546 425 577 560 467 309 441 418 387 619 574 501 374 464 611 52...

result:

ok correct plan!

Test #70:

score: 0
Accepted
time: 1ms
memory: 32180kb

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
46 52 42 43 49 26 41 40 53 31 14 50 32 12 17 3 5 7 9 11 13 16 19 20 21 25 28 29 37 39 

result:

ok correct plan!

Test #71:

score: 0
Accepted
time: 4ms
memory: 32196kb

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
805 818 766 762 741 782 836 747 715 786 783 723 688 722 726 674 793 731 655 665 742 719 825 708 703 831 650 740 625 615 669 634 734 697 683 565 589 562 707 791 829 751 787 666 648 759 647 602 657 590 689 788 838 579 771 624 649 494 817 611 796 676 490 670 640 516 790 754 460 667 718 820 709 73...

result:

ok correct plan!

Test #72:

score: -1
Wrong Answer
time: 4ms
memory: 30052kb

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:

686
4
187 121 51 698 
4
187 121 335 487 
4
187 121 513 588 
4
187 121 23 348 
4
187 121 950 814 
4
187 121 403 754 
4
187 121 61 830 
4
187 121 570 766 
4
187 121 74 731 
4
187 121 789 798 
4
187 121 989 208 
4
187 121 670 104 
4
187 121 889 460 
4
187 121 648 680 
4
187 121 246 273 
4
187 121 719 5...

result:

wrong answer you used 686 operation(s) but jury used only 2

Subtask #6:

score: 0
Wrong Answer

Test #78:

score: 1
Accepted
time: 7ms
memory: 30220kb

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
2935 2936 2906 2981 2945 2921 2954 2812 2950 2913 2851 2753 2884 2928 2991 2760 2803 2691 2912 2909 2786 2784 2845 2963 2735 2725 2754 2622 2894 2864 2941 2946 2652 2990 2966 2943 2911 2745 2715 2716 2476 2748 2569 2932 2403 2772 2356 2543 2835 2729 2854 2392 2804 2431 2487 2289 2994 2404 297...

result:

ok correct plan!

Test #79:

score: 0
Accepted
time: 4ms
memory: 32252kb

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
2939 2890 2930 2937 2773 2936 2957 2975 2994 2699 2727 2734 2970 2736 2763 2893 2786 2700 2619 2761 2867 2737 2725 2887 2646 2532 2918 2562 2756 2572 2901 2960 2971 2869 2950 2818 2917 2925 2776 2872 2450 2801 2981 2726 2549 2630 2677 2765 2764 2703 2325 2938 2497 2912 2781 2883 2346 2414 258...

result:

ok correct plan!

Test #80:

score: 0
Accepted
time: 2ms
memory: 30200kb

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
2051 1944 2042 1969 2003 1934 1998 1915 1829 2027 1965 1848 1789 1758 1756 1992 1927 2030 1931 1900 1838 1725 1680 1676 1918 1704 1972 1920 1976 1958 1816 2043 1731 1852 1937 1872 1662 1761 2015 2007 1942 1650 1843 1723 1949 2021 1948 1616 1811 1535 2026 1654 1695 1911 1593 1698 1999 1854 174...

result:

ok correct plan!

Test #81:

score: 0
Accepted
time: 4ms
memory: 32232kb

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
1673 1704 1648 1582 1641 1564 1609 1523 1584 1645 1603 1469 1632 1594 1631 1598 1621 1562 1421 1687 1557 1674 1420 1470 1662 1384 1480 1452 1678 1705 1477 1439 1515 1360 1326 1497 1402 1414 1413 1579 1499 1252 1314 1429 1691 1474 1430 1676 1400 1663 1550 1438 1233 1486 1591 1296 1654 1273 158...

result:

ok correct plan!

Test #82:

score: 0
Accepted
time: 4ms
memory: 32120kb

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
661 660 669 652 633 585 564 547 566 549 541 655 510 556 622 644 475 636 470 492 604 488 640 497 629 645 573 583 628 528 654 453 501 584 543 476 582 491 498 419 447 575 657 377 615 671 606 486 489 666 664 523 409 559 390 373 480 625 485 545 333 546 635 539 468 467 433 522 340 376 616 332 375 39...

result:

ok correct plan!

Test #83:

score: -1
Wrong Answer
time: 9ms
memory: 32192kb

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:

4
1602
2873 2908 2554 2921 2483 2689 2571 2514 2843 2700 2638 2455 2453 2849 2508 2414 2431 2210 2334 2331 2881 2773 2886 2742 2997 1984 2903 2150 1964 2623 2547 2027 2156 2377 2091 2047 2069 2896 1905 2166 2826 2252 2261 2094 2835 2473 2985 2737 2756 2675 1782 2345 2702 2272 1896 1985 2005 1779 250...

result:

wrong answer you used 4 operation(s) but jury used only 2

Subtask #7:

score: 0
Wrong Answer

Test #94:

score: 0
Wrong Answer
time: 4ms
memory: 32192kb

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:

4
1618
2940 2913 2982 2872 2937 2960 2692 2775 2612 2874 2501 2873 2747 2920 2603 2455 2689 2855 2736 2350 2342 2724 2854 2655 2595 2681 2288 2726 2984 2796 2262 2416 2443 2615 2295 2625 2556 2819 2669 2343 2338 2654 2208 2201 2505 2561 2609 2355 2719 2175 2272 2865 2706 2384 2994 2286 2646 2058 186...

result:

wrong answer you used 4 operation(s) but jury used only 2

Subtask #8:

score: 0
Wrong Answer

Test #105:

score: 0
Wrong Answer
time: 5ms
memory: 30192kb

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:

4
1582
2970 2695 2887 2617 2674 2570 2662 2983 2287 2384 2871 2828 2752 2679 2242 2517 2598 2973 2880 2219 2893 2610 2175 2799 2533 2146 2329 2996 2546 2239 2380 2738 1975 2054 2929 2898 2336 2201 2550 2051 2891 2490 2763 2210 2304 2685 1928 2721 2943 2101 2311 2911 2717 2186 1827 1808 2830 2183 216...

result:

wrong answer you used 4 operation(s) but jury used only 2

Subtask #9:

score: 0
Wrong Answer

Test #116:

score: 1
Accepted
time: 2ms
memory: 30176kb

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
2979 2941 2874 2804 2856 2811 2829 2953 2896 2826 2932 2824 2661 2752 2744 2622 2671 2943 2590 2858 2961 2962 2697 2947 2583 2951 2517 2742 2532 2588 2475 2609 2698 2469 2898 2593 2557 2973 2880 2659 2598 2679 2616 2610 2612 2715 2553 2966 2621 2795 2687 2788 2909 2634 2975 2765 2699 2563 245...

result:

ok correct plan!

Test #117:

score: 0
Accepted
time: 8ms
memory: 30212kb

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
2339 2329 2337 2269 2183 2279 2235 2330 2306 2160 2231 2162 2083 2343 2257 2354 2059 2202 2108 2174 2121 2101 2067 2299 2125 2278 2197 2133 2090 2325 2044 2155 2106 1995 2185 2242 2297 2247 2031 2119 2129 2172 2211 2218 2072 1960 2352 2252 1993 2291 1997 1907 2302 2002 1923 2178 1913 1839 204...

result:

ok correct plan!

Test #118:

score: 0
Accepted
time: 4ms
memory: 30236kb

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
1049 1009 1037 1048 1013 912 933 1021 959 1017 930 938 1016 946 901 968 970 948 858 1000 1030 1012 909 813 972 810 842 1051 788 952 934 859 867 797 786 757 1024 1007 1022 853 954 998 756 963 787 831 917 729 766 1032 889 777 965 829 944 1052 1002 1036 648 920 967 916 940 877 997 982 632 1055 82...

result:

ok correct plan!

Test #119:

score: 0
Accepted
time: 6ms
memory: 30132kb

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
1332 1320 1350 1274 1305 1287 1259 1265 1223 1251 1212 1236 1232 1227 1352 1344 1193 1266 1282 1359 1342 1218 1336 1115 1175 1340 1100 1098 1173 1014 1131 1161 1125 1318 1224 1071 1089 1302 961 1327 1069 970 991 1316 1198 1068 1079 1024 1119 1289 1132 1257 1370 1206 944 918 1262 995 1181 1319 ...

result:

ok correct plan!

Test #120:

score: 0
Accepted
time: 4ms
memory: 30068kb

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
854 861 840 905 870 791 853 862 770 807 858 754 898 843 828 771 910 871 776 707 672 691 900 755 779 834 819 824 856 849 731 716 738 735 645 706 653 844 800 845 682 719 764 725 751 752 857 576 793 797 880 629 866 648 533 728 889 606 570 595 723 695 781 737 773 762 744 820 873 830 865 626 904 75...

result:

ok correct plan!

Test #121:

score: -1
Wrong Answer
time: 5ms
memory: 34324kb

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:

4
1602
2920 2986 2869 2923 2808 2907 2972 2905 2827 2882 2896 2708 2360 2954 2562 2813 2853 2322 2704 2482 2323 2529 2806 2191 2406 2289 2947 2484 2863 2733 2361 2059 2164 2933 2523 1988 2902 2227 2802 2209 2095 1901 2407 2274 2224 2118 2695 2255 2916 2967 2682 1848 2295 2005 2646 2492 1983 2866 186...

result:

wrong answer you used 4 operation(s) but jury used only 2

Subtask #10:

score: 0
Wrong Answer

Test #132:

score: 1
Accepted
time: 5ms
memory: 32200kb

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: 1ms
memory: 30188kb

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
2946 2984 2901 2952 2874 2834 2832 2914 2782 2851 2923 2799 2906 2761 2716 2745 2657 2764 2848 2945 2737 2626 2625 2788 2623 2983 2759 2926 2948 2653 2924 2584 2684 2919 2694 2577 2672 2870 2469 2668 2720 2545 2904 2693 2624 2820 2620 2831 2731 2603 2810 2511 2748 2907 2674 2790 2454 2939 238...

result:

ok correct plan!

Test #134:

score: 0
Accepted
time: 3ms
memory: 30176kb

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
1109 1066 1037 1046 1041 1034 1112 1011 981 979 1048 951 1031 1052 994 950 1000 992 1113 1067 1092 1044 931 953 1016 1098 1029 886 1076 1003 990 1054 893 847 854 1088 889 1022 773 985 764 775 1018 940 989 782 883 870 797 910 1089 816 1117 1096 763 835 903 1042 1039 1009 691 957 755 1101 1025 8...

result:

ok correct plan!

Test #135:

score: 0
Accepted
time: 2ms
memory: 30116kb

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
1012 968 990 979 1010 920 1016 944 913 1027 959 910 918 937 870 931 841 848 1020 902 966 981 822 857 792 974 805 909 900 946 807 749 866 826 1003 845 802 732 761 816 760 983 868 917 908 799 772 751 824 1035 1026 833 695 982 940 1018 987 1005 720 652 825 1015 671 742 676 786 681 682 698 648 972...

result:

ok correct plan!

Test #136:

score: 0
Accepted
time: 4ms
memory: 30072kb

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
674 670 671 614 609 660 663 638 640 581 669 533 514 564 553 600 518 499 593 519 565 604 635 631 541 665 536 571 636 485 647 500 662 599 602 612 455 520 589 543 632 419 539 608 426 493 505 456 651 644 422 554 418 406 411 570 540 370 407 386 538 469 375 619 510 596 376 509 470 366 454 329 303 57...

result:

ok correct plan!

Test #137:

score: 0
Accepted
time: 0ms
memory: 30148kb

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
23 25 21 22 16 26 24 15 9 1 3 4 7 12 14 17 19 20 

result:

ok correct plan!

Test #138:

score: -1
Wrong Answer
time: 11ms
memory: 32280kb

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:

4
1612
2944 2845 2992 2743 2712 2882 2924 2923 2876 2915 2978 2828 2640 2897 2880 2426 2567 2370 2889 2575 2534 2362 2408 2380 2448 2820 2497 2706 3000 2310 2601 2067 2218 2137 2826 2916 2021 2155 2339 2444 2311 2954 2502 2205 2953 2519 2394 2995 2274 2620 2057 1994 2966 2257 2303 2917 2888 2069 286...

result:

wrong answer you used 4 operation(s) but jury used only 2