답안 #939043

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
939043 2024-03-06T04:16:57 Z Darren0724 길고양이 (JOI20_stray) C++17
15 / 100
39 ms 16652 KB
#include "Anthony.h"
#include <bits/stdc++.h>
using namespace std;

namespace {

int FunctionExample(int i, int A) {
  return i % A;
}
const int INF=1e9;
}  // namespace

vector<int> Mark(int N, int M, int A, int B,vector<int> U, vector<int> V) {
  	vector<int> v(M,-1),adj[N+1];
	queue<int> q;
  	vector<int> dis(N+1,INF);
	for(int i=0;i<M;i++){
		adj[U[i]].push_back(i);
		adj[V[i]].push_back(i);
	}
	q.push(0);
	dis[0]=0;
	while(q.size()){
		int p=q.front();
		q.pop();
		for(int j:adj[p]){
			if(v[j]==-1){
				v[j]=dis[p]%3;
			}
		}
		for(int i:adj[p]){
			int j=(U[i]==p?V[i]:U[i]);
			if(dis[j]==INF){
				dis[j]=dis[p]+1;
				v[i]=dis[p]%3;
				q.push(j);
			}
		}
	}
  	return v;
}
#include "Catherine.h"
#include <bits/stdc++.h>
using namespace std;
namespace {

int A, B;
int variable_example = 0;

}  // namespace

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

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

Compilation message

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

Catherine.cpp: In function 'int Move(std::vector<int>)':
Catherine.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
Catherine.cpp: At global scope:
Catherine.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    7 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 15480 KB Output is correct
2 Correct 1 ms 792 KB Output is correct
3 Correct 23 ms 14916 KB Output is correct
4 Correct 34 ms 16496 KB Output is correct
5 Correct 35 ms 16652 KB Output is correct
6 Correct 30 ms 15224 KB Output is correct
7 Correct 28 ms 15200 KB Output is correct
8 Correct 33 ms 15988 KB Output is correct
9 Correct 33 ms 15960 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 15480 KB Output is correct
2 Correct 1 ms 792 KB Output is correct
3 Correct 23 ms 14916 KB Output is correct
4 Correct 34 ms 16496 KB Output is correct
5 Correct 35 ms 16652 KB Output is correct
6 Correct 30 ms 15224 KB Output is correct
7 Correct 28 ms 15200 KB Output is correct
8 Correct 33 ms 15988 KB Output is correct
9 Correct 33 ms 15960 KB Output is correct
10 Correct 27 ms 13256 KB Output is correct
11 Correct 26 ms 13352 KB Output is correct
12 Correct 27 ms 13420 KB Output is correct
13 Correct 26 ms 13424 KB Output is correct
14 Correct 27 ms 13644 KB Output is correct
15 Correct 28 ms 14004 KB Output is correct
16 Correct 32 ms 15996 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 35 ms 12880 KB Output is correct
2 Correct 1 ms 776 KB Output is correct
3 Correct 23 ms 12808 KB Output is correct
4 Correct 33 ms 14456 KB Output is correct
5 Correct 32 ms 14272 KB Output is correct
6 Correct 27 ms 12904 KB Output is correct
7 Correct 30 ms 12920 KB Output is correct
8 Correct 33 ms 13760 KB Output is correct
9 Correct 31 ms 13644 KB Output is correct
10 Correct 37 ms 13420 KB Output is correct
11 Correct 34 ms 13516 KB Output is correct
12 Correct 28 ms 13432 KB Output is correct
13 Correct 34 ms 13428 KB Output is correct
14 Correct 31 ms 13676 KB Output is correct
15 Correct 31 ms 13692 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 35 ms 12880 KB Output is correct
2 Correct 1 ms 776 KB Output is correct
3 Correct 23 ms 12808 KB Output is correct
4 Correct 33 ms 14456 KB Output is correct
5 Correct 32 ms 14272 KB Output is correct
6 Correct 27 ms 12904 KB Output is correct
7 Correct 30 ms 12920 KB Output is correct
8 Correct 33 ms 13760 KB Output is correct
9 Correct 31 ms 13644 KB Output is correct
10 Correct 37 ms 13420 KB Output is correct
11 Correct 34 ms 13516 KB Output is correct
12 Correct 28 ms 13432 KB Output is correct
13 Correct 34 ms 13428 KB Output is correct
14 Correct 31 ms 13676 KB Output is correct
15 Correct 31 ms 13692 KB Output is correct
16 Correct 26 ms 11388 KB Output is correct
17 Correct 26 ms 11860 KB Output is correct
18 Correct 31 ms 11704 KB Output is correct
19 Correct 30 ms 11984 KB Output is correct
20 Correct 39 ms 12160 KB Output is correct
21 Correct 27 ms 12100 KB Output is correct
22 Correct 28 ms 14364 KB Output is correct
23 Correct 26 ms 12032 KB Output is correct
24 Correct 25 ms 12096 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 776 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 6 ms 2492 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 6 ms 2328 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -