# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
967452 | Tuanlinh123 | Bitaro’s Party (JOI18_bitaro) | C++17 | 2077 ms | 242632 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define ll int
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ld long double
#define sz(a) ((ll)(a).size())
using namespace std;
const ll maxn=100005, s=150;
ll deg[maxn], seen[maxn];
vector <pll> best[maxn];
vector <ll> A[maxn], At[maxn];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
ll n, m, q; cin >> n >> m >> q;
for (ll i=1; i<=m; i++)
{
ll u, v; cin >> u >> v;
A[u].pb(v), At[v].pb(u), deg[v]++;
}
queue <ll> Q;
for (ll i=1; i<=n; i++)
if (!deg[i]) Q.push(i);
while (sz(Q))
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |