QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#145074#1133. Monster GameMohammed_AtalahCompile Error//C++201.4kb2023-08-21 21:22:492023-08-21 21:22:52

Judging History

This is the latest submission verdict.

  • [2023-08-21 21:22:52]
  • Judged
  • [2023-08-21 21:22:49]
  • Submitted

answer

#include "doll.h"
#include <bits/stdc++.h>
using namespace std;

void create_circuit(int M, std::vector<int> A)
{
  int n = A.size();
  int m = M;
  vector<vector<int>> edg(m + 1);
  vector<int> c(m + 1);
  c[0] = A[0];
  vector<int> x;
  vector<int> y;
  for (int i = 0; i < n - 1; i++)
  {
    edg[A[i]].push_back(A[i + 1]);
  }
  edg[A[n - 1]].push_back(0);
  int last = 0;

  for (int i = 1; i <= m; i++)
  {
    int sz = edg[i].size();
    if (sz == 0)
    {
      c[i] = i;
    }
    else if (sz == 1)
    {
      // cout << "hello" << endl;
      c[i] = edg[i][0];
    }
    else if (sz == 2)
    {
      c[i] = (last + 1) * -1;
      x.push_back(edg[i][0]);
      y.push_back(edg[i][1]);
      last++;
    }
    else if (sz == 3)
    {
      c[i] = (last + 1) * -1;
      x.push_back((last + 2) * -1);
      y.push_back((last + 3) * -1);
      x.push_back(edg[i][0]);
      y.push_back((last + 1) * -1);
      x.push_back(edg[i][1]);
      y.push_back(edg[i][2]);
      last += 3;
    }
    else
    {
      c[i] = (last + 1) * -1;
      x.push_back((last + 2) * -1);
      y.push_back((last + 3) * -1);
      x.push_back(edg[i][0]);
      y.push_back(edg[i][2]);
      x.push_back(edg[i][1]);
      y.push_back(edg[i][3]);
      last += 3;
    }
  }
  // for (auto &i : c)
  // {
  //   cout << i << " ";
  // }
  // cout << endl;
  // c[A[n - 1]] = 0;
  answer(c, x, y);
}

Details

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