# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
689615 | tvladm2009 | Shell (info1cup18_shell) | C++17 | 437 ms | 78976 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = (int) 1e6 + 7;
const int M = (int) 1e9 + 7;
int a[N], special[N], degree[N], dp[N], order[N];
vector<int> in[N], out[N];
int main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n, m, p;
cin >> n >> m >> p;
for (int i = 1; i <= p; i++) {
cin >> a[i];
special[a[i]] = 1;
}
for (int i = 1; i <= m; i++) {
int x, y;
cin >> x >> y;
in[y].push_back(x);
out[x].push_back(y);
degree[y]++;
}
queue<int> q;
vector<int> depth(n + 1);
for (int i = 1; i <= n; i++) {
if (degree[i] == 0) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |