結果
問題 | No.5005 3-SAT |
ユーザー | titan23 |
提出日時 | 2022-06-24 12:21:00 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,997 ms / 2,000 ms |
コード長 | 1,141 bytes |
コンパイル時間 | 349 ms |
実行使用メモリ | 95,696 KB |
スコア | 179 |
最終ジャッジ日時 | 2022-06-24 12:24:27 |
合計ジャッジ時間 | 205,967 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1,989 ms
93,688 KB |
testcase_01 | AC | 1,990 ms
93,912 KB |
testcase_02 | AC | 1,993 ms
94,040 KB |
testcase_03 | AC | 1,990 ms
93,932 KB |
testcase_04 | AC | 1,993 ms
94,088 KB |
testcase_05 | AC | 1,989 ms
94,140 KB |
testcase_06 | AC | 1,994 ms
94,344 KB |
testcase_07 | AC | 1,996 ms
94,592 KB |
testcase_08 | AC | 1,991 ms
92,280 KB |
testcase_09 | AC | 1,991 ms
94,272 KB |
testcase_10 | AC | 1,990 ms
92,828 KB |
testcase_11 | AC | 1,991 ms
92,104 KB |
testcase_12 | AC | 1,989 ms
94,732 KB |
testcase_13 | AC | 1,990 ms
94,332 KB |
testcase_14 | AC | 1,991 ms
94,164 KB |
testcase_15 | AC | 1,991 ms
94,644 KB |
testcase_16 | AC | 1,990 ms
94,412 KB |
testcase_17 | AC | 1,990 ms
94,508 KB |
testcase_18 | AC | 1,990 ms
94,172 KB |
testcase_19 | AC | 1,990 ms
93,196 KB |
testcase_20 | AC | 1,990 ms
93,332 KB |
testcase_21 | AC | 1,991 ms
94,076 KB |
testcase_22 | AC | 1,990 ms
94,040 KB |
testcase_23 | AC | 1,989 ms
94,408 KB |
testcase_24 | AC | 1,990 ms
93,132 KB |
testcase_25 | AC | 1,991 ms
94,336 KB |
testcase_26 | AC | 1,997 ms
94,380 KB |
testcase_27 | AC | 1,990 ms
93,976 KB |
testcase_28 | AC | 1,991 ms
95,244 KB |
testcase_29 | AC | 1,989 ms
92,096 KB |
testcase_30 | AC | 1,991 ms
93,992 KB |
testcase_31 | AC | 1,990 ms
94,840 KB |
testcase_32 | AC | 1,991 ms
93,496 KB |
testcase_33 | AC | 1,990 ms
95,440 KB |
testcase_34 | AC | 1,987 ms
92,928 KB |
testcase_35 | AC | 1,989 ms
93,968 KB |
testcase_36 | AC | 1,990 ms
94,548 KB |
testcase_37 | AC | 1,989 ms
94,208 KB |
testcase_38 | AC | 1,988 ms
94,152 KB |
testcase_39 | AC | 1,990 ms
92,892 KB |
testcase_40 | AC | 1,987 ms
95,316 KB |
testcase_41 | AC | 1,989 ms
93,840 KB |
testcase_42 | AC | 1,991 ms
94,864 KB |
testcase_43 | AC | 1,987 ms
94,720 KB |
testcase_44 | AC | 1,989 ms
92,484 KB |
testcase_45 | AC | 1,989 ms
93,288 KB |
testcase_46 | AC | 1,989 ms
94,268 KB |
testcase_47 | AC | 1,990 ms
95,112 KB |
testcase_48 | AC | 1,988 ms
95,696 KB |
testcase_49 | AC | 1,990 ms
94,448 KB |
testcase_50 | AC | 1,990 ms
93,424 KB |
testcase_51 | AC | 1,987 ms
93,180 KB |
testcase_52 | AC | 1,988 ms
93,096 KB |
testcase_53 | AC | 1,989 ms
92,980 KB |
testcase_54 | AC | 1,989 ms
94,116 KB |
testcase_55 | AC | 1,989 ms
92,940 KB |
testcase_56 | AC | 1,989 ms
94,396 KB |
testcase_57 | AC | 1,989 ms
94,360 KB |
testcase_58 | AC | 1,989 ms
93,104 KB |
testcase_59 | AC | 1,989 ms
93,644 KB |
testcase_60 | AC | 1,989 ms
94,624 KB |
testcase_61 | AC | 1,997 ms
92,268 KB |
testcase_62 | AC | 1,990 ms
92,004 KB |
testcase_63 | AC | 1,988 ms
93,688 KB |
testcase_64 | AC | 1,990 ms
93,924 KB |
testcase_65 | AC | 1,989 ms
92,916 KB |
testcase_66 | AC | 1,990 ms
93,140 KB |
testcase_67 | AC | 1,990 ms
94,264 KB |
testcase_68 | AC | 1,990 ms
94,728 KB |
testcase_69 | AC | 1,990 ms
92,744 KB |
testcase_70 | AC | 1,990 ms
94,112 KB |
testcase_71 | AC | 1,991 ms
94,552 KB |
testcase_72 | AC | 1,989 ms
94,488 KB |
testcase_73 | AC | 1,992 ms
93,556 KB |
testcase_74 | AC | 1,988 ms
93,916 KB |
testcase_75 | AC | 1,989 ms
93,692 KB |
testcase_76 | AC | 1,994 ms
92,240 KB |
testcase_77 | AC | 1,987 ms
92,988 KB |
testcase_78 | AC | 1,987 ms
93,400 KB |
testcase_79 | AC | 1,989 ms
92,736 KB |
testcase_80 | AC | 1,991 ms
92,864 KB |
testcase_81 | AC | 1,988 ms
94,832 KB |
testcase_82 | AC | 1,987 ms
92,100 KB |
testcase_83 | AC | 1,989 ms
94,308 KB |
testcase_84 | AC | 1,991 ms
92,704 KB |
testcase_85 | AC | 1,987 ms
94,508 KB |
testcase_86 | AC | 1,990 ms
94,048 KB |
testcase_87 | AC | 1,988 ms
94,156 KB |
testcase_88 | AC | 1,994 ms
94,040 KB |
testcase_89 | AC | 1,989 ms
93,880 KB |
testcase_90 | AC | 1,989 ms
94,328 KB |
testcase_91 | AC | 1,987 ms
94,640 KB |
testcase_92 | AC | 1,988 ms
94,232 KB |
testcase_93 | AC | 1,994 ms
93,596 KB |
testcase_94 | AC | 1,988 ms
94,392 KB |
testcase_95 | AC | 1,990 ms
93,464 KB |
testcase_96 | AC | 1,986 ms
93,984 KB |
testcase_97 | AC | 1,989 ms
94,080 KB |
testcase_98 | AC | 1,990 ms
94,512 KB |
testcase_99 | AC | 1,987 ms
94,424 KB |
ソースコード
import sys input = lambda: sys.stdin.readline().rstrip() import random from time import time random.seed = 1 randint = random.randint random = random.random # ----------------------- # abcpqr = [list(map(int, input().split())) for _ in range(2048)] STIME = time() li = [[0, 0] for _ in range(2048)] for a,b,c,p,q,r in abcpqr: li[a][p] += 1 li[b][q] += 1 li[c][r] += 1 def make_ans_init() -> list: ans = [0] * 2048 for i in range(2048): if li[i][0] < li[i][1]: ans[i] = 1 else: ans[i] = 0 return ans def eval_ans(ans) -> int: ret = 0 for a,b,c,p,q,r in abcpqr: if ans[a] == p and ans[b] == q and ans[c] == r: ret += 1 return ret def make_ans_yamanobori(ans): preans = ans[:] for _ in range(10): indx = randint(0, 2047) ans[indx] = 1 - ans[indx] return preans def main(): ans = make_ans_init() vestscore = eval_ans(ans) while time()-STIME < 1.9: nans = make_ans_yamanobori(ans) score = eval_ans(nans) if score > vestscore: ans = nans[:] vestscore = score print(''.join(map(str, reversed(ans)))) print(vestscore, file=sys.stderr) main()