Submission #12601014


Source Code Expand

Copy
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, M = map(int, readline().split())

A = np.arange(M)
B = 2 * M - 1 - A
B[:M//2] -= (2*M+1)

A %= N
B %= N
A += 1
B += 1
for a, b in zip(A.tolist(), B.tolist()):
    print(a,b)

Submission Info

Submission Time
Task E - Rotation Matching
User maspy
Language Python (3.8.2)
Score 500
Code Size 331 Byte
Status
Exec Time 165 ms
Memory 35400 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 Sample_01.txt, Sample_02.txt
All 500 / 500 Sample_01.txt, Sample_02.txt, basic_01.txt, basic_02.txt, basic_03.txt, basic_04.txt, basic_05.txt, basic_06.txt, basic_07.txt, basic_08.txt, basic_09.txt, basic_10.txt, rand_large01.txt, rand_large02.txt, rand_large03.txt, rand_large04.txt, rand_large05.txt, rand_small01.txt, rand_small02.txt, rand_small03.txt, rand_small04.txt, rand_small05.txt, second_01.txt, second_02.txt, second_03.txt, second_04.txt, second_05.txt, second_06.txt, second_07.txt, second_08.txt, second_09.txt, second_10.txt
Case Name Status Exec Time Memory
Sample_01.txt 107 ms 27048 KB
Sample_02.txt 105 ms 26956 KB
basic_01.txt 106 ms 27208 KB
basic_02.txt 100 ms 26776 KB
basic_03.txt 108 ms 26984 KB
basic_04.txt 103 ms 27180 KB
basic_05.txt 101 ms 26708 KB
basic_06.txt 152 ms 33544 KB
basic_07.txt 165 ms 35400 KB
basic_08.txt 108 ms 27420 KB
basic_09.txt 120 ms 28880 KB
basic_10.txt 134 ms 30392 KB
rand_large01.txt 107 ms 27220 KB
rand_large02.txt 107 ms 27336 KB
rand_large03.txt 109 ms 27480 KB
rand_large04.txt 105 ms 27272 KB
rand_large05.txt 125 ms 29720 KB
rand_small01.txt 103 ms 26988 KB
rand_small02.txt 107 ms 26984 KB
rand_small03.txt 105 ms 27096 KB
rand_small04.txt 104 ms 26984 KB
rand_small05.txt 102 ms 27004 KB
second_01.txt 105 ms 27040 KB
second_02.txt 106 ms 26972 KB
second_03.txt 104 ms 26780 KB
second_04.txt 103 ms 26836 KB
second_05.txt 108 ms 27092 KB
second_06.txt 111 ms 27172 KB
second_07.txt 122 ms 28784 KB
second_08.txt 128 ms 30236 KB
second_09.txt 141 ms 31776 KB
second_10.txt 151 ms 33144 KB