Submission #647934

# Submission time Handle Problem Language Result Execution time Memory
647934 2022-10-04T16:34:56 Z beaconmc Stray Cat (JOI20_stray) C++14
0 / 100
47 ms 16084 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];
    for (auto&i : edges[node[0]]){
      if (!visited[i]){
        visited[i] = true;
        q.push({i, node[1]+1});
      }
    }
  }
  vector<int> ans(M);
  FOR(i,0,M){
    ans[i] = (min(x[U[i]], x[V[i]])%3);
  }
  

  return ans;

}
#include "Catherine.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 {

int A, B;
int variable_example = 0;

}  // namespace

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

int Move(std::vector<int> y) {
  if (!y[0] && y[1] && y[2]){
    return 1;
  }
  if (y[0] && !y[1] && y[2]){
    return 2;
  }
  if (y[0] && y[1] && !y[2]){
    return 0;

  }
  if (y[0] && !y[1] && !y[2]){
    return 0;
  }
  if (!y[0] && y[1] && !y[2]){
    return 1;
  }
  if (!y[0] && !y[1] && y[2]){
    return 2;

  }
}

Compilation message

Catherine.cpp: In function 'int Move(std::vector<int>)':
Catherine.cpp:46:1: warning: control reaches end of non-void function [-Wreturn-type]
   46 | }
      | ^
Catherine.cpp: At global scope:
Catherine.cpp:16:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   16 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 46 ms 15716 KB Output is correct
2 Correct 2 ms 488 KB Output is correct
3 Incorrect 36 ms 16084 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 46 ms 15716 KB Output is correct
2 Correct 2 ms 488 KB Output is correct
3 Incorrect 36 ms 16084 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 47 ms 13296 KB Output is correct
2 Correct 2 ms 596 KB Output is correct
3 Incorrect 41 ms 13432 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 47 ms 13296 KB Output is correct
2 Correct 2 ms 596 KB Output is correct
3 Incorrect 41 ms 13432 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 648 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 13 ms 2696 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 13 ms 2708 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -