#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
void solve(int n)
{
int v,vis[1001]={0},sum=0;
for(int i=1; i<=n; i++)
{
v=kth(i);
if(vis[v]) continue;
vis[v]=cnt(v); sum+=vis[v];
if(abs((n-sum)/(n-i)-n/3) >=1e-6) break;
if(vis[v]>n/3)
{
say_answer(v); return;
}
}
say_answer(-1);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
384 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
384 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
384 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |