Submission #410008

#TimeUsernameProblemLanguageResultExecution timeMemory
410008534351Connecting Supertrees (IOI20_supertrees)C++17
11 / 100
230 ms27896 KiB
#include "supertrees.h"
#include <bits/stdc++.h>

using namespace std;

template<class T, class U>
void ckmin(T &a, U b)
{
    if (a > b) a = b;
}

template<class T, class U>
void ckmax(T &a, U b)
{
    if (a < b) a = b;
}

#define MP make_pair
#define PB push_back
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define FOR(i, a, b) for (auto i = (a); i < (b); i++)
#define FORD(i, a, b) for (auto i = (a) - 1; i >= (b); i--)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int) (x).size())

const int MAXN = 1013;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpi;
typedef vector<pll> vpl;

int N;
int grid[MAXN][MAXN];
vpi ans;

int construct(std::vector<std::vector<int>> p)
{
	N = SZ(p);
    FOR(i, 0, N)
    {
        FOR(j, 0, N)
        {
            grid[i][j] = p[i][j];
        }
    }
    vector<vi> ret;
    ret.resize(N);
    FOR(i, 0, N)
    {
        ret[i].resize(N);
        fill(ALL(ret[i]), 0);
        if (i != 0)
        {
            ret[i][i - 1] = 1;
        }
        if (i != N - 1)
        {
            ret[i][i + 1] = 1;
        }
    }
    build(ret);
    return 1;
}
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...