QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#286654#7963. 多折较差验证GuanYunchangAC ✓641ms152004kbC++203.1kb2023-12-18 10:21:132023-12-18 10:21:13

详细

Test #1:

score: 100
Accepted
time: 395ms
memory: 150648kb

input:

5000
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

output:

5000 12497500

result:

ok single line: '5000 12497500'

Test #2:

score: 0
Accepted
time: 547ms
memory: 150212kb

input:

4991
^^vv^v^^^^vvv^^^^^^vvvv^^^^^^^vv^^^^^^^^v^^^^^^v^^^v^^v^^^v^^^^^v^^v^^^^^^^^vv^^^^^^^^^^vvvvvvv^v^^^^^v^v^^^^^v^^^^^^^^^^^v^^^^^vv^v^^^^^v^^^^vvv^^^v^^^^v^^^^^vv^^v^^^^^^^v^^^^^^^^^v^v^^^v^^v^^^^^v^^^vv^v^^^v^^^v^v^v^^^^v^^^vv^^^^vv^^v^^v^^^^^^^v^^^^^^v^^^^v^^^^^^v^^v^v^^^^^^^^v^^^^^v^^^v^v^^^^...

output:

2748 6735487

result:

ok single line: '2748 6735487'

Test #3:

score: 0
Accepted
time: 553ms
memory: 150232kb

input:

5000
vvvvvv^v^vvvv^^^vv^^v^v^^^vvvv^v^v^v^v^v^v^vvvvvvvv^^vvv^vvvvvvvvvvvv^vvvv^^^^vvvv^vv^^vv^vvv^vvvvvvvv^^vv^^vv^vvvvv^vvv^vvvvvvvvv^v^^vv^v^vvvvv^v^v^vvvv^vvv^vvv^^vvvvv^^vvvvvvv^v^vvvvv^v^^^^v^vvv^v^vv^vvvvv^vv^vvvvvv^vvvvvv^vvvvvv^vvv^^vvvvvvv^^^^vv^vv^v^vvvv^vv^vvv^vvv^vvv^vvvvv^^^^vvvv^vvvvv...

output:

2793 6922268

result:

ok single line: '2793 6922268'

Test #4:

score: 0
Accepted
time: 552ms
memory: 150752kb

input:

4996
vv^^vvvv^^v^^^vvvv^vv^vvvvv^vv^^^vvvv^vv^^^vvv^^v^vvvvv^vvv^v^^vv^^vv^vvvvv^v^vvvvvv^^vv^v^vvv^^vv^vvvvvv^vvvv^vvvvvvvvvvvvv^vvvvv^vvv^vvv^vvv^^vv^vv^vvvvvvv^^vvv^vv^vvvv^vvvvvv^vv^vvvv^v^vvv^v^^vvv^vvvv^^vvvvvvvvvvv^^vv^v^vv^vv^vv^^v^v^^^^vvvvvv^^vvvv^vvv^vvv^v^vv^vvvvvvvv^vvv^v^^vv^vvv^vv^v^v...

output:

2784 6803847

result:

ok single line: '2784 6803847'

Test #5:

score: 0
Accepted
time: 409ms
memory: 150616kb

input:

5000
vvvvvvvvvvvvvvvvvvvvv^^vvvvvvvv^vvvvvvvvvvv^vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv^v^vvvv^vv^vvvv^vvvvvvvvvvvvvvvvvvvvvv^vv^vvvvvvvvvvvvvvvvvvvvvvvvvvvv^^vvvvvvvvvvvvvv^vvvvvvvv^vvvvvvvvvvvvvvvvv^vvv^vvvv^vvvvvvvvvvvvvvv^v^vvvvv^vvvvvv^vv^vvvvvvvvvvv^vv^vvvvvvvvvvvvv^vvvvvvvvvvvvv^vvvvvvvvvvvvv^vvvv...

output:

4052 10043778

result:

ok single line: '4052 10043778'

Test #6:

score: 0
Accepted
time: 407ms
memory: 151528kb

input:

4992
vvvvvvvvvv^vvvvvvvvvvvvvvvvvvv^vvvvvvvvvvvvvvvvv^vvv^vvv^vvv^vvvvvv^vvvvvvvv^v^vvvvvvvvvvvvvvv^vvvvvv^vvvv^vvvvvvvvvvv^v^^vvvvvvvvvvvvvvvvvvvvv^^vvvvvvvvvvvv^vv^vvvvvv^vvvvvvvvvvv^vvvvvvvvvvvvvvvvvvvvvvvvvvvv^vvv^v^vvvv^vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv^vvvvvv^v^vvvvvvvvv^vvvvvvvvv...

output:

4094 10183595

result:

ok single line: '4094 10183595'

Test #7:

score: 0
Accepted
time: 519ms
memory: 150980kb

input:

4992
^^^^vvvvvvvvvv^^^^^vv^^^^^^^^^^vvv^^^^^^vvvvvvv^^^vv^vvvvvvvvv^vvvvvvvvv^^^^^^^^^vvvvvvvvvv^^v^vvvvvvv^^^vvvvvvvvv^^^^^^^^^^vvvvvvv^^^^^vvvvvvvvv^^^^^^^^vvvv^vvvvvvvv^^^^^^^^^^vvv^^^^^^^vvvv^^^^^^^^^vvvvvvv^^^^^^^^vvvv^^^^^vvvvvvv^^^^^^^^vvvvvvvvvv^^^vvvvvvv^^^v^^^^^^^^^vvvvvvvv^^^^^vvv^^^^^^^^...

output:

1513 3793047

result:

ok single line: '1513 3793047'

Test #8:

score: 0
Accepted
time: 535ms
memory: 151368kb

input:

4999
vvvvvvv^^^^vv^^^^^^^^^^vvvvvvvvv^^^^^^^^^^v^^^^^^^^^vvvv^vvvvv^^^^^^^^^vvvvv^vvv^^^^^^^^vvvvv^^^^^^^vvvvvvvvv^^^vvvv^^^^^^^^^^vvvvvv^^^^^vvvv^^^^^^vvvvvvvvv^^^^^^v^^^^vvvv^^^^^^^^^vvvv^^^^vvvvvvv^^^^vvvv^^^^^^^^vvvvvvvv^^^^^^^vvvvvvvv^^^^^^vvvvvvvvvv^^^^^vvvv^^^^^vv^^^^^^vvvvvvvvv^^vvvv^^vvvvvv...

output:

1641 3991610

result:

ok single line: '1641 3991610'

Test #9:

score: 0
Accepted
time: 538ms
memory: 151244kb

input:

4997
vvvvv^^^^vv^^^vv^^vvvv^^^^^vvvvvvvvvv^^^^^^^^^vvvv^^^^^^^^^vvvv^vvvvv^vvvvvvvvvv^^^^^vvv^^^^^^^^vvvv^^^^vvvvvvvvv^^^^^^vv^^^^^^^^^vv^^^^^^^vvvvvvvvv^^^^^^vvvvvvv^^^^^^^vvvvvvvvv^^^^^^^^vvvvvvv^^^^^^^^^^vvvv^^^v^^^^^vvvvv^^^^vvvvvv^^^^^^^^^vvvvvvv^^^^^vvvvvvv^^^^^^^v^^^^^^^^^vvvvvvvv^^^^vvv^vvvv...

output:

1572 3933114

result:

ok single line: '1572 3933114'

Test #10:

score: 0
Accepted
time: 532ms
memory: 150148kb

input:

4999
^v^^^^^^^vvvvvv^^^^^^^^^^vvvvvv^^^^vvvv^^vvv^^^^^^^^^vvvvv^vvvvvvvvv^^vvv^^^^v^^^^^^^^^^vv^^^^^^^^^v^^^^^^vvvvvvvv^^^^^vv^^^^^^^^^vvvvvvvvvv^^^^^vv^^^^vvvvvvv^^^^^^^^^^vvvvvvv^^^^^^vvvvvvvv^^^vvvv^^^^^^vvvvvv^^^^vvvvvv^^^^^^v^^vvvvvvv^^^^vv^^vvvvv^^^vvvv^^^^vvvv^^^vvvvvvvvvv^^^^^^^^^vvvvv^^^^v^...

output:

1485 3659494

result:

ok single line: '1485 3659494'

Test #11:

score: 0
Accepted
time: 346ms
memory: 151092kb

input:

5000
v^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^...

output:

13 2184

result:

ok single line: '13 2184'

Test #12:

score: 0
Accepted
time: 393ms
memory: 149780kb

input:

5000
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv...

output:

5000 12497500

result:

ok single line: '5000 12497500'

Test #13:

score: 0
Accepted
time: 359ms
memory: 151028kb

input:

5000
v^^vv^vv^^^v^^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^v^^vvv^^vv^v...

output:

13 2580

result:

ok single line: '13 2580'

Test #14:

score: 0
Accepted
time: 227ms
memory: 128496kb

input:

4095
vv^vv^^vvv^^v^^^vv^vv^^^vv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^vvv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^vvv^^v^^vvv^vv^^^vv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^^vv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^^vv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^vvv^^v^^vvv^vv^^^vv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^^vv^^v^^^vv^vv^^...

output:

12 0

result:

ok single line: '12 0'

Test #15:

score: 0
Accepted
time: 228ms
memory: 127544kb

input:

4095
v^^vvv^^v^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^^v^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^^v^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^...

output:

12 0

result:

ok single line: '12 0'

Test #16:

score: 0
Accepted
time: 330ms
memory: 150532kb

input:

4994
^vv^^^vvv^vv^vv^^v^^^^vvv^vv^^v^^v^^^vvv^^v^^v^^vvvv^^^vv^vv^vv^^^vvv^vv^vv^^v^^^vvvv^vv^^v^^v^^^vvv^^v^^v^^vv^vv^^^vvv^vv^vv^^v^^^^vvv^vv^^v^^v^^^vvv^^v^^v^^vvvv^vvvvvvv^vv^^vvv^^v^^^^^^^v^^^^vv^vv^vv^^^vvv^vv^vv^^v^^^vvvv^vv^^v^^v^^^vvv^^v^^vv^vv^vv^^^vvv^vv^vv^^v^^^^vvv^vv^^v^^v^^^vvv^^v^^v^...

output:

27 2053

result:

ok single line: '27 2053'

Test #17:

score: 0
Accepted
time: 350ms
memory: 150284kb

input:

4992
v^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^^v^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^^v^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^...

output:

14 2351

result:

ok single line: '14 2351'

Test #18:

score: 0
Accepted
time: 328ms
memory: 150156kb

input:

4997
^^v^^^v^^^^^^vvv^^^vv^^^vv^^v^^vv^^vvv^^vvv^^^^vvv^^^vv^^^vv^^vv^vv^^vvv^^vvv^^^vvvvv^^^^vvv^^^vv^^^vv^^v^^vv^^vvv^^vvv^^^vvvv^^^vv^^^vv^^vv^vv^^vvv^^vvv^^^vvvvv^^^^vvv^^^vv^^^vv^^v^^vv^^vvv^^vvv^^^^vvv^^^vv^^^vv^^vv^vv^^vvv^^vvv^^^vvvv^^^^^vvv^^^vv^^^vv^^v^^vv^^vvv^^vvv^^^vvvv^^^vv^^^vv^^vv^vv...

output:

28 671

result:

ok single line: '28 671'

Test #19:

score: 0
Accepted
time: 319ms
memory: 151192kb

input:

4999
^v^^^v^^^^v^v^^v^v^vvvv^vvv^v^vv^^^v^v^^^v^^^vvvv^vvv^v^vvv^^v^v^^^v^^^^v^v^^^vv^^v^^vvv^v^vvvv^vvv^v^vv^^^v^v^^^v^^^^vvv^vvv^v^vvv^^v^v^^^v^^^^v^v^vv^v^vvvv^vvv^v^vv^^^v^v^^^v^^^vvvv^vvv^v^vvv^^v^v^^^v^^^^v^v^^^vvvv^v^vvvv^vvv^v^vv^^^v^v^^^v^^^^vvv^vvv^v^vvv^^v^v^^^v^^^^v^v^^v^v^vvvv^vvv^v^vv^...

output:

35 2652

result:

ok single line: '35 2652'

Test #20:

score: 0
Accepted
time: 326ms
memory: 150780kb

input:

4999
^v^^v^^vvv^^^^^^^^vvvvvvv^^^v^^vvv^^^^^^^vvvvvvvv^^^v^^vvv^^^^^^^^vvvvvvv^^^vv^vvv^^^^^^^vvvvvvvv^^^v^^vvv^^^^^^^^vvvvvvv^^^v^^vvv^^^^^^^vvvvvvvv^^^vv^vvv^^^^^^^^vvvvvvv^^^vv^vvv^^^^^^^vvvvvvvv^^^v^^vvv^^^^^^^^vvvvvvv^^^v^^vvv^^^^^^^vvvvvvvv^^^v^^vvv^^^^^^^^vvvvvvv^^^vv^vvv^^^^^^^vvvvvvvv^^^vv^...

output:

29 5816

result:

ok single line: '29 5816'

Test #21:

score: 0
Accepted
time: 332ms
memory: 150484kb

input:

4999
^^^vv^vv^^^vv^vvv^^v^^vvvv^^^vv^vv^^^^^vv^^^vvvvv^^v^^vvv^^^^vv^vv^^^v^^vvv^^v^^vvvv^^^vv^vv^^^v^vv^vvv^^v^^vvv^^^^vv^vv^^^vv^vvv^^v^^vvvv^^^vv^vv^^^^^vvv^^vvvvv^^v^^vvv^^^^vv^vv^^^v^^vvv^^v^^vvvv^^^vv^vv^^vv^vv^^^v^^vv^^v^^vvv^^^^vv^vv^^^vv^vvv^^v^^vvvv^^^vv^vv^^^^^vv^^^vvvvv^^v^^vvv^^^^vv^vv^...

output:

21 1650

result:

ok single line: '21 1650'

Test #22:

score: 0
Accepted
time: 350ms
memory: 151580kb

input:

4991
^^vv^vv^^^vv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^^vv^^v^^^vv^vv...

output:

13 2490

result:

ok single line: '13 2490'

Test #23:

score: 0
Accepted
time: 622ms
memory: 150872kb

input:

5000
^^^v^v^vv^^vv^^v^v^vvvv^^^vv^^vvvvvv^vvvvvvvvvvvv^vvvvvv^^^^v^vv^vvv^^v^^^^v^vvvvvvv^^v^vv^^vvvvvv^vv^^v^^^^^v^^vv^vvvv^^vvv^^^vvvvv^v^vv^^vvv^v^v^vvvv^vvv^^^vv^v^vvv^^^v^^vv^vv^^v^^^^vvvv^vvv^^vv^vv^v^v^vvv^vvv^^^v^vv^^v^^vv^vvv^^v^^vvv^vvv^vv^^v^v^vvv^^^^vv^v^vvvvv^vvv^^vvvvv^v^^vv^^^^^^^v^^v...

output:

2264 5574395

result:

ok single line: '2264 5574395'

Test #24:

score: 0
Accepted
time: 354ms
memory: 151708kb

input:

4996
v^^^v^^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^...

output:

13 2218

result:

ok single line: '13 2218'

Test #25:

score: 0
Accepted
time: 348ms
memory: 151360kb

input:

4995
vvv^^vv^vv^^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vv^^^v^^vvv^^vv^vvv^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vvv^^v^^vv^^^vv^vv^^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vvv^^v^^vv^^^vv^vv^^^v^^vvv^^vv^vvv^^v^^vvv^^vv^vv^^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vv^^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vvv^^v^^vv^^^vv...

output:

13 2575

result:

ok single line: '13 2575'

Test #26:

score: 0
Accepted
time: 353ms
memory: 152004kb

input:

4999
vvv^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vv^^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vv^^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vv^^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vv^^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vv^^^v^...

output:

13 1662

result:

ok single line: '13 1662'

Test #27:

score: 0
Accepted
time: 355ms
memory: 150968kb

input:

4996
vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^v^^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^v^^vvv^^v^^vv^^^vv^vvv^^vv^vv^^^vv^vvv^^v^^vv^^^v^...

output:

13 2457

result:

ok single line: '13 2457'

Test #28:

score: 0
Accepted
time: 354ms
memory: 151088kb

input:

4997
vv^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^^v^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^vv^^vvv^^v^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^^v^^^vv^^v^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^vv^^^vv^^v^^vvv^^v^^^vv^vv^^vvv^vv^^^vv^^v^^vvv^vv^^^vv^vv^^vvv^^v^^^vv...

output:

13 2235

result:

ok single line: '13 2235'

Test #29:

score: 0
Accepted
time: 343ms
memory: 150400kb

input:

4991
^vv^^^vv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^^vv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^vvv^^v^^^vv^vv^^vvv^^v^^vvv^vv^^^vv^^v^^^vv^vv^^^v...

output:

13 1932

result:

ok single line: '13 1932'

Test #30:

score: 0
Accepted
time: 359ms
memory: 151128kb

input:

4991
v^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vv^^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vv^^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vv^^^v^^vvv^^vv^vvv^^v^^vv^^^vv^vvv^^v^^vvv^^vv^vv^^^v^^vv^^^vv^vvv^^v^^v...

output:

13 2369

result:

ok single line: '13 2369'

Test #31:

score: 0
Accepted
time: 626ms
memory: 150560kb

input:

5000
^vvvvvvv^^vvv^^^v^^v^vvv^v^^^vv^^vvvvvv^^^vvv^^^v^^vvv^^^v^v^v^vv^v^^v^v^v^^v^^^vv^vvv^^^v^vvvvv^v^vvvvvvvvv^^^^v^vv^^vvv^v^vvvv^v^vv^^^^^^vv^^^^^^vv^vv^v^^^v^v^^^^^v^^v^^^^^vvvvv^vvv^v^^vv^v^^vvvvv^^^^vv^vvv^^v^v^^vv^vv^^^^v^vv^^v^^^v^^^^^^^v^v^vv^^^v^^^v^^vv^^^v^^^^^v^^^v^^vvvvv^v^^^v^vvv^v^v...

output:

2188 5310449

result:

ok single line: '2188 5310449'

Test #32:

score: 0
Accepted
time: 641ms
memory: 151176kb

input:

5000
^vv^^^^^^vv^vv^v^^vv^^^vv^v^v^^^^^^^^v^^vvv^v^^^^v^v^^^^^^^v^^^vv^^vvv^v^^^^vv^^vvvv^v^^^^^vvvvvv^vv^^^v^vvvvv^vvv^^^^v^vvvv^^^^^^^v^vvvvvv^v^^^^^vvvvv^v^^^^v^^^v^vv^vv^vvv^v^^^v^vv^v^^v^^v^vv^vvvv^^^vv^vvv^^^^vv^^^vv^v^v^v^vvvv^^^vv^^^vvvvvvv^v^vvvv^^^vv^v^^v^v^vvv^vvv^vvvvvv^v^^vvvvv^^vv^vv^v...

output:

2146 5271567

result:

ok single line: '2146 5271567'

Test #33:

score: 0
Accepted
time: 623ms
memory: 150020kb

input:

5000
^v^v^v^vvvvvvvv^^v^v^^vv^^v^^^v^v^^^v^v^^vvvvv^vvv^^^^v^^^vvvvv^^v^v^v^^^v^v^^vv^^v^^^^v^v^vv^v^^v^^v^^vv^^vv^^^vvvv^v^vvv^^vv^v^^^^^vvvv^v^^^vv^vv^vvv^v^^vv^v^^^v^v^^^^vv^v^^^v^^^vv^vvv^^^v^vvvv^^v^^^^v^vv^v^v^^^vvvv^v^^^v^^^vv^^v^v^^^vv^v^^v^^^v^v^vvvv^vvvvv^v^vv^^^v^^v^^^^^v^v^^^^v^v^^v^^v^^...

output:

2213 5408180

result:

ok single line: '2213 5408180'

Test #34:

score: 0
Accepted
time: 406ms
memory: 150516kb

input:

5000
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^v^^^^^^^^v^^^^^^v^^^^^^^^^^^v^^^^^^^^^^^^^^^^^^^^^^^^^^v^^^^^^^^v^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^v^^v^^^^^^vv^^^^^^^v^^^^^^^^^v^^^^^v^v^^^^^^^^^^^^v^^^^^^^^^^^^v^^v^^^^^^v^^^^^^^^^^^^^^^v^^^v^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^v^^^^^^^v^^^^^^^^^^^^^^^v^^^^^^...

output:

4115 10169791

result:

ok single line: '4115 10169791'

Test #35:

score: 0
Accepted
time: 411ms
memory: 150456kb

input:

4995
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^v^^v^^^^^^^^v^^v^^^^^^^^^^^^^^^^^^^v^v^^^^^^^^^^v^^^^^^^^^v^^v^^v^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^v^v^^^^^v^^^^^^^^v^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^v^^^^^^^v^^^v^^^^^^^^^^^^v^^^^^v^^^^^^^^^^^^^^^^^^^v^^^^^^^^^^^^^^...

output:

4082 10186253

result:

ok single line: '4082 10186253'

Test #36:

score: 0
Accepted
time: 549ms
memory: 150420kb

input:

5000
^^^v^^^^v^v^^v^^^^vvv^^^vv^^v^^^^vv^^^^^^^^v^v^^^^^^v^^v^v^v^v^^vv^^v^^^^v^^^^^^^v^v^v^^^^^^^^v^v^^^^^^^v^^v^v^^^^v^^^^^v^^^^^^vvv^^v^vv^^vvv^v^vvv^^^vvv^^^v^^^^^vv^^^^^v^v^v^^^^^^v^v^^^vv^^^^^^^^vv^^vv^v^^v^^v^v^^^^^^^^^^^^v^^v^v^^v^^^^^^vvv^^^^^^^^^^vv^v^^vv^v^vv^^v^^v^^^^^^^v^^vv^v^^^^vv^^vv...

output:

2753 6808711

result:

ok single line: '2753 6808711'