結果

問題 No.3126 Dual Query Problem
ユーザー リテモス
提出日時 2025-04-25 22:47:26
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 693 bytes
コンパイル時間 4,427 ms
コンパイル使用メモリ 252,056 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-04-25 22:47:38
合計ジャッジ時間 11,096 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 18 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>

using namespace std;
using namespace atcoder;
using ll = long long;
using mint = modint998244353;

#define rep(i, n) for (int i = 0; i < (n); ++i)

int main() {

  int n,q; cin >> n >> q;
  vector<int> a(n);
  rep(i,n) cin >> a[i];

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

  vector<int> ans;

  rep(qi,q){
    if (qi < q-n){
      if (qi >= (int)a.size()){
        cout << 1 << " " << qi+1 << " " << 1 << "\n";
        ans.push_back(1);
      } else{
        cout << 1 << " " << qi+1 << " " << a[qi] << "\n";
        ans.push_back(a[qi]);
      }
    } else{
      cout << 2 << " " << qi-n << "\n";
    }
  }

  return 0;
}
0