# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
315473 | daniel920712 | Mouse (info1cup19_mouse) | C++14 | 3075 ms | 256 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include "grader.h"
using namespace std;
vector < int > how;
vector < int > ans;
bool have[500]={0};
set < int > all;
void solve(int N)
{
int a,b,c,now,i,j,k,ok;
for(i=0;i<N;i++) how.push_back(i+1);
for(i=0;i<N;i++)
{
for(j=1;j<=N;j++)
{
if(!have[j])
{
how[i]=j;
now=0;
for(k=1;k<=N;k++)
{
if(!have[j]&&k!=j)
{
how[i+now+1]=k;
now++;
}
}
}
a=query(how);
if(a==N) return;
if(i==0)
{
ok=1;
for(j=i+1;j<N;j++)
{
swap(how[i],how[j]);
b=query(how);
swap(how[i],how[j]);
if(b==N) return;
if(a>b) continue;
else
{
ok=0;
break;
}
}
if(ok)
{
have[how[i]]=1;
break;
}
}
else
{
swap(how[i],how[0]);
b=query(how);
swap(how[i],how[0]);
if(b==N) return;
if(b-a==2)
{
have[how[i]]=1;
break;
}
}
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |