結果

問題 No.1257 変わった平均値
ユーザー ygd.ygd.
提出日時 2020-10-16 22:45:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 574 bytes
コンパイル時間 2,115 ms
コンパイル使用メモリ 86,612 KB
実行使用メモリ 71,588 KB
最終ジャッジ日時 2023-09-28 04:30:41
合計ジャッジ時間 3,108 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,296 KB
testcase_01 AC 66 ms
71,276 KB
testcase_02 AC 66 ms
71,588 KB
testcase_03 AC 68 ms
71,280 KB
testcase_04 AC 66 ms
71,268 KB
testcase_05 AC 69 ms
71,304 KB
testcase_06 AC 66 ms
71,396 KB
testcase_07 AC 67 ms
71,276 KB
testcase_08 AC 66 ms
71,320 KB
testcase_09 AC 66 ms
71,352 KB
testcase_10 AC 67 ms
71,316 KB
testcase_11 AC 68 ms
71,232 KB
testcase_12 AC 66 ms
71,356 KB
testcase_13 AC 66 ms
71,040 KB
testcase_14 AC 67 ms
71,260 KB
testcase_15 AC 66 ms
71,588 KB
testcase_16 AC 65 ms
71,428 KB
testcase_17 AC 67 ms
71,176 KB
testcase_18 AC 66 ms
71,352 KB
testcase_19 AC 64 ms
71,280 KB
testcase_20 AC 67 ms
71,228 KB
testcase_21 AC 66 ms
71,272 KB
testcase_22 AC 65 ms
71,168 KB
testcase_23 AC 67 ms
71,588 KB
testcase_24 AC 68 ms
71,352 KB
権限があれば一括ダウンロードができます

ソースコード

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