답안 #710213

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
710213 2023-03-15T05:46:09 Z penguin133 길고양이 (JOI20_stray) C++17
2 / 100
54 ms 15012 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 % 3;
  }
  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 prv= -1;
}  // namespace
 
void Init(int A, int B) {
  ::A = A;
  ::B = B;
}
 
int Move(std::vector<int> y) {
  ++variable_example;
  if(prv != -1){
	  prv--;
	  if(prv < 0)prv += A;
	  return prv;
  }
  vector <int> stuf;
  int x = -1;
  for(int j=0;j<A;j++){
	  if(y[j] == 1)stuf.push_back(j);
	  else x = j;
  }
  if((int)stuf.size() == 1){prv = stuf[0]; return stuf[0];}
  else{
	  if(x == 0)prv = 1;
	  else if(x == 1)prv = 2;
	  else prv = 0;
	  return prv;
  }
}

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) {
      |     ^~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 32 ms 15012 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 32 ms 15012 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 32 ms 12944 KB Output is correct
2 Correct 1 ms 1024 KB Output is correct
3 Correct 33 ms 12724 KB Output is correct
4 Correct 54 ms 14224 KB Output is correct
5 Correct 43 ms 14336 KB Output is correct
6 Correct 35 ms 13012 KB Output is correct
7 Correct 38 ms 12956 KB Output is correct
8 Correct 48 ms 13872 KB Output is correct
9 Correct 51 ms 14076 KB Output is correct
10 Correct 48 ms 13612 KB Output is correct
11 Correct 38 ms 13684 KB Output is correct
12 Correct 40 ms 13816 KB Output is correct
13 Correct 40 ms 13712 KB Output is correct
14 Correct 44 ms 14108 KB Output is correct
15 Correct 48 ms 14064 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 32 ms 12944 KB Output is correct
2 Correct 1 ms 1024 KB Output is correct
3 Correct 33 ms 12724 KB Output is correct
4 Correct 54 ms 14224 KB Output is correct
5 Correct 43 ms 14336 KB Output is correct
6 Correct 35 ms 13012 KB Output is correct
7 Correct 38 ms 12956 KB Output is correct
8 Correct 48 ms 13872 KB Output is correct
9 Correct 51 ms 14076 KB Output is correct
10 Correct 48 ms 13612 KB Output is correct
11 Correct 38 ms 13684 KB Output is correct
12 Correct 40 ms 13816 KB Output is correct
13 Correct 40 ms 13712 KB Output is correct
14 Correct 44 ms 14108 KB Output is correct
15 Correct 48 ms 14064 KB Output is correct
16 Incorrect 32 ms 11500 KB Wrong Answer [6]
17 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 1024 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 9 ms 2180 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 11 ms 2184 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -