# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
260829 |
2020-08-11T04:47:02 Z |
최은수(#5044) |
길고양이 (JOI20_stray) |
C++17 |
|
67 ms |
16624 KB |
#include"Anthony.h"
#include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;
vector<int>Mark(int N,int M,int A,int B,vector<int>U,vector<int>V)
{
int n=N;
int m=M;
int a=A;
vector<vector<int> >adj(n);
for(int i=0;i<m;i++)
adj[U[i]].eb(V[i]),adj[V[i]].eb(U[i]);
if(a==2)
{
return vector<int>();
}
vector<int>dis(n,inf);
queue<int>q;
dis[0]=0;
q.ep(0);
while(!q.empty())
{
int x=q.front();
q.pop();
for(int&t:adj[x])
if(dis[t]==inf)
dis[t]=dis[x]+1,q.ep(t);
}
vector<int>col(m,0);
for(int i=0;i<m;i++)
col[i]=(dis[U[i]]+dis[V[i]])/2%3;
return col;
}
#include"Catherine.h"
#include<iostream>
#include<vector>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;
static int a;
void Init(int A,int B)
{
a=A;
return;
}
int Move(vector<int>y)
{
if(a==2)
{
return 0;
}
int c=0;
for(int i=0;i<3;i++)
if(y[i]>0)
c+=3+i;
if(c<6)
return c-3;
for(int i=0;i<3;i++)
if(y[i]==0)
return(i+1)%3;
return a;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
51 ms |
15320 KB |
Output is correct |
2 |
Correct |
0 ms |
644 KB |
Output is correct |
3 |
Correct |
41 ms |
14560 KB |
Output is correct |
4 |
Correct |
63 ms |
16372 KB |
Output is correct |
5 |
Correct |
63 ms |
16624 KB |
Output is correct |
6 |
Correct |
51 ms |
15044 KB |
Output is correct |
7 |
Correct |
52 ms |
15048 KB |
Output is correct |
8 |
Correct |
57 ms |
15840 KB |
Output is correct |
9 |
Correct |
56 ms |
15840 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
51 ms |
15320 KB |
Output is correct |
2 |
Correct |
0 ms |
644 KB |
Output is correct |
3 |
Correct |
41 ms |
14560 KB |
Output is correct |
4 |
Correct |
63 ms |
16372 KB |
Output is correct |
5 |
Correct |
63 ms |
16624 KB |
Output is correct |
6 |
Correct |
51 ms |
15044 KB |
Output is correct |
7 |
Correct |
52 ms |
15048 KB |
Output is correct |
8 |
Correct |
57 ms |
15840 KB |
Output is correct |
9 |
Correct |
56 ms |
15840 KB |
Output is correct |
10 |
Correct |
45 ms |
12920 KB |
Output is correct |
11 |
Correct |
46 ms |
13128 KB |
Output is correct |
12 |
Correct |
45 ms |
13164 KB |
Output is correct |
13 |
Correct |
45 ms |
13040 KB |
Output is correct |
14 |
Correct |
46 ms |
13192 KB |
Output is correct |
15 |
Correct |
55 ms |
13584 KB |
Output is correct |
16 |
Correct |
64 ms |
16092 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
48 ms |
12788 KB |
Output is correct |
2 |
Correct |
1 ms |
772 KB |
Output is correct |
3 |
Correct |
40 ms |
12412 KB |
Output is correct |
4 |
Correct |
63 ms |
14196 KB |
Output is correct |
5 |
Correct |
67 ms |
14148 KB |
Output is correct |
6 |
Correct |
47 ms |
12868 KB |
Output is correct |
7 |
Correct |
49 ms |
12860 KB |
Output is correct |
8 |
Correct |
59 ms |
13532 KB |
Output is correct |
9 |
Correct |
61 ms |
13656 KB |
Output is correct |
10 |
Correct |
53 ms |
13408 KB |
Output is correct |
11 |
Correct |
52 ms |
13404 KB |
Output is correct |
12 |
Correct |
54 ms |
13336 KB |
Output is correct |
13 |
Correct |
57 ms |
13300 KB |
Output is correct |
14 |
Correct |
56 ms |
13556 KB |
Output is correct |
15 |
Correct |
57 ms |
13660 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
48 ms |
12788 KB |
Output is correct |
2 |
Correct |
1 ms |
772 KB |
Output is correct |
3 |
Correct |
40 ms |
12412 KB |
Output is correct |
4 |
Correct |
63 ms |
14196 KB |
Output is correct |
5 |
Correct |
67 ms |
14148 KB |
Output is correct |
6 |
Correct |
47 ms |
12868 KB |
Output is correct |
7 |
Correct |
49 ms |
12860 KB |
Output is correct |
8 |
Correct |
59 ms |
13532 KB |
Output is correct |
9 |
Correct |
61 ms |
13656 KB |
Output is correct |
10 |
Correct |
53 ms |
13408 KB |
Output is correct |
11 |
Correct |
52 ms |
13404 KB |
Output is correct |
12 |
Correct |
54 ms |
13336 KB |
Output is correct |
13 |
Correct |
57 ms |
13300 KB |
Output is correct |
14 |
Correct |
56 ms |
13556 KB |
Output is correct |
15 |
Correct |
57 ms |
13660 KB |
Output is correct |
16 |
Correct |
41 ms |
11268 KB |
Output is correct |
17 |
Correct |
41 ms |
11416 KB |
Output is correct |
18 |
Correct |
45 ms |
11128 KB |
Output is correct |
19 |
Correct |
44 ms |
11268 KB |
Output is correct |
20 |
Correct |
52 ms |
11688 KB |
Output is correct |
21 |
Correct |
46 ms |
11384 KB |
Output is correct |
22 |
Correct |
54 ms |
13692 KB |
Output is correct |
23 |
Correct |
45 ms |
11392 KB |
Output is correct |
24 |
Correct |
44 ms |
11128 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
1012 KB |
Wrong Answer [1] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
11 ms |
3584 KB |
Wrong Answer [1] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
3584 KB |
Wrong Answer [1] |
2 |
Halted |
0 ms |
0 KB |
- |