結果

問題 No.3126 Dual Query Problem
ユーザー rgnerdplayer
提出日時 2025-05-01 15:51:01
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 665 bytes
コンパイル時間 3,511 ms
コンパイル使用メモリ 273,384 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2025-05-01 15:51:12
合計ジャッジ時間 10,614 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 19 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using i64 = long long;

int main() {
    cin.tie(nullptr)->sync_with_stdio(false);

    auto solve = [&]() {
        int n, q;
        cin >> n >> q;

        if (2 * n > q) {
            cout << "No" << '\n';
            return;
        }

        cout << "Yes" << '\n';

        for (int i = 0; i < n; i++) {
            int x;
            cin >> x;
            cout << 1 << ' ' << 1 << ' ' << x << '\n';
            cout << 2 << ' ' << 1 << '\n';
        }

        for (int i = 0; i < q - 2 * n; i++) {
            cout << 1 << ' ' << 1 << ' ' << 1 << '\n';
        }
    };
    
    solve();
    
    return 0;
}
0