結果
問題 | No.5005 3-SAT |
ユーザー | merom686 |
提出日時 | 2022-04-29 16:19:06 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 1,002 ms / 2,000 ms |
コード長 | 2,061 bytes |
コンパイル時間 | 1,902 ms |
実行使用メモリ | 3,640 KB |
スコア | 87,576 |
最終ジャッジ日時 | 2022-04-29 16:21:33 |
合計ジャッジ時間 | 107,777 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1,002 ms
3,456 KB |
testcase_01 | AC | 1,002 ms
3,436 KB |
testcase_02 | AC | 1,002 ms
3,524 KB |
testcase_03 | AC | 1,002 ms
3,488 KB |
testcase_04 | AC | 1,002 ms
3,528 KB |
testcase_05 | AC | 1,002 ms
3,500 KB |
testcase_06 | AC | 1,002 ms
3,404 KB |
testcase_07 | AC | 1,000 ms
3,488 KB |
testcase_08 | AC | 1,001 ms
3,500 KB |
testcase_09 | AC | 1,002 ms
3,416 KB |
testcase_10 | AC | 1,002 ms
3,480 KB |
testcase_11 | AC | 1,002 ms
3,420 KB |
testcase_12 | AC | 1,002 ms
3,476 KB |
testcase_13 | AC | 1,002 ms
3,488 KB |
testcase_14 | AC | 1,002 ms
3,556 KB |
testcase_15 | AC | 1,002 ms
3,560 KB |
testcase_16 | AC | 1,001 ms
3,552 KB |
testcase_17 | AC | 1,001 ms
3,492 KB |
testcase_18 | AC | 1,002 ms
3,500 KB |
testcase_19 | AC | 1,000 ms
3,488 KB |
testcase_20 | AC | 1,002 ms
3,552 KB |
testcase_21 | AC | 1,001 ms
3,420 KB |
testcase_22 | AC | 1,002 ms
3,488 KB |
testcase_23 | AC | 1,001 ms
3,416 KB |
testcase_24 | AC | 1,001 ms
3,488 KB |
testcase_25 | AC | 1,002 ms
3,560 KB |
testcase_26 | AC | 1,001 ms
3,452 KB |
testcase_27 | AC | 1,001 ms
3,476 KB |
testcase_28 | AC | 1,002 ms
3,476 KB |
testcase_29 | AC | 1,001 ms
3,528 KB |
testcase_30 | AC | 1,000 ms
3,568 KB |
testcase_31 | AC | 1,002 ms
3,452 KB |
testcase_32 | AC | 1,002 ms
3,528 KB |
testcase_33 | AC | 1,001 ms
3,560 KB |
testcase_34 | AC | 1,002 ms
3,552 KB |
testcase_35 | AC | 1,002 ms
3,456 KB |
testcase_36 | AC | 1,001 ms
3,560 KB |
testcase_37 | AC | 1,001 ms
3,452 KB |
testcase_38 | AC | 1,001 ms
3,560 KB |
testcase_39 | AC | 1,002 ms
3,524 KB |
testcase_40 | AC | 1,002 ms
3,420 KB |
testcase_41 | AC | 1,001 ms
3,508 KB |
testcase_42 | AC | 1,001 ms
3,456 KB |
testcase_43 | AC | 1,002 ms
3,560 KB |
testcase_44 | AC | 1,001 ms
3,568 KB |
testcase_45 | AC | 1,001 ms
3,528 KB |
testcase_46 | AC | 1,002 ms
3,556 KB |
testcase_47 | AC | 1,001 ms
3,424 KB |
testcase_48 | AC | 1,002 ms
3,452 KB |
testcase_49 | AC | 1,002 ms
3,416 KB |
testcase_50 | AC | 1,002 ms
3,560 KB |
testcase_51 | AC | 1,002 ms
3,528 KB |
testcase_52 | AC | 1,001 ms
3,416 KB |
testcase_53 | AC | 1,001 ms
3,564 KB |
testcase_54 | AC | 1,001 ms
3,572 KB |
testcase_55 | AC | 1,001 ms
3,492 KB |
testcase_56 | AC | 1,002 ms
3,420 KB |
testcase_57 | AC | 1,001 ms
3,488 KB |
testcase_58 | AC | 1,002 ms
3,480 KB |
testcase_59 | AC | 1,002 ms
3,552 KB |
testcase_60 | AC | 1,002 ms
3,472 KB |
testcase_61 | AC | 1,002 ms
3,508 KB |
testcase_62 | AC | 1,002 ms
3,484 KB |
testcase_63 | AC | 1,001 ms
3,500 KB |
testcase_64 | AC | 1,002 ms
3,504 KB |
testcase_65 | AC | 1,001 ms
3,476 KB |
testcase_66 | AC | 1,001 ms
3,532 KB |
testcase_67 | AC | 1,001 ms
3,480 KB |
testcase_68 | AC | 1,001 ms
3,524 KB |
testcase_69 | AC | 1,002 ms
3,472 KB |
testcase_70 | AC | 1,002 ms
3,508 KB |
testcase_71 | AC | 1,002 ms
3,504 KB |
testcase_72 | AC | 1,001 ms
3,564 KB |
testcase_73 | AC | 1,002 ms
3,492 KB |
testcase_74 | AC | 1,001 ms
3,508 KB |
testcase_75 | AC | 1,002 ms
3,504 KB |
testcase_76 | AC | 1,001 ms
3,452 KB |
testcase_77 | AC | 1,001 ms
3,408 KB |
testcase_78 | AC | 1,001 ms
3,556 KB |
testcase_79 | AC | 1,002 ms
3,420 KB |
testcase_80 | AC | 1,002 ms
3,500 KB |
testcase_81 | AC | 1,002 ms
3,564 KB |
testcase_82 | AC | 1,002 ms
3,560 KB |
testcase_83 | AC | 1,002 ms
3,532 KB |
testcase_84 | AC | 1,002 ms
3,484 KB |
testcase_85 | AC | 1,001 ms
3,504 KB |
testcase_86 | AC | 1,002 ms
3,556 KB |
testcase_87 | AC | 1,001 ms
3,532 KB |
testcase_88 | AC | 1,002 ms
3,412 KB |
testcase_89 | AC | 1,002 ms
3,420 KB |
testcase_90 | AC | 1,002 ms
3,488 KB |
testcase_91 | AC | 1,002 ms
3,508 KB |
testcase_92 | AC | 1,002 ms
3,504 KB |
testcase_93 | AC | 1,002 ms
3,488 KB |
testcase_94 | AC | 1,002 ms
3,640 KB |
testcase_95 | AC | 1,001 ms
3,488 KB |
testcase_96 | AC | 1,000 ms
3,528 KB |
testcase_97 | AC | 1,001 ms
3,420 KB |
testcase_98 | AC | 1,001 ms
3,488 KB |
testcase_99 | AC | 1,002 ms
3,452 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr int N = 2048, M = 256, K = 1; int a[N][6]; int main() { mt19937_64 rnd; int sc = 0; for (int k = 0; k < K; k++) { auto t0 = chrono::high_resolution_clock::now(); for (int i = 0; i < N; i++) { for (int h = 0; h < 6; h++) { if (K == 1) { cin >> a[i][h]; } else { a[i][h] = rnd() % (h < 3 ? 256 : 2); } } } array<char, M> r = {}, t = {}; int s = 0; while (1) { for (int i = 0; i < N; i++) { int b = 0; for (int h = 0; h < 3; h++) { if (t[a[i][h]] == a[i][h + 3]) { b = 1; break; } } if (b == 0) { if (i > s) { s = i; r = t; } int h = rnd() % 3; t[a[i][h]] ^= 1; break; } } auto t1 = chrono::high_resolution_clock::now(); if (chrono::duration_cast<chrono::milliseconds>(t1 - t0).count() >= 1000) break; } if (k == 0) { for (int j = M - 1; j >= 0; j--) { cout << (int)r[j]; } cout << endl; } if (K != 1) { int s = N; for (int i = 0; i < N; i++) { int b = 0; for (int h = 0; h < 3; h++) { if (r[a[i][h]] == a[i][h + 3]) { b = 1; break; } } if (b == 0) { s = i; break; } } cout << s << '\n'; sc += s; } } if (K != 1) { cout << sc * 100 / K << '\n'; } return 0; }