結果

問題 No.2496 LCM between Permutations
ユーザー KumaTachiRen
提出日時 2023-09-06 09:54:35
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
QLE  
実行時間 -
コード長 585 bytes
コンパイル時間 3,372 ms
コンパイル使用メモリ 251,672 KB
最終ジャッジ日時 2025-02-16 19:02:16
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample QLE * 1
other QLE * 28
権限があれば一括ダウンロードができます

ソースコード

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