답안 #643457

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
643457 2022-09-22T04:58:55 Z christinelynn Zagonetka (COI18_zagonetka) C++17
0 / 100
1 ms 208 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
const ll mod=1e9+7;
const ll maxn=2e5+5;
const int INF=1e9;
#define ok ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define fi first
#define se second
#define pb push_back
#define ub upper_bound
#define lb lower_bound
#define endl '\n'
int n, arr[maxn], ans[maxn], jwb, ans1[maxn], ans2[maxn];
bool udh;
int main() {
    ok
    cin >> n;
    for(int i=1; i<=n; i++) cin >> arr[i];
    if(n==6) {
        for(int i=0; i<n; i++) ans[i]=i+1;
        do {
            cout << "query";
            for(int i=0; i<n; i++) cout << " " << ans[i];
            cout << endl;
            cout.flush();
            cin >> jwb;
            if(jwb==1) {
                if(!udh) {
                    for(int i=0; i<n; i++) ans1[i]=ans[i];
                    udh;
                }
                for(int i=0; i<n; i++) ans2[i]=ans[i];
            }
        } while(next_permutation(ans, ans+n));
        cout << "end" << endl;
        for(int i=0; i<n; i++) cout << ans1[i] << " ";
        cout << endl;
        for(int i=0; i<n; i++) cout << ans2[i] << " ";
        cout << endl;
        cout.flush();
        return 0;
    }
}

Compilation message

zagonetka.cpp: In function 'int main()':
zagonetka.cpp:35:21: warning: statement has no effect [-Wunused-value]
   35 |                     udh;
      |                     ^~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Unexpected end of file - token expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB Unexpected end of file - token expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Unexpected end of file - token expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB Unexpected end of file - token expected
2 Halted 0 ms 0 KB -