結果

問題 No.1257 変わった平均値
ユーザー aqua_tenhouaqua_tenhou
提出日時 2020-10-16 22:13:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,088 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 7,904 KB
最終ジャッジ日時 2023-09-28 03:26:35
合計ジャッジ時間 1,522 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,888 KB
testcase_01 AC 14 ms
7,756 KB
testcase_02 AC 14 ms
7,864 KB
testcase_03 AC 13 ms
7,796 KB
testcase_04 AC 14 ms
7,780 KB
testcase_05 AC 14 ms
7,796 KB
testcase_06 AC 14 ms
7,816 KB
testcase_07 AC 13 ms
7,776 KB
testcase_08 AC 16 ms
7,848 KB
testcase_09 AC 14 ms
7,828 KB
testcase_10 AC 14 ms
7,864 KB
testcase_11 AC 13 ms
7,904 KB
testcase_12 AC 13 ms
7,764 KB
testcase_13 AC 15 ms
7,804 KB
testcase_14 AC 14 ms
7,756 KB
testcase_15 AC 14 ms
7,884 KB
testcase_16 AC 13 ms
7,756 KB
testcase_17 AC 14 ms
7,760 KB
testcase_18 AC 14 ms
7,840 KB
testcase_19 AC 13 ms
7,840 KB
testcase_20 AC 13 ms
7,812 KB
testcase_21 AC 13 ms
7,768 KB
testcase_22 AC 12 ms
7,800 KB
testcase_23 WA -
testcase_24 AC 14 ms
7,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a = list(map(int,input().split()))
d = list(map(int,input().split()))

if a == d:
    print("Yes")
else: 
    a = sorted(a)
    d = sorted(d)
    if a == d:
        print("Yes")
        print("2")
    else:
        lis = []
        is_sort = 0
        for i in range(3):
            if abs(a[i]) == abs(d[1]):
                pass
            else:
                is_sort = 1

        abs_a = [[abs(a[i]),i] for i in range(3)]
        abs_d = [[abs(d[i]),i] for i in range(3)]
        abs_a.sort(key= lambda val : val[0])
        abs_d.sort(key= lambda val : val[0])

        lis = []
        is_yes = 1
        for i in range(3):
            if a[abs_a[i][1]] == -d[abs_d[i][1]]:
                lis.append(abs_a[i][1])
            elif abs_a[i][0] == abs_d[i][0]:
                pass
            else:
                is_yes = 0
        if is_yes:
            print("Yes")
            if is_sort:
                print(2)
            for i in range(len(lis)):
                print(1, (lis[i]+1)%3)
                print(1, (lis[i]+1)%3)
        else:
            print("No")
        
0