Submission #647926

# Submission time Handle Problem Language Result Execution time Memory
647926 2022-10-04T16:29:08 Z beaconmc Stray Cat (JOI20_stray) C++14
Compilation error
0 ms 0 KB
#include "Anthony.h"

#include <bits/stdc++.h>

typedef long long ll;
using namespace std;


#define FOR(i, x, y) for(ll i=x; i<y; i++)
#define FORNEG(i, x, y) for(ll i=x; i>y; i--)

#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)

namespace{}


vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V) {
  vector<int> edges[N];
  FOR(i,0,M){
    edges[U[i]].push_back(V[i]);
    edges[V[i]].push_back(U[i]);
  }
  bool visited[N];
  FOR(i,0,N) visited[i] = false;


  vector<int> x(N);
  FOR(i,0,N) x[i] = 0;
  queue<vector<int>> q;

  q.push({0,0});
  while (q.size()){
    vector<int> node = q.front();
    q.pop();
    x[node[0]] = node[1]%3;
    for (auto&i : edges[node[0]]){
      if (!visited[i]){
        visited[i] = true;
        q.push({i, node[1]+1});
      }
    }

  }

  return x;

}
#include "Anthony.h"

#include <bits/stdc++.h>

typedef long long ll;
using namespace std;


#define FOR(i, x, y) for(ll i=x; i<y; i++)
#define FORNEG(i, x, y) for(ll i=x; i>y; i--)

#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)

namespace{}


vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V) {
  vector<int> edges[N];
  FOR(i,0,M){
    edges[U[i]].push_back(V[i]);
    edges[V[i]].push_back(U[i]);
  }
  bool visited[N];
  FOR(i,0,N) visited[i] = false;


  vector<int> x(N);
  FOR(i,0,N) x[i] = 0;
  queue<vector<int>> q;

  q.push({0,0});
  while (q.size()){
    vector<int> node = q.front();
    q.pop();
    x[node[0]] = node[1]%3;
    for (auto&i : edges[node[0]]){
      if (!visited[i]){
        visited[i] = true;
        q.push({i, node[1]+1});
      }
    }

  }

  return x;

}

Compilation message

/usr/bin/ld: /tmp/ccHlqBXi.o: in function `main':
grader_catherine.cpp:(.text.startup+0x41c): undefined reference to `Init(int, int)'
/usr/bin/ld: grader_catherine.cpp:(.text.startup+0xcfa): undefined reference to `Move(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status