結果
問題 |
No.3235 巡回減算
|
ユーザー |
👑 |
提出日時 | 2024-02-18 09:43:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 3,070 ms / 10,000 ms |
コード長 | 516 bytes |
コンパイル時間 | 280 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-28 08:48:05 |
合計ジャッジ時間 | 10,697 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
コンパイルメッセージ
Main.py:7: SyntaxWarning: invalid decimal literal return any(t[j]<0for j in L)
ソースコード
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")