Submission #1062525

#TimeUsernameProblemLanguageResultExecution timeMemory
1062525kunzaZa183Amusement Park (CEOI19_amusementpark)C++17
0 / 100
0 ms348 KiB
#include <algorithm> #include <bits/stdc++.h> using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); int n, m; cin >> n >> m; vector<int> ht(n); vector<pair<int, int>> vpii(m); for (auto &a : vpii) { cin >> a.first >> a.second; a.first--, a.second--; } iota(ht.begin(), ht.end(), 0); int sumc = 0; const int mod = 998244353; do { for (auto a : vpii) if ((ht[a.first] > ht[a.second])) { sumc++; } } while (next_permutation(ht.begin(), ht.end())); cout << sumc << "\n"; }

Compilation message (stderr)

amusementpark.cpp: In function 'int main()':
amusementpark.cpp:17:13: warning: unused variable 'mod' [-Wunused-variable]
   17 |   const int mod = 998244353;
      |             ^~~
#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...