結果

問題 No.1366 交換門松列・梅
ユーザー Fullmoon85072Fullmoon85072
提出日時 2021-11-15 21:50:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 723 bytes
コンパイル時間 982 ms
コンパイル使用メモリ 86,836 KB
実行使用メモリ 71,688 KB
最終ジャッジ日時 2023-08-21 16:49:47
合計ジャッジ時間 3,319 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,588 KB
testcase_01 AC 90 ms
71,688 KB
testcase_02 AC 89 ms
71,608 KB
testcase_03 AC 91 ms
71,472 KB
testcase_04 AC 91 ms
71,532 KB
testcase_05 AC 90 ms
71,584 KB
testcase_06 AC 87 ms
71,604 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 90 ms
71,504 KB
testcase_11 AC 88 ms
71,404 KB
testcase_12 AC 90 ms
71,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import copy

input_list = list()
for i in range(2):
    row_list = list()
    line = input().split(" ")
    for x in line:
        row_list.append(int(x))
    input_list.append(row_list)

x = 0
y = 0
for count in range(9):
    # work
    a = copy.copy(input_list[0])
    b = copy.copy(input_list[1])

    # exchange
    change_a = a[x]
    change_b = b[y]
    a[x] = change_b
    b[y] = change_a

    # judge
    if len(a) == len(set(a)) or len(b) == len(set(b)):
        if max(a) == a[1] or min(a) == a[1]:
            if max(b) == b[1] or min(b) == b[1]:
                print("Yes")
                sys.exit()

    # count up
    if y == 2:
        x += 1
        y = 0
    else:
        y += 1

print("No")
0