結果

問題 No.2496 LCM between Permutations
ユーザー KumaTachiRenKumaTachiRen
提出日時 2023-09-06 09:54:35
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
QLE  
実行時間 -
コード長 585 bytes
コンパイル時間 4,017 ms
コンパイル使用メモリ 259,220 KB
実行使用メモリ 24,540 KB
平均クエリ数 954.97
最終ジャッジ日時 2023-09-06 09:54:43
合計ジャッジ時間 7,297 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 QLE -
testcase_01 QLE -
testcase_02 QLE -
testcase_03 QLE -
testcase_04 QLE -
testcase_05 QLE -
testcase_06 QLE -
testcase_07 QLE -
testcase_08 QLE -
testcase_09 QLE -
testcase_10 QLE -
testcase_11 QLE -
testcase_12 QLE -
testcase_13 QLE -
testcase_14 QLE -
testcase_15 QLE -
testcase_16 QLE -
testcase_17 QLE -
testcase_18 QLE -
testcase_19 QLE -
testcase_20 QLE -
testcase_21 QLE -
testcase_22 QLE -
testcase_23 QLE -
testcase_24 QLE -
testcase_25 QLE -
testcase_26 QLE -
testcase_27 QLE -
testcase_28 QLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

using namespace std;
using namespace atcoder;

struct Fast {
  Fast() {
    std::cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << setprecision(10);
  }
} fast;

#define rep(i, a, b) for (int(i) = (a); (i) < (int)(b); (i)++)

int guess(int i, int j) {
  cout << "? " << (i + 1) << " " << (j + 1) << endl;
  int l;
  cin >> l;
  return l;
}

int main() {
  int n;
  cin >> n;

  rep(i, 0, 3 * n + 1) guess(0, 0);

  cout << "!";
  rep(i, 0, n) cout << " " << (i + 1);
  rep(i, 0, n) cout << " " << (i + 1);
  cout << endl;
}
0