Submission #27775129


Source Code Expand

N, A, B = map(int, input().split())
P, Q, R, S = map(int, input().split())

for i in range(P, Q + 1):
    for j in range(R, S + 1):
        k1 = i - A
        k2 = j - B
        k3 = B - j
        if k1 == k2:
            if max(1 - A, 1 - B) <= k1 <= min(N - A, N - B):
                print('#', end='')
        elif k1 == k3:
            if max(1 - A, B - N) <= k1 <= min(N - A, B - 1):
                print('#', end='')
        else:
            print('.', end='')
    print()

Submission Info

Submission Time
Task C - X drawing
User hirofumi999
Language PyPy3 (7.3.0)
Score 300
Code Size 499 Byte
Status AC
Exec Time 165 ms
Memory 80440 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 62 ms 61764 KiB
example_01.txt AC 49 ms 61824 KiB
example_02.txt AC 44 ms 61832 KiB
hand_00.txt AC 120 ms 76488 KiB
hand_01.txt AC 154 ms 80176 KiB
hand_02.txt AC 165 ms 77964 KiB
hand_03.txt AC 122 ms 77800 KiB
hand_04.txt AC 139 ms 79324 KiB
hand_05.txt AC 52 ms 61904 KiB
hand_06.txt AC 107 ms 76052 KiB
hand_07.txt AC 120 ms 77240 KiB
hand_08.txt AC 106 ms 76456 KiB
hand_09.txt AC 123 ms 78052 KiB
hand_10.txt AC 157 ms 80440 KiB
hand_11.txt AC 150 ms 80256 KiB
random_00.txt AC 150 ms 78860 KiB
random_01.txt AC 131 ms 78400 KiB
random_02.txt AC 138 ms 77976 KiB
random_03.txt AC 126 ms 77512 KiB
random_04.txt AC 116 ms 77660 KiB
random_05.txt AC 146 ms 79252 KiB
random_06.txt AC 115 ms 77908 KiB
random_07.txt AC 114 ms 76492 KiB
random_08.txt AC 131 ms 78356 KiB
random_09.txt AC 114 ms 77280 KiB
random_10.txt AC 140 ms 78148 KiB
random_11.txt AC 90 ms 75384 KiB
random_12.txt AC 114 ms 76972 KiB
random_13.txt AC 120 ms 77564 KiB
random_14.txt AC 120 ms 77328 KiB
random_15.txt AC 88 ms 75100 KiB
random_16.txt AC 114 ms 76980 KiB
random_17.txt AC 92 ms 75596 KiB
random_18.txt AC 128 ms 78272 KiB
random_19.txt AC 100 ms 76152 KiB