답안 #725546

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
725546 2023-04-17T15:30:46 Z groshi CONSUL (info1cup19_consul) C++17
2.43665 / 100
1000 ms 208 KB
#include<bits/stdc++.h>
#include "grader.h"
//#define int long long

using namespace std;
bool bylo[2000];
map<int,int> mapka;
/*void say_answer(int N)
{
    cout<<N<<"\n";
}
int kth(int x)
{
    cout<<"ile tu "<<x<<"\n";
    int co;
    cin>>co;
    return co;
}
int cnt(int x)
{
    cout<<"ile tego "<<x<<"\n";
    cin>>x;
    return x;
}*/
void solve(int N)
{
    for(int i=0;i<=N;i++)
        bylo[i]=0;
    mapka.clear();
    srand(time(0));
    int pytan=0;
    while(pytan<49)
    {
        int gdzie=rand()%N;
        gdzie++;
        if(bylo[gdzie])
            continue;
        bylo[gdzie]=1;
        int ile=kth(gdzie);
        if(mapka.find(ile)!=mapka.end())
            continue;
        mapka[ile]=1;
        pytan++;
        int essa=cnt(ile);
        pytan++;
        if(essa>N/3)
        {
            say_answer(ile);
            return;
        }
    }
    say_answer(-1);
}
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3053 ms 208 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Partially correct 28 ms 208 KB Output is partially correct
2 Correct 7 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 33 ms 208 KB Output is partially correct
2 Partially correct 32 ms 208 KB Output is partially correct
3 Correct 6 ms 208 KB Output is correct
4 Correct 7 ms 208 KB Output is correct
5 Partially correct 30 ms 208 KB Output is partially correct
6 Partially correct 32 ms 208 KB Output is partially correct
7 Partially correct 19 ms 208 KB Output is partially correct
8 Partially correct 29 ms 208 KB Output is partially correct
9 Partially correct 41 ms 208 KB Output is partially correct
10 Partially correct 37 ms 208 KB Output is partially correct
11 Partially correct 41 ms 208 KB Output is partially correct
12 Partially correct 32 ms 208 KB Output is partially correct
13 Partially correct 36 ms 208 KB Output is partially correct
14 Partially correct 28 ms 208 KB Output is partially correct