Submission #710183

# Submission time Handle Problem Language Result Execution time Memory
710183 2023-03-15T05:34:47 Z penguin133 Stray Cat (JOI20_stray) C++17
0 / 100
41 ms 15048 KB
#include <bits/stdc++.h>
using namespace std;
#include "Anthony.h"
//#define int long long
#define pi pair<int, int>
#define pii pair<int, pi>
#define fi first
#define se second
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif
 
namespace {
 
int FunctionExample(int i, int A) {
  return i % A;
}
 
vector <int> adj[20005];
int dist[20005];
}  // namespace
 
std::vector<int> Mark(int N, int M, int A, int B,
                      std::vector<int> U, std::vector<int> V) {
  std::vector<int> X(M);
  for(int i=0;i<M;i++){
	  adj[U[i]].push_back(V[i]);
	  adj[V[i]].push_back(U[i]);
  }
  queue <int> qu;
  for(int i=0;i<N;i++)dist[i] = 1e9;
  dist[0] = 0;
  qu.push(0);
  while(!qu.empty()){
	  int x = qu.front(); qu.pop();
	  for(auto i : adj[x]){
		  if(dist[i] > dist[x] + 1)dist[i] = dist[x] + 1, qu.push(i);
	  }
  }
  for(int i=0;i<M;i++){
	  int x = max(dist[U[i]], dist[V[i]]);
	  X[i] = x % 2;
  }
  return X;
}
#include <bits/stdc++.h>
using namespace std;
#include "Catherine.h"
//#define int long long
#define pi pair<int, int>
#define pii pair<int, pi>
#define fi first
#define se second
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif
//mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
 
namespace {
 
int A, B;
int variable_example = 0;
 int used[20005][5];
}  // namespace
 
void Init(int A, int B) {
  ::A = A;
  ::B = B;
}
 
int Move(std::vector<int> y) {
  ++variable_example;
  if(variable_example%2){
	for(int j=A-1;j>=0;j--){
		if(y[j] == 1)return j;
    }
    return -1;
  }
  for (int j = 0; j < A; ++j) {
    if (y[j] == 1) {
      return j;
    }
  }
  return -1;
}

Compilation message

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

Catherine.cpp:18:6: warning: '{anonymous}::used' defined but not used [-Wunused-variable]
   18 |  int used[20005][5];
      |      ^~~~
# Verdict Execution time Memory Grader output
1 Incorrect 39 ms 15048 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 39 ms 15048 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 12912 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 12912 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 1284 KB Output is correct
2 Correct 1 ms 1024 KB Output is correct
3 Correct 2 ms 1280 KB Output is correct
4 Correct 2 ms 1292 KB Output is correct
5 Correct 2 ms 1284 KB Output is correct
6 Correct 2 ms 1336 KB Output is correct
7 Correct 2 ms 1288 KB Output is correct
8 Correct 2 ms 1292 KB Output is correct
9 Correct 2 ms 1284 KB Output is correct
10 Correct 2 ms 1356 KB Output is correct
11 Correct 2 ms 1280 KB Output is correct
12 Incorrect 2 ms 1284 KB Wrong Answer [6]
13 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 34 ms 11160 KB Output is correct
2 Correct 34 ms 12028 KB Output is correct
3 Correct 1 ms 1036 KB Output is correct
4 Correct 27 ms 11296 KB Output is correct
5 Correct 40 ms 13132 KB Output is correct
6 Correct 41 ms 13092 KB Output is correct
7 Correct 39 ms 12320 KB Output is correct
8 Incorrect 33 ms 12184 KB Wrong Answer [6]
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 30 ms 11240 KB Output is correct
2 Incorrect 30 ms 11796 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -