제출 #964230

#제출 시각아이디문제언어결과실행 시간메모리
964230LucaIlie길고양이 (JOI20_stray)C++17
4 / 100
40 ms17168 KiB
#include "Anthony.h" #include <bits/stdc++.h> using namespace std; const int MAX_N = 2e4; bool vis[MAX_N]; int d[MAX_N]; vector<int> adj[MAX_N]; vector<int> Mark( int N, int M, int A, int B, vector<int> U, vector<int> V ) { vector<int> X( M ); for ( int i = 0; i < M; i++ ) { adj[U[i]].push_back( i ); adj[V[i]].push_back( i ); } queue<int> q; d[0] = 0; vis[0] = true; q.push( 0 ); while ( !q.empty() ) { int u = q.front(); q.pop(); for ( int e: adj[u] ) { int v = (U[e] == u ? V[e] : U[e]); X[e] = d[u]; if ( vis[v] ) continue; d[v] = (d[u] + 1) % 3; vis[v] = true; q.push( v ); } } return X; }
#include "Catherine.h" #include <bits/stdc++.h> using namespace std; void Init(int A, int B) { A = A; B = B; } int Move( vector<int> y ) { if ( y[0] > 0 && y[2] == 0 ) return 0; if ( y[1] > 0 && y[0] == 0 ) return 1; if ( y[2] > 0 && y[1] == 0 ) return 2; exit( 1 ); return -1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...