제출 #606800

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6068002022-07-26 08:34:32ThMinh_Network (BOI15_net)C++14
63 / 100
674 ms262144 KiB
#include<bits/stdc++.h>
#define forin(i,a,b) for(int i=a;i<=b;++i)
#define forv(a,b) for(auto &a:b)
#define ii pair<int, int>
using namespace std;
const int N = 5e5+10;
int n, m, cnt, tim, root;
int low[N], num[N], color[N], vis[N], id[N];
vector<int> loop[N], ke[N];
vector<ii> adj[N], ans;
stack<int> st;
void anal(int u, int edad) {
low[u] = num[u] = ++tim;
vis[u] = 1; st.push(u);
forv(e, adj[u]) {
int v = e.first, eid = e.second;
if(edad == eid) continue;
if(!vis[v]) {
anal(v, eid);
low[u] = min(low[u], low[v]);
}
else if(vis[v] == 1) low[u] = min(low[u], num[v]);
}
if(low[u] == num[u]) {
int v; cnt++;
do {
v = st.top(); st.pop();
loop[cnt].push_back(v);
id[v] = cnt;
vis[v] = 2;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

net.cpp: In function 'int main()':
net.cpp:51:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   51 |   freopen("Task.inp","r",stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
net.cpp:52:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   52 |   freopen("WA.out","w",stdout);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
net.cpp:55:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   55 |   freopen("BlueHouse.inp","r",stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
net.cpp:56:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   56 |   freopen("BlueHouse.out","w",stdout);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...