# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
944990 | AccountName | 카멜레온의 사랑 (JOI20_chameleon) | C++14 | 14 ms | 596 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "chameleon.h"
//#include <vector>
#include <bits/stdc++.h>
using namespace std;
namespace {
int variable_example = 1;
} // namespace
void Solve(int N) {
bool found[1005];
for (int i = 0; i < 1005; i++)
{
found[i] = false;
}
for (int i = 0; i < 2 * N - 1; i++)
{
for (int j = i + 1; j < 2 * N; j++)
{
if (found[i + 1]) break;
if (found[j + 1]) continue;
vector<int> p(2);
p[0] = i + 1;
p[1] = j + 1;
int result = Query(p);
//cout << p[0] << " " << p[1] << " " << result << "\n";
if (result == 1)
{
found[i + 1] = true;
found[j + 1] = true;
Answer(i + 1, j + 1);
//cout << "answer\n";
break;
}
}
}
/*
std::vector<int> p(3);
p[0] = 1;
p[1] = 2;
p[2] = 3;
variable_example = Query(p);
for (int i = 0; i < N; i++) {
Answer(i * 2 + 1, i * 2 + 2);
cout << "test\n";
}
*/
}
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |