백준 4013 ATM
문제 URL : https://www.acmicpc.net/problem/4013문제 접근법 : scc + topology or bfs를 이용한문제입니다. scc를 구성한후 새로운 그래프를 다시만들어준후topology or bfs를 이용해서 최종답을 구해주면 됩니다. 자세한 건 소스코드 주석에 달았습니다. 소스코드:#include using namespace std;#define ll long longvector> v,scc_v;vector check,st,finished,atm,restaurant,scc_atm,dp;vector scc_restaurant,scc_indegree;int n,m;int s,p;int cnt,scc;void input(){ cin>>n>>m; v= vector>..
2025. 1. 15.