結果

問題 No.5011 Better Mo's Algorithm is Needed!! (Weighted)
ユーザー butsurizuki
提出日時 2022-12-11 01:24:24
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 67 ms / 5,000 ms
コード長 571 bytes
コンパイル時間 3,641 ms
実行使用メモリ 6,328 KB
スコア 128,836,876
最終ジャッジ日時 2022-12-11 01:28:25
合計ジャッジ時間 50,885 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 120
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;

int main(){
  std::random_device seed_gen;
  std::mt19937_64 engine(seed_gen());
  
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n,q,wt,st;
  cin >> n >> q >> wt >> st;
  vector<int> w(n);
  for(int i=0;i<n;i++){cin >> w[i];}
  vector<int> l(q),r(q);
  for(int i=0;i<q;i++){
    cin >> l[i] >> r[i];
  }
  
  vector<int> res(q);
  for(int i=0;i<q;i++){
  	res[i]=i+1;
  }
  shuffle(res.begin(),res.end(),engine);
  for(int i=0;i<q;i++){
    if(i){cout << " ";}
    cout << res[i];
  }cout << "\n";
  return 0;
}
0