# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
260837 |
2020-08-11T05:10:25 Z |
문홍윤(#5067) |
길고양이 (JOI20_stray) |
C++17 |
|
72 ms |
28556 KB |
#include "Anthony.h"
#include <bits/stdc++.h>
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
using namespace std;
typedef pair<int, int> pii;
static const int INF=1e9;
static int n, m, col[20010];
static vector<pii> link[20010];
static int que[20010], fr, re, d[20010];
static void col_typeA(){
que[++re]=0;
d[0]=1;
for(int i=1; i<n; i++)d[i]=INF;
for(fr=1; fr<=re; fr++){
for(auto i:link[que[fr]]){
if(d[i.F]<d[que[fr]])continue;
col[i.S]=d[que[fr]]%3+1;
if(d[i.F]==d[que[fr]])continue;
d[i.F]=d[que[fr]]+1;
que[++re]=i.F;
}
}
}
static void col_typeB(){
}
vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V){
n=N, m=M;
vector<int> ret(m);
for(int i=0; i<m; i++){
link[U[i]].eb(V[i], i);
link[V[i]].eb(U[i], i);
}
if(A>=3)col_typeA();
else col_typeB();
for(int i=0; i<m; i++)ret[i]=col[i]-1;
return ret;
}
/*
7 6 3 6 1
0 2
0 4
1 2
1 3
1 5
4 6
*/
#include "Catherine.h"
#include <bits/stdc++.h>
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
using namespace std;
typedef pair<int, int> pii;
int typ;
void Init(int A, int B){
if(A>=3)typ=1;
else typ=2;
}
int prvmv=-1;
int move_typeA(vector<int> vc){
if(vc.size()<3)while(1);
int cnt=0;
for(int i=0; i<3; i++){
if(vc[i]==1)cnt++;
}
if(cnt==1){
for(int i=0; i<3; i++){
if(vc[i]==1){
prvmv=i;
return i;
}
}
}
vc[prvmv]++;
for(int i=0; i<3; i++){
if(vc[i]==1){
prvmv=i;
return i;
}
}
}
int move_typeB(vector<int> vc){
return 0;
}
int Move(vector<int> y){
if(typ==1)return move_typeA(y);
return move_typeB(y);
}
Compilation message
Catherine.cpp: In function 'int move_typeA(std::vector<int>)':
Catherine.cpp:38:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
68 ms |
28556 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
68 ms |
28556 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
53 ms |
13428 KB |
Output is correct |
2 |
Correct |
1 ms |
1536 KB |
Output is correct |
3 |
Correct |
44 ms |
12820 KB |
Output is correct |
4 |
Correct |
72 ms |
14708 KB |
Output is correct |
5 |
Runtime error |
64 ms |
24820 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
53 ms |
13428 KB |
Output is correct |
2 |
Correct |
1 ms |
1536 KB |
Output is correct |
3 |
Correct |
44 ms |
12820 KB |
Output is correct |
4 |
Correct |
72 ms |
14708 KB |
Output is correct |
5 |
Runtime error |
64 ms |
24820 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
1536 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
13 ms |
3840 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
11 ms |
3840 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |