結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,732 KB
testcase_01 AC 17 ms
7,828 KB
testcase_02 AC 16 ms
7,832 KB
testcase_03 AC 17 ms
7,784 KB
testcase_04 AC 15 ms
7,828 KB
testcase_05 AC 16 ms
7,832 KB
testcase_06 AC 15 ms
7,952 KB
testcase_07 AC 15 ms
7,828 KB
testcase_08 AC 14 ms
7,812 KB
testcase_09 AC 16 ms
7,812 KB
testcase_10 AC 15 ms
7,896 KB
testcase_11 AC 14 ms
7,832 KB
testcase_12 AC 15 ms
7,788 KB
testcase_13 AC 15 ms
7,880 KB
testcase_14 AC 15 ms
7,784 KB
testcase_15 AC 15 ms
7,780 KB
testcase_16 AC 15 ms
7,892 KB
testcase_17 AC 15 ms
7,892 KB
testcase_18 AC 15 ms
7,940 KB
testcase_19 AC 14 ms
7,780 KB
testcase_20 AC 15 ms
7,796 KB
testcase_21 AC 15 ms
7,828 KB
testcase_22 AC 14 ms
7,936 KB
testcase_23 WA -
testcase_24 AC 15 ms
7,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if a == d:
    print("Yes")
else: 
    aa = sorted(a)
    dd = sorted(d)
    if aa == dd:
        print("Yes")
        print("2")
    else:
        lis = []
        is_sort = 0
        for i in range(3):
            if abs(a[i]) == abs(d[i]):
                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