Submission #1151623

#TimeUsernameProblemLanguageResultExecution timeMemory
1151623arkanefuryMouse (info1cup19_mouse)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
#define F first
#define sz size()
#define S second
#define in insert
#define all(v) v.begin(), v.end()
#define FOR(x, n, m, d) for(int x = n; x <= m; x += d)
#define FORR(x, n) for(int i = x; i >= n; i --)
#define nikita ios_base::sync_with_stdio(0), cin.tie(0);
const int N = 1e5+5;
int n,m,k,tt,ans,sum=0,l, r, x, y, cnt, block = 448;
int pref[N], b[N],a[N];
vector<int>g[N];
bool used[N];
string s[N];
void query(vector<int>v){
    for(auto i : v)cout<<i<<' ';
    cout<<endl;
    FOR(i, 1, n, 1)cin >> a[i];
}
void solve(int n){
    nikita
    vector<int>v;
    FOR(i, 1, n, 1){
        v.pb(i);
    }
    FOR(i, 1, n*10, 1){
        random_shuffle(all(v));
        query(v);
        FOR(i, 1, n, 1){
            if( a[i] == v[i-1] )b[i] = a[i];
        }
    }
    FOR(i, 1, n, 1)cout << b[i] << ' ';
}
/*
signed main()
{
    nikita
    tt = 1;
    if(!tt)cin >> tt;
    FOR(i, 1, tt, 1){
    solve();
    }
}
*/

Compilation message (stderr)

/usr/bin/ld: /tmp/cc4kBN4u.o: in function `query(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0x0): multiple definition of `query(std::vector<int, std::allocator<int> >)'; /tmp/ccfM624s.o:mouse.cpp:(.text+0xa0): first defined here
collect2: error: ld returned 1 exit status