답안 #212103

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
212103 2020-03-22T09:22:39 Z M0REDA 카멜레온의 사랑 (JOI20_chameleon) C++14
0 / 100
5 ms 384 KB
#include <bits/stdc++.h>
#include "chameleon.h"
#define debug(x) cerr << #x << " = " << x << ", ";
#define ll long long
#define pb push_back
using namespace std;
#define FAST_IO                       \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL);
void Solve(int N)
{
    vector<vector<int>> v(2 * N + 1);
    vector<int> graph(2 * N + 1, -1);
    for (int i = 1; i <= 2 * N; i++)
    {
        for (int j = i + 1; j <= 2 * N && v[i].size() < 3; j++)
        {
            vector<int> p;
            p.pb(i);
            p.pb(j);
            if (Query(p) == 1)
            {
                v[i].pb(j);
                v[j].pb(i);
            }
        }
    }
    for (auto a : v)
    {
        for (auto b : a){
            cout << b <<" ";
        }
        cout <<endl;
    }
    // for (int i = 1; i <= 2 * N; i++)
    // {
    //     for (int j = 0; j < 3 && graph[i] == -1; j++)
    //     {
    //         for (int k = j + 1; k < 3; k++)
    //         {
    //             vector<int> p;
    //             p.pb(i);
    //             p.pb(v[i][j]);
    //             p.pb(v[i][k]);
    //             if (Query(p) == 1)
    //             {
    //                 graph[i] = v[i][3 - j - k];
    //                 break;
    //             }
    //         }
    //     }
    // }
    // for (int i = 1; i <= 2 * N; i++)
    // {
    //     for (int j = 0; j < 3; j++)
    //     {
    //         if (v[i][j] == graph[i] || i == graph[v[i][j]])
    //         {
    //             continue;
    //         }
    //         Answer(i, v[i][j]);
    //         break;
    //     }
    // }
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 384 KB Line [name=secret] equals to "", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 384 KB Line [name=secret] equals to "", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 384 KB Line [name=secret] equals to "", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 384 KB Line [name=secret] equals to "", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 384 KB Line [name=secret] equals to "", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -