Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
49259 Ghost_Chris 【AB-1】图 C++ 解答错误 0 22 MS 7512 KB 665 2022-05-05 13:10:39

Tests(0/10):


#include <bits/stdc++.h> using namespace std; const int N(200010); const long long mod(1e9 + 7); int n,m,T; int dp[N]; vector<int> g[N]; inline int read(){ register int x(0); register short w(1); register char c(getchar()); for (;c < '0' || c > '9';c = getchar()) if (c == '-') w = -1; for (;c >= '0' && c <= '9';c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48); return x * w; } int main(){ n = read(),m = read(),T = read(); for (int i(1);i <= m;i++){ int u(read()),v(read()); dp[u]++; g[u].push_back(v); } long long ans(1); for (int i(1);i <= n;i++) if (dp[i]) ans *= dp[i] % mod; cout << ans; return 0; }


测评信息: