結果
| 問題 |
No.2124 Guess the Permutation
|
| コンテスト | |
| ユーザー |
praton
|
| 提出日時 | 2022-11-25 01:49:38 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 391 bytes |
| コンパイル時間 | 1,949 ms |
| コンパイル使用メモリ | 171,092 KB |
| 実行使用メモリ | 38,672 KB |
| 最終ジャッジ日時 | 2024-10-01 13:36:07 |
| 合計ジャッジ時間 | 8,162 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 |
| other | -- * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int N; cin >> N;
vector<bool> used(N,false);
vector<int> ans(N,-1);
for(int i=0; i<N-1; i++){
cout << "?" << i << i << endl;
cout << flush;
int k; cin >> k;
ans[i]=k;
used[k-1]=true;
}
for(int i=0; i<N; i++) if(!used[i]) ans[N-1]=i+1;
cout << "!";
for(int i=0; i<N; i++) cout << " " << ans[i];
}
praton