답안 #561370

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
561370 2022-05-12T17:21:49 Z mircea_007 CONSUL (info1cup19_consul) C++17
0.116806 / 100
1000 ms 336 KB
#include <stdio.h>
#include <random>
#include "grader.h"

#define MAXN 1000
#define MAXQ 60

int viz[MAXN];

void solve( int N ){
  std::mt19937 mt( clock() );
  int q = MAXQ, i, val;
  
  for( i = 0 ; i < N ; i++ )
    viz[i] = 0;
  
  for( ; q-- ; ){
    while( viz[i = mt() % N] );
    viz[i] = 1;
    
    if( cnt( val = kth( i + 1 ) ) * 3 > N ){
      say_answer( val );
      return;
    }
  }

  say_answer( -1 );
}
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3048 ms 208 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 34 ms 208 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Partially correct 33 ms 208 KB Output is partially correct
2 Partially correct 40 ms 208 KB Output is partially correct
3 Correct 8 ms 208 KB Output is correct
4 Correct 9 ms 284 KB Output is correct
5 Partially correct 26 ms 336 KB Output is partially correct
6 Partially correct 40 ms 208 KB Output is partially correct
7 Partially correct 51 ms 208 KB Output is partially correct
8 Partially correct 43 ms 280 KB Output is partially correct
9 Partially correct 43 ms 276 KB Output is partially correct
10 Partially correct 19 ms 280 KB Output is partially correct
11 Partially correct 42 ms 208 KB Output is partially correct
12 Partially correct 33 ms 208 KB Output is partially correct
13 Partially correct 49 ms 208 KB Output is partially correct
14 Partially correct 41 ms 284 KB Output is partially correct