結果
| 問題 |
No.5005 3-SAT
|
| ユーザー |
nikumakare
|
| 提出日時 | 2024-07-22 20:17:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 920 bytes |
| コンパイル時間 | 319 ms |
| コンパイル使用メモリ | 82,028 KB |
| 実行使用メモリ | 77,944 KB |
| スコア | 0 |
| 最終ジャッジ日時 | 2024-07-22 20:17:29 |
| 合計ジャッジ時間 | 14,194 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 100 |
ソースコード
import random
def make_testcase():
C = []
for i in range(2048):
C.append([int(i) for i in input().split()])
# sub = []
# for j in range(3):
# sub.append(random.randrange(256))
# sub.append(random.randint(0, 1))
# C.append(sub[:])
return C
C = make_testcase()
k = 0
nowans = k
nowscore = 0
table = [C[0]]
print(table)
ends = 3
while 1:
if ends == 0:
break
ends -= 1
for row in table:
if k >> row[0] & 1 == row[1]:
continue
if k >> row[2] & 1 == row[3]:
continue
if k >> row[4] & 1 == row[5]:
continue
tar = random.choice(row[::2])
k ^= 1 << tar
break
else:
nowscore += 1
nowans = k
print(f"score={nowscore} sol={bin(k)[2:]}")
table.append(C[nowscore])
ends = 6 * (nowscore + 1)
print(bin(k)[2:])
nikumakare