結果
問題 |
No.3235 巡回減算
|
ユーザー |
👑 |
提出日時 | 2024-02-18 09:41:23 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 608 ms / 10,000 ms |
コード長 | 516 bytes |
コンパイル時間 | 347 ms |
コンパイル使用メモリ | 82,428 KB |
実行使用メモリ | 80,540 KB |
最終ジャッジ日時 | 2024-09-29 00:15:10 |
合計ジャッジ時間 | 5,481 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
O=print L=range(8) A=[[int(s)for s in input()]for i in L] def U(t,a,i): return[t[(j+a)&7]-A[i][j]for j in L] def N(t): return any(t[j]<0for j in L) for a in L: t=U(A[0],a,1) if N(t):continue for b in L: u=U(t,b,2) if N(u):continue for c in L: v=U(u,c,3) if N(v):continue for d in L: w=U(v,d,4) if N(w):continue for e in L: x=U(w,e,5) if N(x):continue for f in L: y=U(x,f,6) if N(y):continue for g in L: if U(y,g,7)==[0]*8:exit(O("Yes")) O("No")