QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#510975#8651. Table TennisMax_s_xaMCompile Error//C++14777b2024-08-09 14:47:522024-08-09 14:47:52

Judging History

你现在查看的是最新测评结果

  • [2024-08-09 14:47:52]
  • 评测
  • [2024-08-09 14:47:52]
  • 提交

answer

#include "island.h"
#include <iostream>

typedef long long ll;
typedef double lf;

using namespace std;

const int MAXN = 310;

int n;
bool e[MAXN][MAXN];
int fa[MAXN];
inline int Find(int k) { return k == fa[k] ? k : fa[k] = Find(fa[k]); }
inline void Union(int u, int v) { u = Find(u), v = Find(v); if (u != v) fa[v] = u; }

void solve(int N, int LMT)
{
    n = N;
    for (int i = 1; i <= n; i++) fa[i] = i;
    for (int i = 1; i < n; i++)
    {
        int u = query(1, i), c = 1;
        while (Find(u) != Find(1))
        {
            int v = query(u, c); c++;
            e[u][v] = e[v][u] = 1, Union(v, u);
        }
    }
    for (int i = 1; i < n; i++)
        for (int j = i + 1; j <= n; j++)
            if (e[i][j]) answer(i, j);
}

Details

answer.code:1:10: fatal error: island.h: No such file or directory
    1 | #include "island.h"
      |          ^~~~~~~~~~
compilation terminated.