제출 #655843

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6558432022-11-05 18:53:26manizareOne-Way Streets (CEOI17_oneway)C++17
60 / 100
522 ms262144 KiB
#include<bits/stdc++.h>
#define all(a) a.begin(),a.end()
#define pb push_back
using namespace std ;
const int maxn = 2e6 + 10 , maxq = 502 , inf = 1e9 , mod = 1e9+7 ;
vector <pair <int , int > > G[maxn] ;
vector <int> l[maxn] ;
int dp[maxn] , mark2[maxn] , mark[maxn] , par[maxn] , cnt = 1 ,c[maxn] , st[maxn] , en[maxn] , pr[maxn] , pp[maxn] , ans[maxn] , ok[maxn];
pair <int , int > ed[maxn] ;
void dfs(int v){
mark[v] = 1;
for(int i = 0; i < (int)G[v].size() ; i++){
int u = G[v][i].first , id = G[v][i].second ;
if(mark[u] == 1){
if(mark2[id] == 0){
dp[v] ++ ;
dp[u] -- ;
ans[id] = 3 ;
mark2[id] = 1;
}
continue ;
}
mark2[id] = 1;
par[u] = id ;
dfs(u) ;
dp[v]+=dp[u];
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

oneway.cpp: In function 'void dfs3(int)':
oneway.cpp:58:6: warning: unused variable 'ok' [-Wunused-variable]
   58 |  int ok = 0 ;
      |      ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...