QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#403895#7217. Welcome to ICPCCamp 2016!GuanYunchangAC ✓1016ms36040kbC++23728b2024-05-02 20:11:212024-05-02 20:11:21

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 969ms
memory: 35168kb

input:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
1957
...

result:

ok 

Test #2:

score: 0
Accepted
time: 1008ms
memory: 35972kb

input:

594
1354
212
1769
1821
1476
290
663
856
1604
1886
995
1449
999
1485
1744
1765
422
672
1496
168
1457
400
1555
1881
1875
385
881
1321
1907
1729
1277
1074
78
1703
634
1913
1440
182
487
1773
474
1977
1085
1384
1674
1958
1709
1099
1112
1661
68
1731
1093
264
360
40
1163
635
345
762
1761
562
627
1956
1558
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #3:

score: 0
Accepted
time: 963ms
memory: 35892kb

input:

834
1952
1849
1372
1568
1856
810
1969
1534
895
1258
195
1239
1864
1047
870
379
873
577
1680
747
1554
779
1947
1722
1907
1320
960
1837
1346
1662
1660
1147
403
1350
1742
1198
1341
1737
983
1056
507
388
344
1406
1800
1636
1303
8
1025
138
1817
1390
871
72
201
692
666
1186
1359
1742
1054
974
1434
900
57
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #4:

score: 0
Accepted
time: 991ms
memory: 35952kb

input:

690
791
1854
1359
1059
477
1202
1643
323
1946
630
291
900
969
992
2013
880
940
354
1097
77
19
1157
194
1434
1940
238
398
1105
785
1083
1659
1861
983
356
66
227
1371
892
582
1842
284
1710
1363
52
294
194
1025
1189
1067
759
1679
921
1033
1768
1930
1215
1928
1738
1125
450
1979
1641
609
1604
1084
1712
5...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #5:

score: 0
Accepted
time: 987ms
memory: 35936kb

input:

802
1389
1731
1474
294
345
953
934
873
1365
1889
1635
945
1833
170
371
1893
1647
259
1281
1295
115
1536
586
763
1972
1301
349
2005
224
1016
154
1678
1307
1762
1302
1400
504
302
181
869
830
121
622
203
420
2016
619
98
980
1124
1669
835
1323
1576
267
1227
1431
1905
380
1557
759
37
1415
803
94
1324
126...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #6:

score: 0
Accepted
time: 979ms
memory: 35876kb

input:

658
227
1352
1461
41
853
1601
352
1679
656
1261
1219
734
938
2003
1514
378
1714
1796
697
625
212
667
338
603
244
219
171
1274
1679
1205
282
1880
1887
1409
1898
685
406
1729
421
1655
607
547
1897
865
801
1949
469
1023
1021
1361
1275
622
1485
1512
364
1878
933
441
1394
265
1812
832
1966
1763
609
809
3...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #7:

score: 0
Accepted
time: 983ms
memory: 35944kb

input:

898
697
1484
1319
1291
1234
1480
26
468
1707
1273
419
907
1802
1437
640
1392
149
1701
370
1460
821
1045
729
60
276
1154
1882
1918
1374
626
537
66
195
799
862
1857
435
1012
20
1065
384
1102
389
1016
415
1755
191
700
935
1726
1265
536
1775
1320
78
385
180
992
1160
1245
464
1244
885
962
1764
1925
1134
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #8:

score: 0
Accepted
time: 976ms
memory: 35876kb

input:

754
1807
977
1434
1038
1102
1744
1332
1018
1127
645
514
696
395
998
1783
5
217
1606
170
790
918
1296
737
1916
308
1960
1832
674
1326
559
536
651
775
1822
1459
886
336
423
3
1596
929
280
1664
1166
797
1689
1801
1625
464
1835
1127
67
1938
1000
1935
909
1698
1032
414
1968
1517
1912
1436
162
1030
1282
2...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #9:

score: 0
Accepted
time: 973ms
memory: 35952kb

input:

610
646
1110
1421
529
1739
1880
750
1824
418
17
1858
485
1772
432
909
506
668
1383
1859
2008
759
171
1000
1757
852
367
1655
1958
765
492
663
853
1100
1468
679
299
238
1850
115
878
707
707
923
1828
923
1495
1651
790
889
311
861
1742
212
808
1648
1560
1201
1839
1428
1188
169
307
227
610
41
766
489
118...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #10:

score: 0
Accepted
time: 988ms
memory: 35948kb

input:

722
1244
731
1536
1780
103
127
296
614
1469
1276
1442
147
236
2009
36
1519
735
1289
1531
827
856
549
1392
1469
500
1302
1349
586
204
41
1174
798
1808
858
1019
1344
267
1004
1858
1665
1252
1261
1942
1979
1304
1556
1373
1715
547
1188
723
1784
2006
360
1489
68
703
1751
1194
1912
1222
719
1418
1825
556
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #11:

score: 0
Accepted
time: 969ms
memory: 35896kb

input:

251
563
684
178
213
1855
1088
1460
1249
1857
1597
933
70
1593
1729
806
1640
1335
298
1481
1328
1790
508
1457
522
1316
1208
1942
1282
464
1894
1342
582
219
523
1476
1222
911
307
1109
1335
266
360
622
939
1531
535
2015
921
1508
178
330
1307
534
1513
1219
1834
1079
335
1713
1860
318
1498
75
710
821
163...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #12:

score: 0
Accepted
time: 972ms
memory: 36000kb

input:

107
1674
304
421
1464
475
1607
750
1671
1276
841
261
115
185
1546
1948
637
1274
75
1153
659
2015
758
1849
235
1860
255
4
294
1919
1315
1341
783
799
1674
185
251
812
1861
1348
105
299
786
1641
1601
1657
341
1737
86
1421
543
576
838
1208
1321
1444
470
581
374
967
1080
1115
1910
626
1926
1848
1407
1098...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #13:

score: 0
Accepted
time: 976ms
memory: 36004kb

input:

219
512
181
536
1466
856
1487
424
461
311
213
356
1920
1562
724
1075
1138
1853
1996
569
1493
96
1393
96
1835
1893
1189
1459
1194
1614
1120
1852
1113
1251
1064
1037
1424
842
1272
1204
1531
589
1853
388
1495
23
275
1587
1011
1590
1164
437
1008
986
745
1286
993
212
926
477
1803
152
306
1433
614
858
764...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #14:

score: 0
Accepted
time: 984ms
memory: 35940kb

input:

203
1110
1818
138
701
980
1751
1858
1267
1619
1856
1572
1581
154
541
201
1767
32
1901
754
695
705
268
1992
1164
1669
108
1409
462
1182
1309
1724
1314
1831
454
1633
709
231
427
931
46
366
519
1663
1646
149
81
1181
432
1376
1657
1803
539
1660
553
999
1517
1474
1093
1747
767
820
973
96
1573
125
120
454...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #15:

score: 0
Accepted
time: 989ms
memory: 35892kb

input:

315
1580
1823
125
1952
1233
1886
1148
1816
1038
1100
1156
1370
1403
1735
1472
765
611
1679
170
25
802
646
240
1004
69
915
975
1363
1133
730
219
1516
139
1733
597
1882
133
1854
1042
1344
911
945
667
292
531
15
903
1613
1545
1765
33
1958
1438
233
840
152
977
1645
1001
1491
1873
1513
647
901
640
1365
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #16:

score: 0
Accepted
time: 983ms
memory: 35928kb

input:

171
418
1444
240
1699
1613
134
822
606
73
472
484
1159
2012
1552
86
1266
1062
1328
1858
1372
642
1025
631
717
101
1849
926
375
572
663
218
86
720
1123
1193
655
162
1393
642
115
688
1500
1942
442
912
1836
753
522
1330
114
1911
240
1985
41
681
676
479
180
384
710
1037
164
1966
100
1666
721
1825
596
68...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #17:

score: 0
Accepted
time: 965ms
memory: 36004kb

input:

27
1016
1577
227
933
1737
526
112
1412
1380
1732
68
1332
1372
986
973
263
1001
1233
1787
190
1251
1404
895
557
133
768
748
1147
267
596
857
287
1044
513
413
1828
1824
1059
369
1157
722
422
1201
1105
526
1770
347
1703
1500
607
1389
1659
1891
1609
394
1199
1998
220
1654
1434
1578
576
629
1060
677
334
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
1957
...

result:

ok 

Test #18:

score: 0
Accepted
time: 995ms
memory: 36008kb

input:

267
367
1581
1846
424
102
533
1546
202
799
1104
1924
1121
1981
675
100
764
1580
1010
1331
1408
1348
534
1286
398
1925
1830
187
543
1722
17
600
105
1624
160
753
857
1853
470
736
55
1011
1105
204
1255
1036
72
1573
1124
1285
716
1507
1445
1925
1289
747
1338
1244
900
908
398
870
988
1436
1764
1320
1834
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #19:

score: 0
Accepted
time: 979ms
memory: 36012kb

input:

123
965
1202
1832
171
738
925
1092
751
1850
987
1379
911
1342
493
1242
1393
1520
915
748
738
1445
913
1038
110
453
749
393
1059
1161
206
1112
818
1948
1182
1989
141
1755
1897
464
842
1044
1659
1479
1278
1162
134
1167
289
1454
1593
1497
1360
327
1609
461
1862
747
1451
674
1121
1283
1655
1987
963
330
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #20:

score: 0
Accepted
time: 977ms
memory: 35972kb

input:

235
1435
1335
187
1294
607
805
510
1557
1141
231
707
828
1950
1686
369
1895
83
692
932
1573
166
1164
1302
1711
485
1683
216
1959
600
1643
1239
1020
512
829
1081
1314
1656
1052
575
1884
821
582
227
1940
1544
1827
1017
1214
1368
1702
847
891
361
1289
558
369
249
1491
1688
341
576
179
906
1923
1357
291...

output:

2018
2017
2016
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
1957
...

result:

ok 

Test #21:

score: 0
Accepted
time: 968ms
memory: 36020kb

input:

448
16
437
1350
561
883
2013
607
710
1768
554
1887
579
1823
1997
523
1046
802
193
130
982
1910
522
285
326
1113
1495
784
17
1155
928
1545
1741
1319
682
622
314
49
1248
929
1890
1735
1657
1981
344
73
1335
1143
1147
1810
707
991
786
1974
1940
1246
1806
1764
1095
824
1037
260
1349
425
1011
24
1441
1321...

output:

2018
2017
2016
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #22:

score: 0
Accepted
time: 972ms
memory: 36012kb

input:

305
614
314
953
1812
1264
1765
25
1388
1059
1942
1215
368
544
1047
1665
1931
1254
98
314
1816
2007
900
1925
166
1657
413
735
789
850
349
40
1943
1899
200
1730
1359
1966
1171
528
404
1768
580
472
1007
1959
1781
865
312
1339
1200
469
700
1881
1748
1087
442
1011
1902
78
256
1312
2016
1104
210
538
926
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #23:

score: 0
Accepted
time: 967ms
memory: 35996kb

input:

545
1341
1950
1196
1047
1900
396
1587
178
95
1186
799
541
1664
992
792
416
1577
1891
1746
1147
600
1279
172
1895
1689
1476
813
1945
290
282
167
2016
207
1095
182
516
1996
581
639
1703
41
1390
1747
1157
324
1586
715
1237
1253
1309
587
231
155
1172
929
453
513
438
1860
724
93
412
1655
1170
1693
1786
5...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #24:

score: 0
Accepted
time: 973ms
memory: 35900kb

input:

401
435
1955
1311
1050
1769
148
1005
983
1402
1070
638
330
513
42
1678
1429
12
1796
1931
477
697
154
564
1735
1338
394
252
702
241
1976
678
714
788
741
1290
1817
1641
1752
367
473
74
1817
878
1307
450
1648
309
658
1294
1674
577
1905
317
1492
1154
976
16
477
858
1960
1018
824
958
1873
704
1399
1427
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #25:

score: 0
Accepted
time: 983ms
memory: 36032kb

input:

513
1289
72
1297
284
133
540
295
1533
821
570
94
120
1634
2003
805
1675
79
1189
1475
1695
794
788
827
1576
1370
1329
202
98
1696
1909
422
659
1240
131
2014
974
1543
1291
1982
1516
364
739
1897
1970
832
1326
31
1839
1208
1911
1943
1948
607
1300
995
1628
1534
901
112
667
310
1619
1637
817
1218
883
192...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #26:

score: 0
Accepted
time: 977ms
memory: 36016kb

input:

369
1887
1709
900
1919
769
1059
1985
323
1872
1957
1438
1797
482
1309
1435
672
530
710
891
513
1147
1167
1219
1416
1914
375
25
614
1391
1714
933
733
1820
1026
850
3
1572
702
461
414
397
1550
1157
104
958
1388
1897
748
1249
260
173
1351
641
980
964
135
781
1196
1894
1903
723
15
428
17
485
2000
782
15...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #27:

score: 0
Accepted
time: 976ms
memory: 35940kb

input:

353
469
1714
1015
1154
638
939
1275
1129
1163
1329
1022
1586
1603
999
562
1045
981
615
1076
1860
1244
1546
971
873
1946
798
1735
10
830
1135
1060
1447
128
800
1574
1304
1473
1872
61
1712
174
1976
416
1886
956
1065
1491
1929
1162
880
34
1649
547
532
805
915
283
1748
892
355
15
682
978
1232
1511
1356
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #28:

score: 0
Accepted
time: 1001ms
memory: 35944kb

input:

465
1196
1334
1002
389
1274
1203
693
1678
582
573
350
1375
452
816
1704
42
1048
520
492
1190
1468
292
1234
713
1722
1733
1558
782
397
1068
1571
1520
708
191
410
460
991
1283
1804
227
463
387
1435
533
1081
1127
1213
1350
1332
1373
1528
1052
1094
212
647
1566
1802
283
147
1590
556
1094
1913
1680
522
8...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #29:

score: 0
Accepted
time: 982ms
memory: 35996kb

input:

321
1794
1467
1117
391
1655
1338
367
468
1633
1961
318
1804
1572
2010
831
1056
1499
297
165
1896
1565
671
1626
554
250
779
1508
1555
1853
1257
1314
1722
1032
1853
1134
1505
636
822
1915
1525
496
1453
182
683
1463
933
807
515
1117
1738
1646
838
1000
20
360
73
1304
579
1929
298
1736
1506
448
879
1037
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #30:

score: 0
Accepted
time: 992ms
memory: 36020kb

input:

433
1144
832
1103
1642
1395
1730
1161
1274
924
1205
1661
1593
293
1827
1717
1301
1566
202
93
1227
1918
1306
1889
266
282
1714
946
695
1292
678
1442
1667
1613
731
227
406
538
1993
1643
296
274
120
1458
1345
1845
867
657
1440
1286
1847
1636
753
1546
1716
201
85
551
1002
927
1533
261
285
1895
79
175
13...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #31:

score: 0
Accepted
time: 983ms
memory: 35924kb

input:

134
1357
446
122
782
1800
410
1259
427
47
24
569
1217
166
1370
1999
324
782
1719
1562
1020
1903
664
361
898
910
1525
11
256
87
1595
244
629
659
712
279
1678
1458
557
1868
45
1443
1707
1196
1766
374
886
399
1244
1217
853
1268
392
631
863
1401
1266
178
734
63
1973
457
1455
1159
1055
858
448
150
174
14...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #32:

score: 0
Accepted
time: 978ms
memory: 35948kb

input:

2006
195
579
109
16
420
674
677
1105
1355
1412
153
1006
774
1316
1126
825
721
1497
1363
1726
1999
1042
752
738
942
443
89
1668
1542
1400
243
1342
984
103
875
963
848
1984
1980
1344
1220
117
1959
1916
756
820
2009
409
1514
962
1130
179
1049
671
1243
157
1696
1158
1333
1193
1254
1867
1966
254
1373
194...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #33:

score: 0
Accepted
time: 986ms
memory: 36000kb

input:

230
793
71
224
1267
801
554
223
1910
646
656
1497
795
135
365
252
1838
1556
1402
1035
1056
592
1421
1016
323
1486
1378
1544
169
1493
1333
882
1160
1564
1253
1855
120
877
1267
1707
1874
1765
544
962
563
370
626
1859
1334
1171
1454
1376
93
1084
223
1212
681
1199
1197
971
1916
290
519
628
1470
383
1561...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #34:

score: 0
Accepted
time: 975ms
memory: 35888kb

input:

86
1392
204
1715
1014
669
1073
1657
444
1825
27
1081
456
744
311
1395
708
1496
1179
452
387
689
1800
896
35
1390
425
1366
1453
932
1010
881
1361
1888
772
435
1421
779
677
1562
1285
1543
1866
221
713
752
687
1581
755
1469
1819
726
1640
1502
1919
1053
1204
445
2005
1985
1008
1471
1058
1435
1917
1410
4...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #35:

score: 0
Accepted
time: 977ms
memory: 35952kb

input:

198
742
1841
70
505
1305
1465
947
1250
1116
1415
1048
757
104
1504
522
1209
1947
1084
636
965
530
674
1159
1892
1167
1359
1573
337
371
943
624
59
452
162
1672
1954
808
88
1802
55
1832
277
1496
1247
1134
365
1175
1936
1126
424
716
1298
1536
1727
894
1856
1964
540
1239
1476
2012
1470
98
1117
549
146
1...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #36:

score: 0
Accepted
time: 978ms
memory: 35864kb

input:

182
1212
1974
56
1755
1558
1217
621
39
407
659
376
546
969
1322
1152
1966
2014
989
308
295
1267
925
1423
1732
1711
22
1011
1621
66
876
1264
133
776
1824
2012
1110
454
1259
1401
1097
1865
831
500
1398
1259
939
1025
845
1551
917
834
1341
1442
1407
607
1867
1466
580
1005
695
1304
121
905
317
1063
1518
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #37:

score: 0
Accepted
time: 980ms
memory: 35948kb

input:

294
50
1467
171
1502
1682
1864
1927
589
1458
287
1976
207
1961
755
23
451
449
510
237
1514
1364
1560
1814
1573
1743
1084
834
249
1521
297
1263
334
1356
703
1232
395
355
670
1128
1884
1642
1258
1775
1548
1769
617
747
10
1081
1026
312
744
1988
959
960
374
968
1003
3
1419
1717
533
1456
1276
74
363
1001...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #38:

score: 0
Accepted
time: 972ms
memory: 35884kb

input:

150
648
1344
158
737
47
1616
1345
1395
877
43
1304
252
810
317
1165
1464
1028
415
1925
332
1461
1938
62
1285
1775
3
784
1022
961
487
1774
152
1809
349
1828
1568
385
208
1240
654
172
436
1034
194
1383
678
341
1447
1506
1391
174
530
1766
1151
674
1026
215
1299
1273
639
1009
1200
887
1980
1101
103
1495...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #39:

score: 0
Accepted
time: 982ms
memory: 36036kb

input:

6
1247
1476
1777
484
427
2008
1019
185
168
1430
888
42
1419
262
292
1838
967
192
1342
1678
53
813
1958
1126
47
937
479
290
400
420
1645
865
373
1884
792
597
286
1379
1223
1825
1965
991
1541
345
1765
356
1951
612
1035
1628
420
445
169
959
515
1549
1733
1850
1039
1362
1934
1740
1438
1179
1871
1476
229...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #40:

score: 0
Accepted
time: 975ms
memory: 36032kb

input:

246
85
969
1892
1991
551
2015
309
734
1220
802
600
1719
779
1328
1434
835
1802
97
1526
1008
1910
1191
205
198
79
2000
301
934
95
1729
140
1067
697
762
1388
10
187
790
822
595
1742
1417
801
495
1891
418
1929
1537
1461
1992
1786
232
203
767
356
57
1236
386
38
326
714
136
229
123
882
1088
1107
701
504
...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #41:

score: 0
Accepted
time: 979ms
memory: 35944kb

input:

1835
810
711
1294
874
956
1080
407
143
1847
997
1523
1982
140
1639
1588
2002
250
1614
595
162
1895
38
693
1341
707
1427
1382
1008
650
630
702
1788
1632
615
1441
770
596
1370
1304
473
895
989
410
1427
676
437
40
1470
1135
998
1930
1887
1944
1418
1300
1494
735
2006
1189
1022
911
1306
1636
1227
1436
22...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #42:

score: 0
Accepted
time: 977ms
memory: 35972kb

input:

1819
1664
204
897
365
1208
1088
1841
821
1138
369
1107
1771
1261
817
715
103
957
1519
780
1508
488
928
1084
1054
739
218
820
1908
89
563
574
1990
68
389
533
55
497
653
1031
1643
672
1415
1174
1450
1058
115
1650
635
921
1107
1408
1801
1722
1098
1142
1505
1997
797
443
241
1451
1973
427
554
447
1211
11...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #43:

score: 0
Accepted
time: 980ms
memory: 36008kb

input:

1931
246
337
884
1616
1077
1479
1387
1371
429
253
435
1432
1998
634
1857
1116
896
1296
196
838
584
1563
1348
894
1283
1152
643
1176
40
752
1085
559
648
1796
1001
1100
271
64
887
414
1218
594
433
1856
1183
177
1628
1560
1090
1984
1526
1588
252
1162
1367
140
1500
837
210
965
744
497
1106
1514
962
568
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #44:

score: 0
Accepted
time: 980ms
memory: 35900kb

input:

1787
973
1973
999
1362
1713
1231
805
161
1608
1513
19
1221
1102
1828
728
1618
1475
1201
1885
1545
553
1942
1612
735
1187
71
849
1820
1495
173
1084
761
972
674
93
257
172
1491
1126
1456
995
1148
1452
2006
1053
1999
1222
981
1003
205
1516
990
158
842
1208
664
1002
1260
1224
1945
1156
1165
1913
202
228...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #45:

score: 0
Accepted
time: 979ms
memory: 35964kb

input:

1899
1571
90
986
597
78
1878
95
966
899
885
1363
1011
1967
1645
1870
615
1415
978
1813
875
650
688
2003
1951
964
1133
160
576
1318
106
1723
962
1553
321
817
1557
202
645
725
226
1540
1574
711
653
1179
1932
816
146
1045
569
865
1033
193
650
921
1187
505
1300
478
652
449
1576
960
1417
1255
1169
219
53...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #46:

score: 0
Accepted
time: 961ms
memory: 35892kb

input:

1883
665
95
1101
1848
202
126
1785
1516
190
128
1330
672
1071
1079
485
1116
1994
883
1485
205
1259
1067
1755
1792
996
52
110
1860
757
1927
1466
780
1877
1855
1669
714
1607
184
965
1525
1317
241
1987
803
1689
1738
794
1071
958
934
1111
692
611
330
762
1839
1767
92
244
1888
990
484
1895
361
1770
781
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #47:

score: 0
Accepted
time: 969ms
memory: 35928kb

input:

1995
1519
1476
831
1851
582
6
1203
306
1369
1516
658
1229
1936
640
1627
1745
1933
532
1158
1039
1356
1445
130
1376
1540
987
317
745
197
1348
1978
1494
441
1501
377
1759
1509
1611
564
167
1095
1307
990
954
1815
1672
388
236
999
1171
973
734
645
1898
604
346
1270
643
1258
596
154
1151
430
1576
908
138...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #48:

score: 0
Accepted
time: 978ms
memory: 36036kb

input:

1851
101
1609
946
1085
963
525
493
1112
661
1144
242
1018
1041
586
754
743
496
309
1086
242
1453
64
138
1217
1572
33
1643
1773
1652
1537
89
1567
1277
380
1485
1172
1538
766
547
1466
1640
1734
249
1616
180
1478
1486
1673
913
1536
451
137
1063
1706
317
486
900
555
512
1575
1207
1691
1237
264
1935
1638...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #49:

score: 0
Accepted
time: 963ms
memory: 36040kb

input:

1707
827
1230
933
832
1599
405
167
1661
1968
388
1586
679
1905
1651
1897
1244
1203
214
631
1588
1806
955
530
929
1348
968
1593
657
1091
958
600
1769
1857
1786
1825
1705
1184
176
659
236
1417
144
1012
1766
50
1411
1208
838
954
141
569
1939
1097
1386
158
1265
147
1362
278
283
2003
342
1916
1224
946
73...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #50:

score: 0
Accepted
time: 957ms
memory: 35944kb

input:

1947
1426
1234
1048
67
1468
669
1473
451
1131
1776
1170
468
1010
1597
767
241
1270
2007
559
918
1903
1333
793
770
1892
1902
1544
1941
786
891
343
466
293
1433
1045
1118
1213
1731
386
1278
1450
1467
15
1917
176
1729
1058
1763
867
634
559
1854
1387
1194
511
1788
1665
1914
1548
1519
1168
754
707
423
14...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #51:

score: 0
Accepted
time: 980ms
memory: 36016kb

input:

1649
391
336
1955
710
1744
1365
1570
1364
1630
339
77
92
243
1140
1305
768
486
1253
1772
1832
1887
180
1281
1401
760
1713
1984
1247
1341
1681
1033
1188
1228
902
1098
246
1494
295
612
1284
475
526
1769
705
977
1493
1184
1567
798
1527
191
1493
601
341
1456
953
1164
1518
556
198
596
1924
98
1527
127
13...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #52:

score: 0
Accepted
time: 993ms
memory: 35952kb

input:

1505
989
469
54
457
109
1757
988
1786
921
1599
45
1897
1619
1085
176
1781
425
902
1957
1162
608
1070
1672
1242
536
632
175
643
1292
1614
1544
1389
1552
292
1694
1675
1395
1466
723
55
509
1465
517
855
1103
1170
778
732
967
1764
53
1280
891
21
1297
1477
667
1557
1570
1434
1905
448
905
471
1281
730
108...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #53:

score: 0
Accepted
time: 987ms
memory: 35976kb

input:

1617
1587
602
40
1964
233
1893
534
1088
212
1227
1389
182
212
135
1318
523
876
807
1629
1996
705
1321
1424
698
440
1694
125
1415
731
1291
1288
1463
117
1698
658
191
1425
877
450
1097
798
1891
1792
1518
1485
1232
756
153
753
113
1547
1194
1053
1589
1010
112
169
93
1336
1902
429
1115
1968
1686
1796
18...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #54:

score: 0
Accepted
time: 976ms
memory: 35968kb

input:

1473
425
223
155
1711
614
140
1456
1893
1391
470
973
1859
1589
80
445
1024
943
584
1046
1326
545
1699
1687
539
984
613
1452
299
426
1224
1927
1920
569
1473
1254
1364
1326
288
50
1883
575
430
795
1668
1355
1038
350
1078
922
222
1665
981
831
1269
851
380
1432
900
590
1121
1610
1527
887
374
807
1331
44...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #55:

score: 0
Accepted
time: 981ms
memory: 35928kb

input:

1713
1024
227
1774
945
1250
532
746
427
682
1858
301
1648
181
1402
1587
1909
1394
489
1230
529
1154
318
63
379
1016
1548
1402
1327
1882
1157
1926
106
1149
351
474
649
1355
1587
289
782
608
1624
54
1818
1609
1484
1960
243
707
715
1655
383
1377
1077
1076
903
934
812
1604
1845
134
179
1438
1333
1833
94...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #56:

score: 0
Accepted
time: 984ms
memory: 35972kb

input:

1569
1750
1608
1761
52
1118
539
420
1233
1989
1742
1900
1693
1558
1091
202
394
1461
266
518
1875
1251
1209
327
92
793
594
1609
84
1321
578
421
180
1473
2014
814
1822
1001
997
144
1824
898
35
1329
465
1990
1289
1938
1168
877
824
1517
426
1284
885
917
1554
437
1363
1371
1064
1443
590
229
533
844
1804
...

output:

2018
2017
2016
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #57:

score: 0
Accepted
time: 986ms
memory: 36004kb

input:

1681
844
1741
1876
1815
1499
931
1854
23
1409
986
1612
1354
151
909
1344
1408
1913
1931
191
693
1348
1587
718
1948
1337
1529
919
1496
760
511
292
381
37
1404
1922
851
902
920
1888
595
931
589
205
615
100
1223
1532
333
662
1701
1123
85
1830
821
759
62
1955
1659
625
1404
352
1130
907
1749
1615
1288
10...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #58:

score: 0
Accepted
time: 977ms
memory: 35888kb

input:

1537
1442
1362
102
1306
2007
683
1144
572
444
358
1196
1143
1399
87
215
1909
732
1836
119
23
1701
1966
470
1789
1369
1695
870
2012
199
700
804
967
361
282
630
264
932
75
1999
1893
1220
1272
1480
1021
482
1029
1126
1770
831
177
1113
127
1736
629
472
585
1202
194
1639
624
1148
1797
1458
180
625
901
18...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #59:

score: 0
Accepted
time: 970ms
memory: 35948kb

input:

1521
280
1367
1721
541
1876
1330
818
1378
1751
1617
524
933
2008
1920
1357
650
671
1613
1807
1242
1926
329
861
1629
1401
742
948
1408
22
121
803
912
942
57
1483
1309
833
1630
1726
407
1253
194
227
1172
96
963
848
935
745
286
974
1546
266
309
313
1237
704
746
1405
1347
441
193
377
1396
1780
257
671
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #60:

score: 0
Accepted
time: 986ms
memory: 35948kb

input:

1633
879
1499
1708
287
496
1082
108
168
1170
1245
108
1106
1368
1098
484
1023
1250
1518
1480
60
7
1475
1125
1086
1689
1677
387
164
1989
1942
930
1114
1266
1463
191
338
351
1040
1326
1834
1031
749
1246
1322
478
769
698
1860
786
651
708
1332
172
117
26
1248
207
657
659
55
853
861
1440
723
279
1502
116...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #61:

score: 0
Accepted
time: 982ms
memory: 35948kb

input:

1846
1348
601
1239
931
645
19
206
825
165
1825
1031
857
729
1409
638
174
1842
1275
1189
1613
2007
193
1612
1717
557
1616
1467
366
400
843
1748
1835
313
1444
243
1354
1143
853
47
1456
1944
192
728
111
1279
788
313
1793
716
1417
853
843
1785
768
1611
669
1849
389
1811
1007
1050
1775
960
1571
961
380
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #62:

score: 0
Accepted
time: 1003ms
memory: 35948kb

input:

1702
442
734
714
678
1281
154
1640
1503
1216
1068
359
518
1850
458
1780
1188
405
796
606
304
600
572
1876
1557
333
662
1290
882
1983
776
1747
533
893
323
1351
510
1173
263
1791
226
1977
746
1748
261
1405
722
35
958
630
1782
203
886
1820
960
1324
1193
1096
1069
809
226
1590
554
1895
771
1988
2009
427...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #63:

score: 0
Accepted
time: 978ms
memory: 36036kb

input:

1814
1296
355
829
1928
1022
546
1186
292
635
440
327
307
699
404
907
1561
344
701
662
1650
441
1463
252
1398
237
1597
728
1654
1422
453
370
606
1217
1985
59
1811
818
314
1390
1524
250
1429
1007
923
1786
527
1901
379
671
258
192
673
1726
768
1165
1844
598
1620
575
950
883
966
429
1986
998
1365
1049
1...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #64:

score: 0
Accepted
time: 983ms
memory: 35940kb

input:

1670
1766
104
815
1931
1658
810
604
1354
1942
68
1671
96
1691
1469
33
302
923
606
335
980
538
1841
515
1110
781
387
935
1051
1118
387
114
808
1797
1376
912
968
208
1485
1885
167
283
351
266
1074
24
461
1495
1304
584
367
310
587
256
320
1006
351
101
1660
1845
170
1807
1634
1236
418
1641
594
1799
129
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #65:

score: 0
Accepted
time: 975ms
memory: 35880kb

input:

1910
348
1740
930
1166
22
945
22
144
977
1328
1255
526
540
1415
920
803
862
383
263
310
1147
204
907
951
813
1322
757
1567
557
192
113
1009
105
1022
1508
253
237
896
1485
1465
61
906
1285
1224
1910
267
1217
469
626
1244
1804
374
34
2016
719
875
1619
195
843
637
588
29
1915
1633
652
1966
661
757
46
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #66:

score: 0
Accepted
time: 986ms
memory: 36020kb

input:

1766
1203
1873
917
401
1907
1209
1584
949
397
699
839
315
1661
1232
1551
1816
1441
288
1951
1017
1243
1095
658
535
589
240
196
963
2012
1629
752
1339
685
28
472
1426
139
306
1212
236
606
1588
544
1886
20
329
1067
1394
539
1481
1666
1792
708
1824
561
1014
866
1003
609
1873
1896
825
450
577
1678
1322
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #67:

score: 0
Accepted
time: 979ms
memory: 36004kb

input:

1878
1801
2006
520
147
527
1088
1002
1499
1704
1959
38
104
509
410
677
686
1636
1825
1368
347
1468
1729
1050
248
622
1303
146
1735
1451
1818
751
1541
1138
1435
1068
455
40
1605
1323
1278
383
2015
1820
21
402
7
661
559
709
1846
1912
1835
486
1504
274
1538
368
914
1879
581
293
1236
1897
1793
177
551
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #68:

score: 0
Accepted
time: 981ms
memory: 35972kb

input:

1862
1151
1499
635
1398
908
1608
292
289
739
1331
134
1781
1630
355
1820
1187
200
1730
1552
1693
1821
92
1314
88
1166
222
224
1003
1146
1751
1006
1742
1718
1081
288
1244
1829
1016
1051
176
672
1065
311
171
783
68
383
1996
494
1955
1262
1494
905
1056
627
45
1887
1466
878
1304
1601
1648
432
480
1204
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #69:

score: 0
Accepted
time: 980ms
memory: 35860kb

input:

1718
1621
1632
621
889
1032
1488
1982
1095
30
1215
1478
1570
478
1421
946
184
651
1636
968
511
1918
343
1705
1945
1198
1156
1679
1647
1097
1172
1134
312
26
1975
628
401
1731
427
1418
1475
706
1492
1586
705
909
258
1993
1161
663
432
1252
1024
939
864
468
696
1133
1761
644
268
126
299
1239
1440
470
15...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #70:

score: 0
Accepted
time: 978ms
memory: 36036kb

input:

1830
203
1253
992
636
1412
1751
1272
1900
1465
459
1062
1359
1599
1366
73
429
718
1413
641
1858
2015
1233
1457
1785
846
203
1501
916
537
1105
1645
513
606
1622
1864
1445
1760
1598
1145
2005
483
158
845
856
779
320
1843
70
449
796
1370
939
845
544
181
1220
636
297
1914
992
1307
711
1918
639
1497
1020...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #71:

score: 0
Accepted
time: 981ms
memory: 35876kb

input:

1531
801
866
1643
1279
1689
432
1370
542
1964
782
1986
1495
832
910
355
1468
1822
1170
222
1523
495
79
440
401
354
1902
566
605
1091
1894
1951
1235
1413
1347
1277
957
25
162
1115
1883
1652
1746
1959
1788
1324
1843
81
1890
123
1562
1002
834
442
1707
1254
641
135
1917
922
183
735
2009
1437
1871
1540
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #72:

score: 0
Accepted
time: 968ms
memory: 35944kb

input:

1387
1271
487
1758
1026
53
824
788
1219
999
154
1313
1284
193
727
1241
466
1889
819
1911
341
336
458
704
113
386
308
260
1121
531
67
62
1436
1993
993
497
1618
54
1717
1226
526
1429
284
1218
1938
1706
1777
1691
1055
548
1927
992
237
476
1515
967
652
1653
452
1936
1419
27
405
356
815
550
1015
1400
162...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #73:

score: 0
Accepted
time: 979ms
memory: 35924kb

input:

1499
109
236
2001
261
178
1343
334
9
418
1414
769
1073
801
1921
368
967
324
596
1839
1560
433
1605
327
1714
34
1371
211
390
226
1504
573
1510
301
1888
1605
903
1972
871
1210
1824
1718
1222
222
585
72
79
1541
476
206
532
342
279
895
1195
808
1304
1156
876
1702
127
1336
1072
907
14
1577
628
1894
236
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #74:

score: 0
Accepted
time: 1000ms
memory: 35972kb

input:

1483
1219
369
100
1511
558
1223
1768
559
1725
1297
609
990
162
1738
1510
1980
391
501
1512
890
1042
1983
591
1554
66
290
33
1290
1681
1437
572
1967
881
1662
57
60
1873
282
809
594
1752
1649
1497
479
326
13
1263
1401
503
1025
588
1954
929
747
1033
1827
402
1172
956
1106
1749
1484
1458
718
331
112
756...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #75:

score: 0
Accepted
time: 976ms
memory: 35936kb

input:

1595
57
2006
1590
1514
939
1615
1186
1364
761
541
193
779
770
1172
637
337
842
278
1184
1724
1139
346
983
1267
610
1352
1488
558
1120
1370
956
153
1206
1053
1165
1105
1647
1709
1048
1637
1529
443
756
630
708
1834
857
566
160
1389
450
1484
1347
939
874
335
1921
1723
1970
1830
1041
136
889
1678
1358
1...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #76:

score: 0
Accepted
time: 981ms
memory: 35892kb

input:

1452
656
122
1705
749
1063
1622
732
666
180
169
1537
568
1635
733
1267
1095
909
1687
1112
1054
1364
725
1246
1107
642
271
1566
1202
687
791
955
227
1786
1947
1889
390
1548
992
648
407
58
870
1775
1292
321
1896
707
1491
458
1498
1944
1655
1381
747
716
1242
1423
1763
1736
538
1582
675
1440
877
369
585...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #77:

score: 0
Accepted
time: 970ms
memory: 36000kb

input:

1564
1126
1631
1692
496
1443
2014
1654
1216
1487
1557
1121
741
996
679
394
1596
1616
1592
785
129
1716
1615
1638
436
418
1205
1005
470
126
980
1466
940
94
1593
725
1563
1578
402
375
1833
1851
1808
1035
1314
703
1574
429
656
115
1991
45
1186
1671
555
429
1765
670
554
990
1773
746
1343
231
77
1523
70
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #78:

score: 0
Accepted
time: 994ms
memory: 36000kb

input:

1548
1980
1764
1807
1747
64
1765
944
6
522
801
320
531
1604
1744
1280
593
1683
1113
201
835
1813
1866
1390
148
963
252
955
1370
1837
402
1593
1142
674
1112
1449
591
967
1829
742
348
381
603
1798
1465
829
1636
1527
77
412
84
35
1228
1833
1995
526
1777
172
978
2004
225
1799
1754
910
1036
22
1698
1611
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #79:

score: 0
Accepted
time: 980ms
memory: 36040kb

input:

1404
562
1385
1282
981
1820
397
618
811
1957
172
416
320
837
1690
407
1094
118
1018
385
165
1910
485
1781
2005
995
1187
778
1887
1789
207
1848
959
1126
758
285
4
869
984
470
1646
158
1029
801
111
1211
1313
1121
1258
70
961
1913
887
1612
1803
239
412
1691
1017
1770
1460
579
150
1717
1740
1049
542
217...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #80:

score: 0
Accepted
time: 992ms
memory: 35948kb

input:

1516
1672
1518
1396
984
185
661
1924
1361
1248
1432
1760
1997
1446
739
1550
1979
698
923
1690
1511
2007
863
29
1589
899
1865
472
1155
1228
140
1848
1673
1707
1653
1009
1049
898
523
69
417
1951
1968
60
261
1721
1375
1099
167
495
1198
1647
417
270
1483
80
936
1193
1569
1025
40
1504
817
251
940
59
27
9...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #81:

score: 0
Accepted
time: 979ms
memory: 36000kb

input:

1217
125
1131
927
1628
589
1357
5
258
1747
252
924
1748
1319
1050
1703
875
1289
552
1655
665
487
221
516
716
1655
1932
1553
844
1783
1057
266
122
369
1634
934
49
1691
1103
807
167
1232
1027
1302
1194
122
1395
1225
100
426
75
1535
1944
1371
630
1281
101
1332
1173
160
1376
1316
100
1915
1787
230
1177
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #82:

score: 0
Accepted
time: 978ms
memory: 35972kb

input:

1073
980
496
914
1374
714
1749
1439
936
1166
1639
252
1409
167
228
830
1376
1868
201
1072
2011
328
600
780
45
55
851
1375
113
1222
1246
777
580
950
1024
1658
1222
952
514
534
1465
1009
1966
561
1344
2008
1072
819
1281
1971
568
1141
227
1661
438
1122
880
66
1980
1430
339
481
511
450
987
1385
790
101
...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #83:

score: 0
Accepted
time: 967ms
memory: 35944kb

input:

1313
1578
501
517
609
1094
1501
1113
1486
201
883
1851
1966
1288
173
1973
245
1808
106
1256
1341
425
979
1171
1773
1847
1785
1326
757
917
667
776
653
1402
670
750
507
854
1685
133
1995
1555
760
1581
1494
245
1134
669
702
380
677
1131
1646
1567
118
963
1403
1585
4
941
935
1021
923
1897
187
395
1650
8...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #84:

score: 0
Accepted
time: 987ms
memory: 35972kb

input:

1169
160
122
504
1860
1475
132
403
275
1509
255
1051
1755
136
1239
1099
746
371
1899
672
160
1162
1869
1435
1614
1879
832
1020
25
356
600
1415
855
1982
1565
1730
1552
755
1223
373
1278
1332
1187
840
141
627
812
391
1627
1926
1042
993
1688
97
1686
932
1543
1087
555
195
1659
186
1590
432
1146
1422
139...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #85:

score: 0
Accepted
time: 980ms
memory: 36000kb

input:

1281
1398
255
875
1607
1471
12
1837
1081
800
1643
1147
1417
1129
1184
1986
1759
310
1804
345
1378
1259
488
1315
1454
407
1510
842
797
1811
1909
1158
1568
290
955
310
709
784
634
1988
176
1365
109
99
163
1009
874
2001
792
335
1279
727
1347
4
1494
774
50
590
979
1465
878
727
114
1239
1850
1937
747
719...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #86:

score: 0
Accepted
time: 982ms
memory: 35972kb

input:

1137
1996
260
861
969
1851
276
1383
1631
1979
887
475
1206
1994
1002
600
757
1145
1582
273
708
1356
739
1578
911
439
557
281
1953
1250
1842
1670
1642
870
730
1546
2010
686
1805
1971
1219
1654
920
1118
825
1135
935
1851
1717
1880
1644
589
877
550
1174
999
574
1852
1274
975
1346
19
782
1918
1177
947
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #87:

score: 0
Accepted
time: 982ms
memory: 35916kb

input:

1377
835
1896
464
204
472
411
801
421
1270
514
59
995
1098
179
1743
1002
1084
1487
1834
38
1709
1629
1970
751
215
1492
231
710
946
15
1797
1588
1194
1624
1887
654
715
1216
67
2005
1432
1346
377
976
1005
1125
1573
882
290
2009
835
1048
456
982
840
1225
1355
1826
229
566
944
1193
708
121
214
1348
331
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #88:

score: 0
Accepted
time: 984ms
memory: 36016kb

input:

1233
1433
13
451
1967
340
675
91
1738
561
270
1403
656
1963
2013
869
1887
1663
1136
1506
873
1806
2008
217
592
759
410
310
1610
897
1452
292
285
1775
1270
1107
1699
361
754
1810
775
1977
1773
1141
1126
1130
1187
1167
303
1963
741
185
579
490
406
681
1748
857
1865
1499
1289
1740
1861
1259
1336
729
70...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #89:

score: 0
Accepted
time: 981ms
memory: 35876kb

input:

1345
15
1650
566
1202
721
1066
1781
272
1740
1658
858
445
1067
1191
2012
372
1602
913
1434
75
1902
371
481
304
792
961
1764
878
336
1385
35
359
83
661
1703
1112
262
1925
1921
1818
1626
823
144
1532
1512
865
761
1484
244
1106
175
1997
780
726
394
384
104
657
497
509
777
256
690
24
1883
317
1574
862
1...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #90:

score: 0
Accepted
time: 980ms
memory: 36036kb

input:

1201
741
1399
553
949
1357
1074
1199
1078
1031
1030
698
1002
1932
1008
1138
1386
165
818
1107
1421
495
749
361
145
696
1895
1587
1394
1919
1318
163
560
663
179
667
141
292
1336
1649
716
1659
1506
1291
1683
1766
926
739
393
1918
1215
293
280
942
406
235
395
1622
1080
263
1233
1445
796
1241
984
894
13...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1964
1963
1962
1961
1960
1959
1958
1957
...

result:

ok 

Test #91:

score: 0
Accepted
time: 989ms
memory: 35908kb

input:

902
1594
628
1587
1720
1634
1515
1169
1991
26
1225
1110
370
1805
551
1420
409
1269
575
816
447
224
363
1360
776
1451
1578
651
1596
330
92
1236
1282
1726
1536
79
1157
572
1916
1874
338
684
1077
517
599
423
434
354
197
344
221
1685
1935
540
1057
1180
1832
1633
812
1287
168
1770
1966
889
71
1576
440
96...

output:

2018
2017
2016
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #92:

score: 0
Accepted
time: 982ms
memory: 35892kb

input:

758
433
633
1574
1595
1502
146
587
397
1461
597
1206
415
270
497
547
910
1336
352
489
1665
448
742
1624
617
1868
625
602
352
25
1785
980
1483
34
1183
1315
186
602
1071
1474
1636
718
1503
1792
622
421
624
1964
1378
129
586
1931
1337
446
865
1533
340
624
724
541
892
166
618
1440
1287
75
1813
1458
1204...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #93:

score: 0
Accepted
time: 982ms
memory: 35876kb

input:

998
903
766
1689
829
1883
410
261
1202
497
481
534
204
1646
1562
1433
1667
1787
1
1921
483
1057
1121
1503
201
1900
1560
168
1764
1608
1718
1619
53
614
701
1912
1359
503
610
1713
535
1007
42
1052
772
547
685
1942
799
299
822
1281
1636
992
673
1246
863
254
1275
51
112
1475
1029
230
231
1102
1425
320
3...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #94:

score: 0
Accepted
time: 981ms
memory: 35968kb

input:

854
1757
387
1804
64
503
290
1567
2008
1804
1740
117
1881
239
1508
560
152
1855
1922
1977
1829
1154
1883
1767
1930
1676
478
119
264
1047
1651
1618
254
938
1595
876
644
405
21
1568
1577
784
980
55
1434
929
363
1536
1724
84
1187
1271
1039
770
609
1087
1515
1517
67
1321
835
1887
1569
909
1446
240
398
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #95:

score: 0
Accepted
time: 947ms
memory: 35896kb

input:

966
339
520
1279
1827
371
809
985
542
1223
1112
1333
166
1616
1325
1702
1038
546
1699
1394
1160
1251
246
142
1770
1708
1541
1573
1676
486
1072
1617
200
1646
1242
1984
1817
1682
1191
1808
348
817
1663
1330
1585
1055
425
1130
889
254
1296
1388
569
1444
417
929
22
1019
106
576
1815
1180
732
1716
134
75...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #96:

score: 0
Accepted
time: 981ms
memory: 36016kb

input:

950
1449
13
1650
1062
1008
689
531
1348
258
356
1429
1971
208
503
317
1539
613
1604
1578
362
1092
625
406
1611
236
459
1652
433
182
1261
2000
786
1971
632
692
845
1584
602
1407
1646
1107
201
589
1735
1436
231
1108
1814
167
285
866
740
1223
97
642
33
522
530
1590
523
217
1144
379
1093
1782
1382
426
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #97:

score: 0
Accepted
time: 1011ms
memory: 35976kb

input:

1062
287
145
1636
553
1388
1081
1965
137
1565
1744
1013
1632
1585
320
1460
536
1064
1381
995
1196
1701
1259
158
1323
268
1394
1602
949
133
1194
2000
987
535
279
1544
258
1613
141
1134
160
1140
628
1608
381
1050
164
702
979
1712
394
728
271
1385
1921
483
685
1784
1337
1356
1758
885
1812
1698
293
792
...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #98:

score: 0
Accepted
time: 982ms
memory: 35940kb

input:

918
758
1526
1751
299
1257
1600
1255
687
984
1372
341
1422
177
1514
586
1293
1131
1030
667
527
1798
134
549
1164
44
440
1041
345
1588
487
495
1189
859
1301
252
1303
1514
1824
1246
1587
1429
1822
356
532
1432
1986
296
400
122
759
974
441
1675
1345
324
1208
1287
1377
610
466
1938
207
233
1509
1819
198...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #99:

score: 0
Accepted
time: 1000ms
memory: 36012kb

input:

1030
1356
1531
1738
1550
1893
1480
929
2005
19
615
1941
1467
1554
1331
1473
1795
1582
935
851
1873
7
513
557
1004
461
1375
863
1117
1027
420
622
1262
1439
691
1360
716
1416
1234
1229
357
1462
361
1631
1194
1942
1920
18
1581
1667
1252
836
1988
1581
1153
549
1988
789
1928
1624
1446
718
1003
1168
1956
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #100:

score: 0
Accepted
time: 974ms
memory: 35968kb

input:

1014
194
1664
1341
1297
257
1744
1851
794
1326
2003
1140
1128
19
509
599
664
1649
712
268
563
615
891
948
461
493
422
1070
513
466
353
877
1720
1763
338
1700
1761
1189
645
828
1400
1240
787
634
1344
52
1726
1884
490
76
1360
186
1390
111
961
391
623
292
1968
1390
153
1643
1414
1719
1156
1600
824
1281...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #101:

score: 0
Accepted
time: 984ms
memory: 36016kb

input:

474
795
646
1385
1800
1930
629
355
1522
402
1011
1564
366
114
1787
703
523
785
1345
1569
1873
1089
148
833
1509
1533
1179
1479
1252
908
1466
6
868
30
236
1243
1496
171
999
461
1514
1401
1341
237
161
212
791
1781
91
1014
1626
1322
305
1470
3
1372
1591
282
972
1027
634
1823
871
1601
354
1709
223
580
7...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #102:

score: 0
Accepted
time: 980ms
memory: 35944kb

input:

586
1393
139
988
1547
166
380
1277
312
1710
255
1148
283
1491
1221
1590
1024
724
994
985
1203
1185
527
1224
1221
1437
98
917
1896
347
1399
517
814
610
1770
335
525
201
538
700
797
1690
1768
1128
55
594
597
1375
1016
1183
1735
1056
347
1248
1699
1213
1730
1801
1012
281
1870
604
1282
904
1569
719
1340...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #103:

score: 0
Accepted
time: 972ms
memory: 35948kb

input:

442
232
272
975
782
547
772
823
1118
1129
1643
348
72
1971
1038
716
21
1175
771
658
1910
1026
1417
1488
294
1469
1160
868
1164
1802
820
516
1015
934
1417
931
1954
1862
1709
556
1583
1467
946
387
718
208
659
1225
181
1096
211
918
1766
1667
1507
926
238
1047
1819
1807
321
1656
62
1455
769
1746
696
195...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #104:

score: 0
Accepted
time: 956ms
memory: 35896kb

input:

298
1214
405
1089
528
671
1292
241
1668
164
886
1948
374
1332
728
1859
394
1242
676
586
1240
1635
1796
1879
134
1758
79
946
1936
1242
753
387
1601
1514
295
1911
983
1764
1120
283
610
1501
1501
1662
868
590
336
947
1618
1138
320
780
1553
1701
931
768
889
550
1731
1061
1429
821
473
374
1729
245
180
68...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #105:

score: 0
Accepted
time: 984ms
memory: 35876kb

input:

538
52
25
1460
1779
1052
1171
1547
457
1471
514
1787
35
1941
33
985
1151
1693
453
259
570
1732
415
1631
1863
1790
1014
384
1332
681
174
899
1802
1838
1957
491
395
1281
531
394
1524
1790
1927
666
1018
844
398
541
655
1051
685
1026
1467
1479
739
609
1412
1556
266
315
137
1361
1141
924
416
1527
1297
13...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #106:

score: 0
Accepted
time: 983ms
memory: 35976kb

input:

394
650
1790
1447
1270
1688
1435
1221
1135
890
398
1371
1840
1301
1739
1616
1653
1760
358
1691
1404
1829
793
7
1703
1822
60
207
1848
376
363
898
1876
403
1476
1727
1440
1183
1829
122
806
1823
850
1941
1681
1225
76
391
1836
1092
922
376
1254
137
419
834
1936
1058
1074
1713
1372
526
1553
1731
1632
538...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #107:

score: 0
Accepted
time: 974ms
memory: 35948kb

input:

506
1248
1411
1050
1017
1556
1571
639
1941
1941
1658
699
1629
1910
1044
742
650
452
8
1875
607
422
1684
270
1544
94
739
157
1245
1831
296
1537
1821
855
354
51
597
1084
1752
1737
1337
1600
1660
1200
1831
1351
650
113
745
1006
1287
366
1168
1931
228
675
571
305
1113
967
1840
1066
1964
394
575
1053
394...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #108:

score: 0
Accepted
time: 980ms
memory: 35876kb

input:

362
87
1544
1037
252
1937
1962
1945
475
1232
1030
155
1290
1270
734
1629
1535
519
1801
1548
1953
263
1934
662
1256
126
1673
1868
1
1782
1733
1280
519
1435
1
1288
1898
1114
1163
1976
619
130
70
1707
477
1221
327
1723
1926
1047
148
484
699
589
292
388
583
1823
1537
221
1060
359
744
945
1791
191
1254
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #109:

score: 0
Accepted
time: 983ms
memory: 35884kb

input:

602
557
1165
1151
1502
557
210
1619
1280
523
273
1499
1335
1879
39
756
20
970
1706
1476
1283
488
297
413
1097
30
720
1690
645
1221
1538
1791
593
2015
1407
124
927
759
318
1832
1406
1923
497
967
628
1347
389
1317
1347
960
385
1978
358
368
1988
230
1106
1326
72
1235
1783
1284
1155
248
991
1218
611
146...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #110:

score: 0
Accepted
time: 1016ms
memory: 35940kb

input:

458
1667
1170
1138
1249
426
346
909
70
1703
1661
1595
1124
1112
1745
1898
778
1037
1483
1149
101
1096
932
677
681
574
1655
1641
1929
1045
1728
1919
794
323
1053
848
1588
788
1872
55
560
196
1819
226
778
1729
195
1295
256
1130
749
1840
400
1042
1796
71
2014
828
368
1002
1003
64
1823
927
1566
229
351
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #111:

score: 0
Accepted
time: 986ms
memory: 35948kb

input:

159
120
911
157
1893
702
786
1007
1239
186
481
2006
1260
473
1544
36
1305
253
1240
730
1527
1081
290
1676
1313
1330
1210
193
1491
1471
629
209
1516
1386
266
772
1100
1069
1941
25
438
853
1263
1468
1582
514
1846
909
316
1060
1515
1472
39
127
430
1015
1051
583
1988
137
1699
260
977
447
654
399
1502
15...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #112:

score: 0
Accepted
time: 995ms
memory: 35928kb

input:

271
974
404
144
1639
1083
1306
425
29
1493
1868
1846
1049
1593
1361
1179
302
704
377
146
345
922
669
1300
1153
1234
128
272
887
1039
50
720
213
1710
1929
1496
129
1098
1095
1896
1224
1143
1817
727
1733
640
148
503
1241
846
1880
1718
1714
417
110
1368
1702
86
523
1407
662
801
1517
1381
1870
1426
858
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #113:

score: 0
Accepted
time: 985ms
memory: 35944kb

input:

127
1572
537
259
1130
1719
1697
1987
835
912
1112
1430
838
442
1051
305
1315
643
282
1835
1691
1531
1559
1564
866
1266
807
222
1403
478
1999
847
415
274
1319
588
1558
1000
1018
119
251
1176
228
1746
379
1022
210
481
406
1015
229
1580
1244
579
430
1082
209
1604
1075
918
1386
94
1928
1932
813
436
1719...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #114:

score: 0
Accepted
time: 980ms
memory: 35928kb

input:

111
155
158
246
365
1588
1449
1405
1384
1963
484
886
499
1562
356
1448
1816
1222
59
3
1022
1627
1938
1955
706
1554
1869
1677
799
1933
1804
1358
488
599
1094
1057
74
901
557
1735
1165
953
654
1005
529
763
1904
75
1843
800
466
1058
1159
357
1870
923
221
1107
1114
172
606
506
580
723
13
1079
1459
1658
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #115:

score: 0
Accepted
time: 974ms
memory: 36000kb

input:

223
1521
1923
1864
112
208
81
823
174
1254
1744
214
288
411
46
574
814
1161
1980
1436
224
1724
300
203
547
1587
788
1499
1571
1628
1481
1101
434
1179
1988
149
1247
931
1728
1462
447
1498
1977
265
680
1145
1965
1685
752
970
831
1175
946
1032
1679
636
1128
1857
1794
1442
1329
1815
991
1402
716
90
816
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #116:

score: 0
Accepted
time: 982ms
memory: 36020kb

input:

79
1991
1543
1851
1362
588
1848
369
852
673
1371
309
589
1532
1367
949
931
1996
1757
1108
1058
317
679
595
3
1619
1723
1706
72
1067
1414
1741
1019
1503
1378
873
532
576
1139
1573
978
1276
387
1284
1342
1527
1643
1663
1933
755
1451
1165
860
810
1487
477
1652
1360
1833
440
293
339
1659
449
1676
1116
1...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #117:

score: 0
Accepted
time: 989ms
memory: 35888kb

input:

191
573
1676
206
1109
329
224
1803
1401
1980
743
1653
250
252
1057
75
1944
1935
1662
1036
388
286
1698
346
1860
147
769
1144
1484
1018
1347
1740
1221
67
1025
1725
1577
606
549
1557
1764
1053
942
543
1237
1653
1705
1257
842
924
1944
515
647
1356
1167
318
159
862
369
206
1017
1520
183
1256
876
127
141...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #118:

score: 0
Accepted
time: 1005ms
memory: 35952kb

input:

176
1427
1809
321
600
965
360
1093
191
1015
2003
1237
296
1373
490
1218
429
498
1311
581
1735
383
60
610
1700
1939
1704
967
240
457
768
235
1422
391
1919
433
990
507
1848
1156
791
1598
1624
1306
1899
19
1383
851
7
838
293
761
49
1262
975
31
810
365
1177
1476
236
556
594
1935
75
898
773
370
1461
1772...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #119:

score: 0
Accepted
time: 978ms
memory: 35896kb

input:

288
10
1302
1812
1723
1346
623
767
997
435
1887
437
85
222
52
344
1443
438
1088
2013
425
992
439
1001
1413
1843
622
917
1652
153
701
106
2008
1099
1694
1541
19
1913
1259
1395
1705
1375
547
309
1921
1648
1444
573
1444
879
402
623
92
1552
399
385
1334
1627
1216
474
960
1225
1262
726
1035
1924
1889
111...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #120:

score: 0
Accepted
time: 987ms
memory: 36004kb

input:

144
864
1435
1926
1470
1470
1015
57
1547
1742
1131
21
1762
1342
2013
1487
1944
1017
993
182
1771
1089
818
1265
1253
1875
1685
483
152
1608
890
617
1954
1424
1084
505
1192
1942
670
995
987
1921
1101
1585
56
14
1250
423
353
792
895
101
1767
1714
207
98
1985
1130
1640
240
1427
261
1673
1405
1738
1063
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #121:

score: 0
Accepted
time: 982ms
memory: 35888kb

input:

1861
1589
536
1329
225
1619
1712
154
956
225
1454
944
1513
703
1557
1769
967
104
750
1395
1053
1073
176
1752
1884
999
1368
1564
226
147
1679
1179
915
342
1065
1934
192
719
1250
1220
609
306
544
683
988
816
1142
550
414
723
1532
245
1406
1312
1369
1170
766
1269
1372
1392
619
1962
828
924
698
978
508
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #122:

score: 0
Accepted
time: 1001ms
memory: 36036kb

input:

1973
427
669
1444
1988
239
1975
1588
1762
1404
826
272
1686
64
1374
895
1724
172
271
1579
255
914
554
128
1725
1031
414
1514
1126
1602
1100
1051
1117
667
1959
1154
1236
748
405
1460
1524
851
1099
1958
1138
941
1203
144
1339
764
9
1867
1448
1090
1049
883
1418
771
1795
646
1855
1254
1367
1475
1914
244...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #123:

score: 0
Accepted
time: 981ms
memory: 35964kb

input:

1829
1025
34
919
1222
492
95
1134
295
695
70
368
1475
672
808
1782
209
623
176
996
1345
1523
1189
392
1309
1063
1349
953
394
1041
1034
1562
1062
1375
1606
1750
649
1898
1959
1059
806
628
1781
961
1801
1451
1009
122
504
677
118
1857
1107
1252
858
725
1941
18
75
28
562
1795
19
394
1113
1271
1493
1753
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #124:

score: 0
Accepted
time: 975ms
memory: 35972kb

input:

53
1752
167
1034
585
616
358
552
1101
2002
1969
1712
1265
1921
369
908
1095
690
82
1180
675
1620
64
271
1022
1095
268
1031
1039
736
967
1561
1648
1699
996
714
1694
1799
1370
786
1336
405
704
220
1951
1065
943
1732
1941
847
995
1719
638
1542
666
1078
449
1536
626
1298
1542
959
430
1457
57
282
466
359...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #125:

score: 0
Accepted
time: 984ms
memory: 35952kb

input:

1925
334
172
1021
332
996
238
1474
1907
1037
1341
1168
926
514
1819
35
1596
1397
1875
725
1510
1844
314
535
862
1383
1330
982
1811
175
644
184
1849
263
1891
1310
723
1828
525
1154
619
951
1258
1496
85
1447
749
814
850
632
1488
1453
552
1704
90
791
1100
1039
1178
553
250
2012
1098
376
1272
796
78
162...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #126:

score: 0
Accepted
time: 983ms
memory: 35964kb

input:

1781
1444
1808
1135
1583
1377
758
1020
312
456
585
495
715
1890
1380
1178
593
1464
1780
141
712
437
693
798
703
1416
249
292
1207
126
577
1943
1923
587
1665
530
136
1730
1952
881
1405
728
1685
499
620
1572
1194
792
143
802
1597
1315
339
1995
410
632
1623
29
1473
1567
1485
793
1638
927
1976
1951
1451...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #127:

score: 0
Accepted
time: 971ms
memory: 35876kb

input:

5
282
1941
610
1330
1501
637
438
1118
1763
213
591
760
483
814
1808
1350
1915
1557
325
42
278
1072
1190
415
1448
671
243
1723
1710
510
1943
620
1167
1055
870
1181
1759
1490
480
560
761
863
1262
770
1954
1000
386
1068
587
1962
1305
253
141
90
345
1635
1292
1897
1333
193
1717
289
1734
920
961
423
977
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #128:

score: 0
Accepted
time: 978ms
memory: 36000kb

input:

1877
880
1434
725
564
1882
901
1744
1924
799
1473
1935
421
1860
375
935
1851
1982
1206
1758
877
375
1962
1454
1760
1736
1478
1953
991
1149
1819
566
566
1492
702
90
1842
1405
645
720
1346
1050
1418
521
920
320
934
1996
233
756
182
1423
40
431
1914
187
270
794
1936
587
533
498
701
397
119
1476
36
1727...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #129:

score: 0
Accepted
time: 983ms
memory: 35896kb

input:

1989
1350
1567
968
55
502
1549
1418
458
218
844
1391
722
452
321
1821
721
417
1111
1430
207
984
581
1333
1600
1640
397
1776
1891
844
1752
565
640
56
1596
686
1127
1306
56
319
628
828
1844
1540
1583
1950
740
1718
1670
542
547
900
1459
465
1338
28
794
297
472
1601
1768
1550
1112
1203
1335
487
1408
588...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #130:

score: 0
Accepted
time: 987ms
memory: 36036kb

input:

1845
189
1188
1083
1818
370
1428
708
1263
1525
216
719
511
1829
1386
948
1222
485
888
1358
1425
1081
960
1597
1057
1672
1331
1726
1160
283
1429
820
1353
380
987
1538
283
1336
1227
814
1159
1373
511
800
1733
444
802
1568
579
711
1424
762
1501
371
1146
1757
1317
1559
1279
1367
476
203
1780
250
1782
17...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #131:

score: 0
Accepted
time: 985ms
memory: 35876kb

input:

42
786
801
1734
445
647
621
806
160
520
668
1898
135
1062
1186
1102
373
1588
645
812
706
809
318
580
312
284
1398
791
593
838
842
1510
59
1443
968
1847
1811
1616
1935
784
1165
1902
82
26
650
861
693
1694
639
641
1678
395
1012
1984
292
1325
738
1570
883
503
1684
399
1062
1402
870
308
283
1611
777
134...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #132:

score: 0
Accepted
time: 985ms
memory: 35928kb

input:

154
1768
678
88
192
1027
373
224
1222
1699
295
1226
1940
166
1131
228
1258
151
550
612
37
1418
696
460
25
828
317
101
1877
277
263
5
260
1767
614
299
840
1646
1346
383
191
431
637
1301
800
1371
755
1416
1564
299
539
385
799
3
101
1039
877
1200
1435
1773
903
940
1474
449
70
823
1144
345
1916
1949
245...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #133:

score: 0
Accepted
time: 981ms
memory: 35952kb

input:

138
350
299
203
1443
1152
764
1914
12
990
1683
810
1601
1031
821
1371
1503
91
71
285
1255
1643
947
723
1881
860
1379
308
634
1732
196
1765
462
331
1508
1407
1373
1547
757
367
978
208
1575
560
694
1497
432
1266
729
596
775
502
841
421
1797
880
1401
703
1474
1027
1371
232
1885
1384
1029
1849
500
1222
...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #134:

score: 0
Accepted
time: 986ms
memory: 35936kb

input:

250
1204
304
190
678
1532
772
1204
818
281
927
650
1902
1640
126
497
501
926
1992
1717
73
1740
1838
987
1210
892
42
258
1278
1427
1505
1892
535
911
1027
1875
786
1449
1927
478
1764
242
2002
1579
1229
1878
494
860
150
253
1140
1996
500
199
1605
593
1924
205
138
537
591
1157
537
1935
229
860
240
1716
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #135:

score: 0
Accepted
time: 995ms
memory: 35972kb

input:

106
1803
1941
1809
680
1913
1163
622
1367
1460
299
106
1691
1000
1832
1640
1002
865
1897
1902
1420
333
456
1379
922
1180
976
1585
546
1378
1694
387
1249
1364
673
967
1831
1222
1466
205
918
531
796
710
1379
1748
300
582
1075
551
1249
1858
31
873
1029
434
560
1468
177
1807
1314
1953
948
725
1445
1631
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #136:

score: 0
Accepted
time: 979ms
memory: 35940kb

input:

1978
385
58
1796
1931
21
915
168
29
752
1559
1450
1608
1609
1137
510
1887
1444
1674
1574
750
174
835
1130
507
1212
23
1791
1446
818
1627
386
1066
1944
1568
1691
1244
1124
877
317
1705
308
1735
1986
25
1874
234
432
240
208
1742
88
1961
651
837
275
1083
458
729
1061
22
990
1744
1404
4
641
713
1328
129...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #137:

score: 0
Accepted
time: 984ms
memory: 35936kb

input:

202
1623
1566
1910
1166
401
1563
1602
835
43
930
1033
1397
969
827
1141
372
1383
1579
1502
1456
270
1214
1522
347
1245
958
1102
714
257
1049
769
1268
252
1214
528
273
641
32
44
987
213
145
477
176
240
40
26
1165
505
91
1454
1748
1325
517
500
1862
1977
1280
572
1002
1659
140
195
1220
1668
198
1822
41...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #138:

score: 0
Accepted
time: 978ms
memory: 35948kb

input:

58
205
1699
1897
913
1038
1826
892
1385
1222
814
873
1187
1450
132
267
1130
1962
588
1175
786
367
88
1529
60
1661
1892
1052
1230
1968
982
769
1981
832
732
1124
1446
542
1458
1659
1517
503
699
1752
326
366
1989
1764
330
163
712
1444
1150
1104
325
598
498
1479
1448
1842
1725
951
807
1258
419
807
1058
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #139:

score: 0
Accepted
time: 981ms
memory: 35948kb

input:

170
1059
1832
2012
148
778
1706
566
174
513
314
457
848
811
1838
1410
1631
1901
493
591
117
976
467
1921
1916
1437
939
1002
627
1407
1171
1280
39
1156
123
344
730
444
869
139
800
536
1382
1011
988
875
1795
1358
1767
588
1205
1562
1449
1138
1893
439
509
726
1999
1096
945
1492
1731
177
1379
1321
671
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #140:

score: 0
Accepted
time: 983ms
memory: 36008kb

input:

154
1658
1197
1743
150
1159
338
2000
980
1820
1702
1673
637
1419
1655
536
628
464
398
775
1463
1201
846
169
1757
1469
1873
569
1399
846
592
1407
241
1736
1273
684
1903
473
152
1754
1714
825
304
15
1139
489
353
1208
932
118
1314
1040
852
1556
69
152
1033
228
535
606
1669
656
254
728
67
332
155
39
130...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #141:

score: 0
Accepted
time: 986ms
memory: 35952kb

input:

1744
111
811
1018
794
1563
778
1970
1637
303
1769
581
900
1548
1454
1330
1667
1568
28
1861
360
929
460
656
372
337
1172
1649
832
1401
1381
1713
962
527
1254
992
903
754
732
1724
1336
1610
1892
1512
55
1163
1748
951
737
560
319
1184
491
641
720
840
198
239
139
1630
604
85
913
375
1682
1014
1306
568
1...

output:

2018
2017
2016
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #142:

score: 0
Accepted
time: 971ms
memory: 35964kb

input:

1984
709
431
1005
540
184
1298
1388
427
1738
1013
164
561
141
1144
1961
152
1635
1949
29
1707
1538
710
1048
212
625
91
1600
101
840
1314
208
1164
1107
645
1973
1948
527
143
203
619
1899
302
516
77
1672
1554
545
1662
473
684
534
405
1315
528
682
977
1758
178
884
1840
1393
1580
926
114
1529
662
1318
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #143:

score: 0
Accepted
time: 984ms
memory: 35888kb

input:

1840
1819
436
863
1791
52
1178
1062
1745
773
1153
1508
350
1518
449
832
1166
326
1598
1462
525
1635
1089
1311
1685
657
1026
1422
1001
663
1247
335
1621
1432
1539
553
977
429
1314
1818
1277
1677
1113
1791
228
1798
1488
395
827
515
793
780
192
1094
208
1035
1629
1004
986
138
548
430
1992
1733
1330
668...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #144:

score: 0
Accepted
time: 990ms
memory: 35864kb

input:

1952
657
57
850
1026
433
1441
352
278
64
396
1092
140
110
139
1974
1283
393
1375
1134
1743
1732
1468
1063
1525
689
72
861
269
103
924
591
1695
2012
1186
1661
390
458
853
1546
559
1710
1539
1050
890
164
1806
117
248
428
1286
642
1610
1640
16
1004
136
507
1537
1664
1271
1098
899
396
529
1694
1263
673
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #145:

score: 0
Accepted
time: 965ms
memory: 35900kb

input:

1808
1127
190
965
773
941
1577
1786
1084
1500
1784
1188
1817
1359
1460
1101
280
845
1280
1063
1073
69
342
1454
1366
721
1007
1067
785
54
857
590
1896
320
576
113
1435
360
263
1657
1346
1999
462
53
1041
290
1867
1727
1173
469
1395
120
1909
1546
1968
845
275
9
1449
918
235
135
1695
1203
1489
705
876
1...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #146:

score: 0
Accepted
time: 1002ms
memory: 35952kb

input:

1792
1982
323
1080
264
809
1840
1332
1762
535
1156
388
1862
1967
1150
227
1293
912
1057
735
404
166
721
1718
1078
1009
1941
378
181
1509
790
1229
594
900
350
1221
592
261
1434
1384
372
16
1016
1329
1191
159
1545
1577
338
383
255
238
1440
76
1776
686
799
1016
241
172
958
931
90
250
176
1220
1864
29
5...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #147:

score: 0
Accepted
time: 984ms
memory: 35952kb

input:

1904
564
1832
1067
1514
1446
216
750
296
1842
400
1988
147
1328
455
858
1794
1363
962
151
1238
263
1356
94
919
1041
988
328
954
1204
211
1228
667
1224
1245
1689
1380
291
845
1240
1158
1810
1699
76
1597
541
1607
1299
1391
552
748
227
1354
1998
1584
400
1322
262
280
1698
178
96
758
1185
1392
230
1220
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #148:

score: 0
Accepted
time: 980ms
memory: 35872kb

input:

1760
1162
1964
669
1261
1826
224
1544
1101
1261
1788
1315
1824
1937
145
2000
792
1430
611
336
568
999
1734
1861
759
946
1922
535
94
643
16
1483
613
1932
635
781
537
1952
896
1479
569
339
109
1095
1748
795
1285
893
556
337
857
1593
1141
16
1264
241
1974
1781
832
952
902
1149
1170
1736
335
1513
833
15...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1962
1961
1960
1959
1958
1957
...

result:

ok 

Test #149:

score: 0
Accepted
time: 981ms
memory: 35884kb

input:

1872
512
1329
656
368
1695
615
1218
1907
296
1031
1411
1613
1297
1978
871
1165
1881
388
1896
1786
1096
609
237
472
1234
841
1861
866
82
205
1611
1199
241
281
1505
1582
1854
50
1078
1099
116
1176
354
394
1177
1346
487
1993
507
1222
1711
544
435
816
1970
481
1283
1383
206
121
1945
1837
655
1551
12
169...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #150:

score: 0
Accepted
time: 987ms
memory: 35936kb

input:

1856
982
1334
771
1619
315
367
636
441
1603
659
739
1402
1906
1412
2013
1922
1948
293
1824
605
937
860
501
56
1266
1648
1812
1638
1537
1643
106
1400
821
1304
341
867
1883
1477
678
1886
405
1858
1629
544
1303
1024
465
1158
292
1459
1701
842
213
496
307
1004
530
1551
1733
589
854
361
1206
239
1166
143...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #151:

score: 0
Accepted
time: 983ms
memory: 35972kb

input:

1429
1580
1076
1678
886
592
1704
605
1354
214
1239
1663
1026
1779
1467
663
1073
1036
50
1022
142
1434
218
988
688
134
1587
876
1840
76
544
412
106
1500
1157
650
1627
148
1545
1543
132
1062
1429
727
1349
1592
1300
591
962
223
464
1333
353
1826
1659
1252
1930
668
1283
868
1797
538
1531
725
1726
1593
3...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #152:

score: 0
Accepted
time: 984ms
memory: 36000kb

input:

1669
162
569
1793
377
972
1455
23
144
1521
482
1119
1327
499
901
1294
1446
1871
1843
1206
848
1530
596
1252
528
1926
633
187
340
1787
477
539
307
192
547
990
1040
177
1084
1143
918
1352
1856
1747
1499
1718
1105
185
1887
392
573
1195
1900
1988
1467
1093
437
171
1706
123
1016
1591
1943
1404
414
859
19...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #153:

score: 0
Accepted
time: 981ms
memory: 36000kb

input:

1525
888
701
1780
124
841
87
1713
693
556
1870
446
988
1620
462
420
444
1810
1492
879
179
1627
1231
1643
369
454
1568
393
1752
1227
282
1050
509
516
322
210
69
79
239
870
1704
1385
394
1006
1649
84
1039
35
1052
177
938
1441
1814
262
1147
934
1088
1689
242
1393
1612
371
594
707
1630
1374
1425
1281
61...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #154:

score: 0
Accepted
time: 975ms
memory: 35968kb

input:

1637
1998
322
1894
1374
1477
1855
1003
1499
1992
1242
30
777
469
1912
1563
945
373
1397
295
1525
1724
1610
1907
81
486
486
216
508
1178
1975
793
1094
1096
1216
806
1498
108
162
981
731
1162
1333
265
296
465
845
1773
473
347
1815
791
1601
424
955
647
1612
1192
537
903
64
1552
1134
1258
573
385
526
14...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #155:

score: 0
Accepted
time: 986ms
memory: 35928kb

input:

1621
580
455
121
993
1857
230
421
801
1283
742
1374
822
1589
1473
689
1702
312
1174
480
855
61
484
282
1938
518
1549
1670
1536
617
1908
1433
1296
1420
863
1786
527
1257
1589
965
1517
1707
2015
1284
446
591
907
855
1398
260
36
781
1004
715
507
488
119
438
1089
157
1299
76
1545
177
1789
1539
1898
892
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #156:

score: 0
Accepted
time: 971ms
memory: 35876kb

input:

1477
1435
1964
1740
228
1982
750
1983
1222
318
626
1470
483
438
907
1832
187
892
1079
1784
1561
286
863
34
1522
806
212
1620
421
56
1841
1432
1241
2000
253
366
1699
1159
743
564
928
1485
554
32
596
973
584
705
563
301
401
899
1302
749
187
713
771
1957
1640
1427
7
1385
197
728
476
38
1383
1386
1510
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #157:

score: 0
Accepted
time: 980ms
memory: 35888kb

input:

1589
17
1841
1727
1735
346
629
1401
12
1625
1885
670
272
1559
468
191
1073
831
856
1456
892
383
1242
426
1235
838
1146
1699
1705
1895
1262
1431
1827
821
1659
1602
984
1188
282
803
1458
1262
1492
1307
1259
587
646
427
1488
215
510
377
705
655
2011
555
782
947
1552
937
1243
293
608
1663
1436
1065
483
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #158:

score: 0
Accepted
time: 986ms
memory: 35884kb

input:

1445
743
1461
1842
1482
727
893
691
818
1044
1257
254
62
407
414
1333
70
1410
761
1385
222
992
1492
689
1075
743
1697
1137
589
1334
1195
54
13
1401
922
1942
13
1090
1709
403
740
1807
1919
310
1409
1097
836
21
653
256
1002
239
747
1201
1691
396
1305
194
343
191
1710
1090
1276
198
636
75
1856
998
1260...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #159:

score: 0
Accepted
time: 989ms
memory: 35952kb

input:

1685
1341
1466
1956
716
851
1029
365
1624
79
629
1597
235
1400
1479
460
571
1349
410
1057
1056
1088
623
1081
404
1287
615
1088
1105
773
872
1813
86
1725
312
1162
1186
1119
864
514
1527
1584
713
1585
56
1222
898
1631
74
169
1367
485
534
1107
1755
109
197
1712
383
1461
930
127
1816
748
1851
1102
1596
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #160:

score: 0
Accepted
time: 983ms
memory: 35924kb

input:

1541
435
1599
1431
1967
1231
1292
1799
157
1386
1889
1693
24
248
1425
1602
1584
168
187
729
258
929
1002
1344
116
1063
1550
1166
501
213
805
309
288
417
1719
1503
471
765
274
497
553
114
1140
844
206
1604
575
1609
1255
211
1988
1851
1953
1653
1435
1966
720
1215
934
971
1654
795
467
179
283
1617
953
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #161:

score: 0
Accepted
time: 995ms
memory: 36004kb

input:

1242
904
701
962
1106
1508
1989
1897
1070
509
708
89
1791
121
1224
380
1855
1272
1961
439
52
1426
1864
1832
1259
1947
1617
1735
63
767
1594
743
1009
1352
1188
1811
1231
1301
983
467
559
515
711
70
498
390
83
1735
1060
141
482
1995
1592
739
70
1407
1901
1226
538
235
845
863
1381
1715
1899
411
87
882
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #162:

score: 0
Accepted
time: 999ms
memory: 35884kb

input:

1354
1503
834
949
341
1376
365
1187
1620
1816
80
185
1452
730
786
1011
853
1339
1866
1871
886
1523
738
79
1100
1979
280
1685
1347
463
1527
742
1723
1676
834
647
644
1075
137
706
1089
804
1650
1346
1161
3
145
1329
1985
54
1231
1473
1762
1157
1894
1248
409
728
1346
1249
1569
1532
33
378
330
1438
948
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #163:

score: 0
Accepted
time: 977ms
memory: 35884kb

input:

1210
341
454
552
344
2013
244
861
410
852
1340
1401
1241
91
219
137
1866
1790
875
1928
88
1619
1117
1719
684
251
1342
1508
1991
414
949
1253
1924
240
224
1371
1689
976
1564
562
372
837
316
349
1055
385
334
1307
1150
224
1595
1335
1293
935
1702
961
548
1991
1257
503
533
825
573
1185
1674
1952
688
238...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #164:

score: 0
Accepted
time: 980ms
memory: 35972kb

input:

1322
939
587
539
1595
377
764
151
1216
271
711
984
1799
699
1797
1024
223
1857
780
1600
1435
1972
1496
1983
525
283
261
946
1259
1869
1138
1380
1742
692
1887
463
846
1006
975
289
1286
614
871
1624
1717
511
396
901
571
9
1960
1581
1207
1609
1894
802
1327
1493
1809
269
1256
1749
1240
1736
873
963
44
9...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #165:

score: 0
Accepted
time: 979ms
memory: 35888kb

input:

1306
289
592
653
830
1014
644
1585
5
1578
1971
312
1460
60
1230
150
1236
292
685
1528
2013
181
114
358
1741
315
1195
1153
144
1308
1071
1635
439
1273
893
931
130
907
258
400
313
1160
1297
883
1868
893
74
495
1496
179
53
930
994
1387
1446
643
1851
996
344
1284
476
530
1652
654
1833
230
905
1481
112
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #166:

score: 0
Accepted
time: 992ms
memory: 35884kb

input:

1162
759
1973
896
576
754
907
1131
427
869
1599
1912
1249
541
920
1293
1737
359
462
1201
1343
278
877
622
1582
859
242
975
1172
1003
492
1635
641
1597
284
24
791
809
1684
128
1099
937
219
1390
2
1274
136
473
661
1980
546
920
397
1550
1126
357
486
498
640
538
1200
1582
47
1205
521
1256
645
343
739
52...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #167:

score: 0
Accepted
time: 966ms
memory: 35948kb

input:

1274
1358
90
1011
1827
1134
1555
549
1745
32
971
1624
1038
1917
737
1923
479
810
367
617
545
887
1256
1013
1422
507
1176
414
1944
442
297
258
714
161
1946
748
76
582
1095
1743
1885
970
1030
650
664
1016
1957
67
1586
133
655
1038
695
1840
934
198
1010
1377
1191
304
163
235
715
1756
1736
1899
2
1093
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #168:

score: 0
Accepted
time: 977ms
memory: 35856kb

input:

1130
196
1727
486
1830
1771
1306
1983
535
1339
215
1208
699
510
1931
1050
980
878
144
802
1380
984
1634
765
1135
539
95
236
828
1898
486
257
916
485
824
1600
1121
483
250
1854
912
1259
1456
1797
815
1398
1891
1677
879
1935
1532
516
98
1874
614
423
1533
879
1615
1318
887
1287
1255
1187
680
910
1118
1...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #169:

score: 0
Accepted
time: 981ms
memory: 35936kb

input:

1370
794
1731
601
1065
1639
1698
1529
1084
630
98
536
488
1374
1748
176
1865
1585
1809
218
710
825
2013
1157
975
572
1158
443
96
1337
1923
512
1246
1065
215
308
278
1
1805
1838
1826
1037
1883
800
837
1524
1697
1399
300
88
1769
378
1644
276
166
264
1672
382
1910
572
107
68
1922
1738
1895
1936
603
449...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #170:

score: 0
Accepted
time: 954ms
memory: 36004kb

input:

1226
1648
1352
587
299
260
1706
947
1890
1809
1358
119
277
479
1182
1063
350
1652
1714
1906
40
1434
888
1420
560
860
76
1897
741
1032
1856
639
1447
1390
2005
1416
1579
1918
1216
1437
1109
1070
933
59
1499
1906
1631
1249
1481
1
118
624
1815
310
1990
105
180
1644
446
338
830
993
318
529
1095
435
1975
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #171:

score: 0
Accepted
time: 977ms
memory: 36004kb

input:

1440
357
966
1622
1455
664
642
1045
787
292
1682
1043
413
1856
1237
1729
1518
740
1471
1488
1210
1418
1750
1908
1191
1743
1263
834
814
1587
757
1201
409
436
1858
957
323
823
1540
31
730
95
505
1301
1920
691
1650
864
1285
1692
1139
256
1454
1923
1137
1050
1617
1655
50
1490
1782
805
1488
176
1943
1118...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #172:

score: 0
Accepted
time: 975ms
memory: 35972kb

input:

1552
1212
1099
1737
690
405
778
1839
1337
1600
1053
371
202
1217
542
343
387
1319
1248
1160
540
1515
880
155
904
1776
310
784
1714
1538
562
1457
354
761
737
49
1752
724
951
1902
1517
640
1187
560
566
817
1712
586
194
1989
1248
118
985
1830
817
891
124
1158
601
488
489
1985
1900
727
630
256
722
333
2...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #173:

score: 0
Accepted
time: 983ms
memory: 35940kb

input:

1408
1682
720
1724
436
785
1170
1513
127
891
297
339
119
1697
232
1486
632
1258
1153
1089
1886
1484
1259
547
744
1552
1244
479
726
977
239
1456
1068
1341
511
1029
780
114
361
1629
927
417
1614
1836
717
687
1390
436
1375
1646
1741
108
1155
360
625
604
776
660
641
1758
1725
1022
679
1662
1846
1283
171...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #174:

score: 0
Accepted
time: 988ms
memory: 36000kb

input:

1648
264
468
1839
1943
1422
921
803
932
54
181
1682
1924
1058
1553
613
1645
1837
674
761
576
76
1638
810
585
80
291
301
1499
544
172
79
1141
1665
1917
1625
1953
1903
1660
1741
1458
451
152
839
867
812
1451
30
796
1944
1850
1730
686
266
305
957
1299
162
1449
1524
433
1691
1091
197
789
1797
1323
1960
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #175:

score: 0
Accepted
time: 984ms
memory: 36004kb

input:

1504
1118
89
1826
1178
1290
1569
221
1354
1361
1569
1266
1713
1666
1243
1755
130
1776
579
177
1923
173
1888
690
425
112
1226
251
383
239
105
78
1343
229
1308
589
1238
1805
1071
1468
740
740
1347
98
1529
1194
1129
1768
1721
1601
199
1720
88
300
1873
670
1311
1425
1872
522
1412
727
1758
1260
2005
808
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #176:

score: 0
Accepted
time: 985ms
memory: 35928kb

input:

1616
212
222
1428
925
1670
1833
1783
144
652
813
850
1374
1027
548
882
1144
339
484
362
1253
270
763
954
1898
144
144
1706
1667
1694
1542
333
1544
553
442
1185
267
1706
482
1067
1526
517
1773
861
1552
1448
1191
1618
886
1898
1075
1582
387
718
1553
512
1962
927
1912
1792
2008
1524
154
179
693
1835
16...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #177:

score: 0
Accepted
time: 983ms
memory: 36020kb

input:

1472
1066
1859
1415
160
291
1712
1201
950
1831
440
178
1675
1636
238
1384
13
278
261
34
71
879
1398
1345
1738
304
951
1784
295
1134
1476
461
1874
1261
1849
405
1440
1736
1652
1435
553
550
312
1881
198
1830
1509
1212
1811
1556
1312
1316
1806
752
1361
353
469
1934
447
1559
1228
432
693
730
1652
333
12...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #178:

score: 0
Accepted
time: 983ms
memory: 36000kb

input:

1456
1537
1864
1786
1922
159
216
619
2011
1122
1700
146
1465
996
55
511
258
1113
167
1979
1289
720
1776
1609
1579
336
1885
1735
1579
573
1665
972
60
1586
1623
745
725
1637
1191
1162
1467
840
1250
1140
92
1444
1442
934
976
1981
1677
1177
88
1043
1681
66
993
1180
743
557
1951
1229
1361
1537
852
1616
6...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #179:

score: 0
Accepted
time: 986ms
memory: 35864kb

input:

1568
119
1997
1773
1285
796
96
165
801
413
1072
1490
1126
1605
1249
1653
1271
1053
1704
1651
620
817
139
1872
1291
368
804
1045
336
12
1086
971
133
150
501
1981
1898
1667
602
1273
494
873
1933
399
243
1825
1248
528
397
1510
1786
1167
1507
949
1105
1923
1644
683
1294
1827
915
265
1773
200
51
755
1881...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #180:

score: 0
Accepted
time: 972ms
memory: 36036kb

input:

1424
973
1617
1376
520
1176
359
1599
1607
1593
444
1073
1171
838
1066
780
1773
1632
1609
939
1966
1554
1030
1752
1132
913
1866
996
1492
1723
1019
1354
847
474
1908
561
415
1312
1773
1001
1280
650
471
1418
905
191
1182
378
1578
1936
263
773
1038
1495
913
1764
152
185
1718
1593
1639
1446
424
1007
1011...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #181:

score: 0
Accepted
time: 976ms
memory: 35936kb

input:

1125
1698
1231
779
1803
1453
1056
1696
248
76
895
1997
666
199
866
1446
796
719
1366
905
863
1538
1892
735
1763
1540
1806
60
1053
262
1808
1916
1568
1537
1889
614
1943
1721
337
1226
1286
1819
1930
644
1325
737
689
504
1383
1866
1028
918
933
708
1564
1205
1077
324
1450
601
830
1258
1594
398
227
1696
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #182:

score: 0
Accepted
time: 987ms
memory: 35968kb

input:

1237
536
852
893
1038
1321
1447
986
1054
1383
523
1325
1095
1575
555
60
1809
787
1143
321
194
1635
254
999
1603
1572
724
1771
450
213
1741
1915
1770
1861
1535
1210
1099
1622
1892
954
312
92
469
1791
1988
1118
1007
226
292
1396
1393
395
847
998
1756
918
1600
1843
1617
1615
1554
167
118
1205
930
707
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #183:

score: 0
Accepted
time: 990ms
memory: 35952kb

input:

1093
1135
601
880
785
1958
1455
660
1859
802
1911
909
884
168
2005
1203
294
1238
1048
506
1028
1988
1017
879
1060
1605
1531
1593
1222
1668
1418
283
1971
425
414
174
384
1523
1303
1065
1099
1886
1151
1051
122
1244
941
76
1473
1821
1758
257
378
1033
1564
759
236
1089
153
869
774
963
530
252
1890
1989
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #184:

score: 0
Accepted
time: 982ms
memory: 36016kb

input:

1333
1989
222
483
20
322
1847
1966
393
1853
1154
621
674
1544
1566
73
1051
1305
697
1938
358
69
1652
1142
900
1893
449
1544
1738
1107
1351
282
285
749
1820
1282
1429
1553
457
664
381
1919
74
54
144
1114
747
1686
894
1350
491
503
548
939
1244
600
759
592
704
635
1241
2016
1197
1187
1090
616
330
1045
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #185:

score: 0
Accepted
time: 986ms
memory: 35944kb

input:

1189
571
354
598
1398
190
222
1384
1071
1144
526
204
335
137
1000
1216
1425
1756
474
1610
1704
166
14
1534
741
1925
1512
1110
1134
803
1284
793
486
1329
1594
2006
330
1454
1884
1160
911
192
628
1329
807
1624
680
896
1819
1776
856
1869
79
1485
796
314
1282
94
744
1649
461
669
1609
1738
289
1643
1702
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #186:

score: 0
Accepted
time: 984ms
memory: 35876kb

input:

1301
1041
487
585
1145
827
230
1058
1877
563
1786
1548
124
1514
561
342
422
1823
379
1539
907
774
393
1798
581
1957
430
1061
1906
242
577
920
688
1654
473
842
1375
1484
1423
759
1826
225
1055
76
957
1749
486
746
984
1433
965
1859
1498
1391
604
155
1934
1357
1423
903
1185
1721
260
657
1249
653
1443
6...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #187:

score: 0
Accepted
time: 987ms
memory: 35952kb

input:

1285
391
1996
699
380
1207
622
348
410
1614
1158
1132
1929
1994
507
973
923
514
284
1083
1741
871
1284
45
294
357
1365
1011
1046
1697
510
663
761
218
119
1438
532
617
578
486
1108
3
361
1096
1108
115
548
340
1909
1730
1330
1977
1796
1937
284
508
185
347
1975
669
404
886
800
1208
1952
1680
287
1151
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
1957
...

result:

ok 

Test #188:

score: 0
Accepted
time: 963ms
memory: 35896kb

input:

1141
990
113
174
1631
1204
373
22
1216
905
1042
460
1590
1355
1572
99
1936
581
61
756
1071
840
1662
1685
134
133
412
322
1819
1264
187
1175
1475
542
1526
402
1833
519
2004
598
1639
548
788
355
1770
241
226
62
1074
1388
1822
1455
1199
1843
92
221
709
1866
2014
1683
872
1426
1723
2014
1152
179
1916
13...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #189:

score: 0
Accepted
time: 970ms
memory: 35940kb

input:

1253
1844
1750
289
1377
1584
1021
1328
6
197
541
428
131
1963
1518
1242
165
1032
1726
684
402
937
281
1948
1991
165
834
528
1087
959
120
1302
1549
1250
916
999
990
548
1927
325
921
325
1214
1630
1920
111
288
1672
623
1685
1931
1317
985
374
1532
318
1360
1368
806
938
92
719
375
1189
96
1205
1400
763
...

output:

2018
2017
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #190:

score: 0
Accepted
time: 988ms
memory: 35940kb

input:

1109
426
1882
532
868
1964
773
746
1067
1632
1929
1772
1936
1324
823
113
1051
1099
991
356
1108
1546
659
324
935
197
1769
478
1987
910
54
1813
1494
1574
178
219
18
450
1082
180
1707
102
1769
633
567
237
1981
1522
1804
1342
280
1563
900
152
1340
31
1883
615
845
704
815
1131
787
1996
1311
216
757
1385...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #191:

score: 0
Accepted
time: 977ms
memory: 36040kb

input:

810
895
984
1823
8
353
1981
844
1981
627
1997
935
1560
685
879
1163
202
187
748
66
645
1530
1906
811
63
1337
1580
919
1805
1465
971
103
584
493
32
1775
1034
858
1278
790
1457
1272
1212
115
987
1038
241
1777
1608
1273
1046
939
539
1893
487
848
1048
626
961
1855
7
1456
1573
1260
527
514
1907
1913
1307...

output:

2018
2017
2016
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #192:

score: 0
Accepted
time: 971ms
memory: 35996kb

input:

922
1493
861
1298
1258
477
1861
134
770
1678
1240
263
1349
1806
312
1537
703
766
653
1754
1479
1371
268
1075
1919
1369
498
869
689
904
264
230
913
1073
1438
867
63
760
689
389
740
1561
519
1134
1521
1420
46
1371
517
1570
35
1057
326
1927
167
1073
1828
128
1001
1110
475
108
224
179
975
1541
1008
647
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #193:

score: 0
Accepted
time: 984ms
memory: 35884kb

input:

906
587
866
1668
1005
858
108
1824
1320
1097
1380
1863
1010
654
1890
664
1588
705
430
1171
682
1980
1159
1467
1760
1401
1433
1076
1461
343
453
741
1115
1525
956
1335
1492
661
1860
245
1270
1594
945
394
1672
1546
1996
1221
1698
1228
400
535
240
1833
1991
914
1839
1647
1424
108
1710
1161
1148
730
174
...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #194:

score: 0
Accepted
time: 976ms
memory: 36008kb

input:

1018
1314
487
1655
240
1110
756
1114
110
1892
624
1191
1311
1647
1323
1806
73
1285
79
1227
12
61
1538
1730
1472
1178
480
386
601
39
386
485
1188
90
91
428
521
435
1783
484
680
1371
1372
1669
1566
1415
1802
943
1119
1653
508
397
1787
107
1799
755
475
1149
1720
1890
418
1957
1560
1665
1390
1578
1864
2...

output:

2018
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #195:

score: 0
Accepted
time: 980ms
memory: 36016kb

input:

875
1912
619
1770
1491
1235
636
20
787
927
2012
1159
1100
496
885
933
831
1224
2001
643
1358
158
156
1610
1313
1722
1414
337
1373
1494
1823
1124
1390
414
1497
1536
1694
336
1321
83
1467
1916
166
160
212
1669
232
537
28
1182
1001
515
1445
142
1223
469
998
396
255
1144
1654
866
211
199
333
333
965
752...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #196:

score: 0
Accepted
time: 979ms
memory: 35948kb

input:

987
750
112
1245
1494
1615
899
1710
1337
346
1384
486
761
1616
830
59
1844
43
1778
828
177
895
535
1873
385
1626
461
159
641
933
1756
1123
87
994
1144
2004
979
366
476
1827
493
1694
1104
1435
363
35
38
387
1209
1608
1110
504
1488
560
1543
566
1521
1914
807
142
105
159
751
1006
1549
1488
449
1630
182...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #197:

score: 0
Accepted
time: 982ms
memory: 35956kb

input:

971
1348
245
1360
728
235
1035
1000
127
1653
627
70
551
465
1896
690
201
1998
1683
244
1395
735
1425
121
226
1658
1395
1870
1542
372
1945
1634
1921
1318
150
1096
136
267
1903
1938
1280
1471
1531
694
513
417
99
109
118
1137
1475
110
891
594
1223
279
157
1417
846
1924
1341
571
1418
181
236
498
62
108
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #198:

score: 0
Accepted
time: 983ms
memory: 35896kb

input:

827
1946
1882
1346
1979
104
1299
674
933
689
2015
1414
596
1585
1841
1576
1214
561
1588
1933
725
832
1804
513
1954
1946
314
1820
554
1827
1366
1505
107
1898
1556
1820
1180
168
1314
1665
562
2016
69
1714
1175
543
1793
1719
1299
1562
1584
100
1189
1012
1031
120
680
151
1526
1178
48
1880
1830
988
1196
...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #199:

score: 0
Accepted
time: 993ms
memory: 35884kb

input:

939
1169
2015
1461
1726
484
1178
1980
1482
108
1259
1510
257
434
1275
703
1716
500
1365
101
1559
1441
39
776
1795
1978
1120
1643
1454
18
1299
1
692
207
1203
656
81
1958
596
1521
1220
1793
752
973
1326
412
1855
1313
720
1220
573
1978
592
1046
711
473
820
1670
61
176
1156
404
226
1539
396
24
407
232
6...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #200:

score: 0
Accepted
time: 987ms
memory: 35888kb

input:

923
1767
1764
1576
961
1121
1698
1398
272
1415
887
710
46
1555
836
1845
457
1079
1014
1533
890
1538
417
656
1635
2010
39
1081
722
1473
1104
2016
894
787
593
1380
1126
1347
7
1760
2007
1827
1690
232
1988
538
1533
1291
1901
1517
938
1712
378
953
263
187
1343
1172
101
1958
1880
1585
893
458
1611
1050
1...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #201:

score: 0
Accepted
time: 978ms
memory: 35884kb

input:

1200
928
633
620
165
178
1935
1161
814
1790
467
1353
1743
1948
914
1332
462
562
762
387
1970
1339
540
673
1157
452
1130
107
691
329
1337
79
1192
1180
1472
528
1397
1342
1239
1887
44
323
600
771
287
18
513
690
1764
1250
1104
1109
723
894
1733
1895
709
194
226
1750
1559
219
1550
800
1381
1065
973
1207...

output:

2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
1959
1958
...

result:

ok 

Test #202:

score: 0
Accepted
time: 872ms
memory: 34844kb

input:

1
2016
1
2016
2016
2016
1
2016
2016
2016
1
1
1
1
1
2016
2016
2016
2016
2016
1
2016
1
1
1
1
1
1
2016
1
1
1
2016
2016
2016
1
2016
1
2016
2016
2016
1
2016
1
1
2016
2016
2016
1
1
2016
1
1
1
1
1
2016
1
1
2016
1
2016
1
1
1
2016
1
2016
1
2016
1
1
2016
2016
1
1
1
1
1
2016
1
1
1
1
2016
2016
1
2016
2016
1
201...

output:

3990
3989
3988
3987
3986
3985
3984
3983
3982
3978
3976
3975
3973
3972
3971
3968
3966
3965
3964
3963
3962
3961
3958
3956
3949
3947
3944
3941
3940
3939
3933
3923
3922
3921
3920
3919
3916
3914
3911
3910
3906
3902
3901
3900
3898
3895
3891
3890
3885
3884
3883
3881
3879
3871
3869
3868
3867
3865
3864
3863
...

result:

ok 

Test #203:

score: 0
Accepted
time: 922ms
memory: 34592kb

input:

1
2
1
2016
1
2
2
2
2
1
2
1
1
2
1
2016
1
2016
2
2016
2016
1
2016
2016
2
2
1
2016
1
2
2016
1
2016
2016
2016
2016
2
2
2016
1
2
2
2
2016
1
2
2016
1
2
2
2
1
1
2
1
1
2
1
2
1
2016
2
2
2
2
2016
2
2
2016
2016
1
2
2016
2
2016
2
2
2
2016
2
2
2016
2
2
2
2
1
2
2
2
2
2
1
2
1
1
2016
2016
2016
1
2
2016
2
2016
1
1
2...

output:

2054
2052
2051
2050
2049
2048
2047
2045
2043
2042
2041
2039
2038
2037
2036
2034
2031
2030
2029
2028
2027
2026
2025
2024
2023
2019
2015
2013
2012
2011
2010
2009
2006
2004
2001
2000
1999
1998
1997
1996
1995
1994
1993
1991
1990
1989
1988
1984
1981
1980
1977
1976
1975
1974
1973
1972
1969
1968
1967
1966
...

result:

ok 

Test #204:

score: 0
Accepted
time: 956ms
memory: 35476kb

input:

3
1
5
3
5
3
3
5
3
2016
4
1
5
3
1
2
4
2016
2
2016
5
3
3
2
2
2
1
1
5
2016
1
3
2
2
4
2
1
4
2016
2
4
5
2
1
1
4
1
2
2016
2016
4
3
4
4
2
3
2
2
5
5
1
2
1
1
1
2
2016
3
4
1
3
2016
4
3
3
3
2016
2016
5
2
3
2016
3
5
1
2016
5
4
4
1
5
2016
4
5
5
2
2
2016
2
3
5
4
4
4
3
5
2
5
2016
2016
4
2
2016
4
4
4
4
4
1
2
2
5
4
...

output:

2371
2370
2369
2367
2366
2364
2363
2362
2360
2359
2358
2357
2355
2354
2353
2351
2350
2349
2348
2347
2346
2345
2344
2342
2341
2340
2337
2336
2335
2334
2333
2332
2331
2330
2328
2327
2326
2325
2324
2322
2321
2320
2319
2318
2317
2316
2315
2314
2312
2310
2309
2308
2307
2306
2305
2304
2303
2302
2301
2300
...

result:

ok 

Extra Test:

score: 0
Extra Test Passed