# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
685198 | heeheeheehaaw | Mouse (info1cup19_mouse) | C++17 | 1 ms | 208 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
void solve( int n )
{
vector<int> q, poz, rez;
for(int i = 1; i <= n; i++)
{
q.push_back(i);
poz.push_back(0);
rez.push_back(0);
}
int a = query(q);
while(a > 0 && a < n)
{
random_shuffle(q.begin(), q.end());
a = query(q);
}
if(a == n)
return;
for(int i = 0; i < q.size(); i++)
poz[q[i]] = i;
for(int i = 1; i <= n; i++)
{
if(rez[i - 1] != 0)
continue;
for(int j = 0; j < n; j++)
{
if(poz[i] != j)
swap(q[j], q[poz[i]]);
a = query(q);
if(a >= 1) rez[j] = i;
if(a == 2) rez[poz[i]] = q[poz[i]];
if(poz[i] != j)
swap(q[j], q[poz[i]]);
}
}
query(q);
}
컴파일 시 표준 에러 (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... |