Submission #27728456


Source Code Expand

def down(x):
    return x + b - a

def up(x):
    return a + b - x

n, a, b = map(int, input().split())
p, q, r, s = map(int, input().split())

grid = [['.'] * (s - r + 1) for _ in range(q - p + 1) ]

for i in range(q - p + 1):
    x = i + p
    if r <= down(x) <= s:
        grid[i][down(x) - r] = '#'
    if r <= up(x) <= s:
        grid[i][up(x) - r] = '#'
    print(''.join(grid[i]))

Submission Info

Submission Time
Task C - X drawing
User cubesat
Language Python (3.8.2)
Score 300
Code Size 404 Byte
Status AC
Exec Time 391 ms
Memory 35060 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 35
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, hand_08.txt, hand_09.txt, hand_10.txt, hand_11.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt
Case Name Status Exec Time Memory
example_00.txt AC 19 ms 8852 KiB
example_01.txt AC 19 ms 9052 KiB
example_02.txt AC 22 ms 9052 KiB
hand_00.txt AC 22 ms 9820 KiB
hand_01.txt AC 34 ms 11872 KiB
hand_02.txt AC 391 ms 35060 KiB
hand_03.txt AC 30 ms 9908 KiB
hand_04.txt AC 30 ms 10128 KiB
hand_05.txt AC 19 ms 9056 KiB
hand_06.txt AC 25 ms 9372 KiB
hand_07.txt AC 27 ms 9908 KiB
hand_08.txt AC 26 ms 9968 KiB
hand_09.txt AC 27 ms 10020 KiB
hand_10.txt AC 30 ms 11436 KiB
hand_11.txt AC 29 ms 11712 KiB
random_00.txt AC 30 ms 10816 KiB
random_01.txt AC 29 ms 10336 KiB
random_02.txt AC 24 ms 10236 KiB
random_03.txt AC 36 ms 10472 KiB
random_04.txt AC 27 ms 10128 KiB
random_05.txt AC 24 ms 10868 KiB
random_06.txt AC 20 ms 9832 KiB
random_07.txt AC 21 ms 9500 KiB
random_08.txt AC 24 ms 10140 KiB
random_09.txt AC 21 ms 9720 KiB
random_10.txt AC 26 ms 10472 KiB
random_11.txt AC 34 ms 9212 KiB
random_12.txt AC 36 ms 10500 KiB
random_13.txt AC 37 ms 10676 KiB
random_14.txt AC 35 ms 10552 KiB
random_15.txt AC 33 ms 9764 KiB
random_16.txt AC 30 ms 10428 KiB
random_17.txt AC 30 ms 9732 KiB
random_18.txt AC 35 ms 11024 KiB
random_19.txt AC 31 ms 9720 KiB