제출 #897234

#제출 시각아이디문제언어결과실행 시간메모리
897234box길고양이 (JOI20_stray)C++17
15 / 100
36 ms16696 KiB
#include "Anthony.h"
#include <vector>

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

#ifdef LOCAL
template <class T, class... U> void bug_h(const T& t, const U&... u) { cerr << t; ((cerr << " | " << u), ...); cerr << endl; }
#define bug(...) cerr << "L" << __LINE__ << " [" << #__VA_ARGS__ << "]: ", bug_h(__VA_ARGS__)
#else
#define cerr if (0) cerr
#define bug(...)
#endif

#define ar array
#define all(v) std::begin(v), std::end(v)
#define sz(v) int(std::size(v))
typedef long long i64;
typedef vector<int> vi;
typedef pair<int, int> pi;

namespace {

int FunctionExample(int i, int A) {
  return i % A;
}

}  // namespace

vi Mark(int N, int M, int A, int B, vi U, vi V) {
  vi X(M);
  vector<vi> adj(N);
  for (int i = 0; i < M; i++) {
    adj[U[i]].push_back(i);
    adj[V[i]].push_back(i);
  }
  vi D(N, -1);
  queue<int> qu;
  D[0] = 0, qu.push(0);
  while (sz(qu)) {
    int i = qu.front(); qu.pop();
    for (int h : adj[i]) {
      int j = i ^ U[h] ^ V[h];
      if (D[j] == -1) {
        D[j] = D[i] + 1;
        qu.push(j);
      }
    }
  }
  for (int i = 0; i < M; i++) {
    X[i] = min(D[U[i]], D[V[i]]) % 3;
  }
  return X;
}
#include "Catherine.h"
#include <vector>

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

#ifdef LOCAL
template <class T, class... U> void bug_h(const T& t, const U&... u) { cerr << t; ((cerr << " | " << u), ...); cerr << endl; }
#define bug(...) cerr << "L" << __LINE__ << " [" << #__VA_ARGS__ << "]: ", bug_h(__VA_ARGS__)
#else
#define cerr if (0) cerr
#define bug(...)
#endif

#define ar array
#define all(v) std::begin(v), std::end(v)
#define sz(v) int(std::size(v))
typedef long long i64;
typedef vector<int> vi;
typedef pair<int, int> pi;

namespace {

int A, B;
int variable_example = 0;

}  // namespace

void Init(int A, int B) {
  ::A = A;
  ::B = B;
}

int Move(vi y) {
  if (!y[0]) return y[1] ? 1 : 2;
  if (!y[1]) return y[2] ? 2 : 0;
  if (!y[2]) return y[0] ? 0 : 1;
  return -1;
}

컴파일 시 표준 에러 (stderr) 메시지

Anthony.cpp:24:5: warning: 'int {anonymous}::FunctionExample(int, int)' defined but not used [-Wunused-function]
   24 | int FunctionExample(int i, int A) {
      |     ^~~~~~~~~~~~~~~

Catherine.cpp:25:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   25 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...