제출 #1196387

#제출 시각아이디문제언어결과실행 시간메모리
1196387anmattroi게임 (APIO22_game)C++17
0 / 100
3 ms7816 KiB
#include "game.h"
#include <bits/stdc++.h>
#define maxn 300005

using namespace std;

int n, k;
int cl[30005][1005];
vector<int> adj[maxn];


void init(int n, int k) {
    ::n = n; ::k = k;
    for (int i = 0; i < k-1; i++) adj[i].emplace_back(i+1);
    for (int i = 0; i < k; i++) for (int j = 0; j <= i; j++) cl[i][j] = 1;
}

int add_teleporter(int u, int v) {
    if (v <= u) return 1;
    return 0;
//    if (u == v && u < k) return 1;
//    if (u < k && v < k && v <= u) return 1;
//    adj[u].emplace_back(v);
//
//    for (int o = 0; o < k; o++)
//    if (cl[u][o] && !cl[v][o]) {
//        queue<int> q; q.emplace(v);
//        cl[v][o] = 1;
//        while (!q.empty()) {
//            int x = q.front(); q.pop();
//            for (int y : adj[x]) {
//                if (y <= o) return 1;
//                if (!cl[y][o]) {
//                    cl[y][o] = 1;
//                    q.emplace(y);
//                }
//            }
//        }
//    }
//    return 0;
}
/*
4 3 2
1 3
2 0
3 2

2
*/
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...