답안 #369696

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
369696 2021-02-22T08:32:31 Z sad Mouse (info1cup19_mouse) C++14
34 / 100
219 ms 364 KB
#include "grader.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
/*int query(vector<int>v)
{
    for(auto it:v)cout<<it<<" ";
    cout<<endl;int x;cin>>x;return x;
}*/
void solve(int N)
{
    vector<int>v;
    vector<int>vv;
    for(int i=1;i<N+1;i++)v.pb(i);  
    random_shuffle(v.begin(),v.end());
    int x=query(v);
    for(int i=0;i<N;i++)
    {
        for(int j=i+1;j<N;j++)
        {
            swap(v[i],v[j]);
            int y=query(v);
            if(y==N)
            {
                query(v);return;
            }
            if(x>y)
            {
                swap(v[i],v[j]);
                continue;
            }
            x=y;
        }

    }
    query(v);
    return;

}/*
int main()
{
    int n;cin>>n;
    solve(n);
}
*/
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Correct! Number of queries: 19
2 Correct 1 ms 364 KB Correct! Number of queries: 4
3 Correct 1 ms 364 KB Correct! Number of queries: 16
4 Correct 1 ms 364 KB Correct! Number of queries: 22
5 Correct 1 ms 364 KB Correct! Number of queries: 22
6 Correct 1 ms 364 KB Correct! Number of queries: 15
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Correct! Number of queries: 19
2 Correct 1 ms 364 KB Correct! Number of queries: 4
3 Correct 1 ms 364 KB Correct! Number of queries: 16
4 Correct 1 ms 364 KB Correct! Number of queries: 22
5 Correct 1 ms 364 KB Correct! Number of queries: 22
6 Correct 1 ms 364 KB Correct! Number of queries: 15
7 Correct 17 ms 364 KB Correct! Number of queries: 1200
8 Correct 20 ms 364 KB Correct! Number of queries: 1300
9 Correct 16 ms 364 KB Correct! Number of queries: 1100
10 Correct 19 ms 364 KB Correct! Number of queries: 1300
11 Correct 13 ms 364 KB Correct! Number of queries: 900
12 Correct 18 ms 364 KB Correct! Number of queries: 1200
13 Correct 15 ms 364 KB Correct! Number of queries: 1100
14 Correct 19 ms 364 KB Correct! Number of queries: 1300
15 Correct 19 ms 364 KB Correct! Number of queries: 1200
16 Correct 19 ms 364 KB Correct! Number of queries: 1200
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Correct! Number of queries: 19
2 Correct 1 ms 364 KB Correct! Number of queries: 4
3 Correct 1 ms 364 KB Correct! Number of queries: 16
4 Correct 1 ms 364 KB Correct! Number of queries: 22
5 Correct 1 ms 364 KB Correct! Number of queries: 22
6 Correct 1 ms 364 KB Correct! Number of queries: 15
7 Correct 17 ms 364 KB Correct! Number of queries: 1200
8 Correct 20 ms 364 KB Correct! Number of queries: 1300
9 Correct 16 ms 364 KB Correct! Number of queries: 1100
10 Correct 19 ms 364 KB Correct! Number of queries: 1300
11 Correct 13 ms 364 KB Correct! Number of queries: 900
12 Correct 18 ms 364 KB Correct! Number of queries: 1200
13 Correct 15 ms 364 KB Correct! Number of queries: 1100
14 Correct 19 ms 364 KB Correct! Number of queries: 1300
15 Correct 19 ms 364 KB Correct! Number of queries: 1200
16 Correct 19 ms 364 KB Correct! Number of queries: 1200
17 Runtime error 219 ms 364 KB Execution killed with signal 13
18 Halted 0 ms 0 KB -