제출 #445901

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4459012021-07-20 05:55:49negar_aOne-Way Streets (CEOI17_oneway)C++14
100 / 100
234 ms25440 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define S second
#define F first
#define pb push_back
#define mp make_pair
#define pii pair <int, int>
#define fast_io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int maxn = 1e5 + 5, lg = 20;
vector <int> adj[maxn];
int cnt[maxn], ps1[maxn], ps2[maxn], h[maxn], com[maxn];
int par[maxn][lg + 5], x[maxn], y[maxn];
bool mark[maxn];
void dfs(int v, int cm){
com[v] = cm;
bool f = false;
for(int u : adj[v]){
if(!com[u]){
par[u][0] = v;
h[u] = h[v] + 1;
for(int i = 1; i < lg; i ++){
par[u][i] = par[par[u][i - 1]][i - 1];
}
dfs(u, cm);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

oneway.cpp: In function 'void dfs(int, int)':
oneway.cpp:31:35: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   31 |   else if(((u != par[v][0]) or (u == par[v][0] & f)) && h[u] < h[v]){
      |                                 ~~^~~~~~~~~~~~
oneway.cpp: In function 'int main()':
oneway.cpp:96:7: warning: variable 'flag' set but not used [-Wunused-but-set-variable]
   96 |  bool flag = true;
      |       ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...