Submission #864563

#TimeUsernameProblemLanguageResultExecution timeMemory
864563vnm06Duathlon (APIO18_duathlon)C++14
0 / 100
12 ms1680 KiB
#include<bits/stdc++.h> #define endl '\n' using namespace std; long long n, m; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>n>>m; for(int i=0; i<m; i++) { int v, u; cin>>v>>u; ///gr[v].push_back(u); ///gr[u].push_back(v); } if(m==n) cout<<n*(n-1)*(n-2)<<endl; else cout<<n*(n-1)*(n-2)/3<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...