結果

問題 No.1257 変わった平均値
ユーザー ygd.ygd.
提出日時 2020-10-16 22:43:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 566 bytes
コンパイル時間 671 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 71,488 KB
最終ジャッジ日時 2023-09-28 04:26:01
合計ジャッジ時間 3,264 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,352 KB
testcase_01 AC 64 ms
71,412 KB
testcase_02 AC 64 ms
71,488 KB
testcase_03 AC 64 ms
71,256 KB
testcase_04 AC 63 ms
71,436 KB
testcase_05 AC 64 ms
71,072 KB
testcase_06 AC 63 ms
71,280 KB
testcase_07 AC 62 ms
71,484 KB
testcase_08 AC 65 ms
71,128 KB
testcase_09 AC 66 ms
71,028 KB
testcase_10 AC 62 ms
70,972 KB
testcase_11 AC 64 ms
70,932 KB
testcase_12 AC 61 ms
71,292 KB
testcase_13 AC 62 ms
71,048 KB
testcase_14 AC 65 ms
71,252 KB
testcase_15 AC 65 ms
71,368 KB
testcase_16 AC 64 ms
71,428 KB
testcase_17 AC 65 ms
71,276 KB
testcase_18 AC 63 ms
71,408 KB
testcase_19 AC 65 ms
71,360 KB
testcase_20 AC 65 ms
71,272 KB
testcase_21 AC 64 ms
71,052 KB
testcase_22 AC 64 ms
71,352 KB
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
A,B,C = map(int,input().split())
D,E,F = map(int,input().split())
P = (A,B,C); PS = set(P)
Q = (D,E,F); QS = set(Q)
seq = [0,1,2]
One = [[1,0,2],[2,1,0],[0,2,1]]
Two = [[1,2,0],[2,0,1]]
for x in One:
  if P[0] == Q[x[0]] and P[1] == Q[x[1]] and P[2] == Q[x[2]]:
    print("Yes")
    print(2);exit()
for x in Two:
  if P[0] == Q[x[0]] and P[1] == Q[x[1]] and P[2] == Q[x[2]]:
    print("Yes")
    print(2);print(2);exit()
if P[0] == Q[seq[0]] and P[1] == Q[seq[1]] and P[2] == Q[seq[2]]:
  print("Yes")
  print(2);print(2);exit() 
  
print("No")
 
  
0