結果
問題 | No.1589 Bit Vector |
ユーザー | e869120 |
提出日時 | 2021-06-26 22:04:00 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,349 bytes |
コンパイル時間 | 768 ms |
コンパイル使用メモリ | 81,908 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-01 12:35:25 |
合計ジャッジ時間 | 8,375 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 2 ms
6,940 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 2 ms
6,944 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
ソースコード
#include <iostream> #include <vector> #include <string> #include <tuple> using namespace std; int N, K, T; int C[1009][1009]; vector<tuple<string, int, int, int>> Answer; void Solve(int px, int py) { Answer.push_back(make_tuple("UPD", N, 1, -1)); Answer.push_back(make_tuple("XOR", N, py, N)); Answer.push_back(make_tuple("AND", N, px, N)); Answer.push_back(make_tuple("XOR", px, px, N)); Answer.push_back(make_tuple("XOR", py, py, N)); } int main() { // Step #1. Input cin >> N >> K >> T; for (int i = 1; i <= T; i++) { for (int j = 0; j < N; j++) cin >> C[i][j]; } // Step #2. Solve for (int i = N - 2; i >= 0; i--) { for (int j = 0; j <= i; j++) { Solve(j, j + 1); } } Answer.push_back(make_tuple("UPD", N, 0, -1)); Answer.push_back(make_tuple("XOR", N, K - 1, N)); // Step #3. Output The Answer cout << Answer.size() << endl; for (int i = 0; i < Answer.size(); i++) { if (get<0>(Answer[i]) == "UPD") cout << get<0>(Answer[i]) << " " << get<1>(Answer[i]) << " " << get<2>(Answer[i]) << endl; if (get<0>(Answer[i]) == "AND") cout << get<0>(Answer[i]) << " " << get<1>(Answer[i]) << " " << get<2>(Answer[i]) << " " << get<3>(Answer[i]) << endl; if (get<0>(Answer[i]) == "XOR") cout << get<0>(Answer[i]) << " " << get<1>(Answer[i]) << " " << get<2>(Answer[i]) << " " << get<3>(Answer[i]) << endl; } return 0; }