Submission #1132504

#TimeUsernameProblemLanguageResultExecution timeMemory
1132504KubetiCalvinball championship (CEOI15_teams)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; const int nmax = 1e5 + 1; int cnt = 0, n; int v[20], curr[20]; void bk(int ind, int mx) { if(ind == n + 1) { cnt++; for(int i = 1; i <= n; i++) { if(v[i] != curr[i]) { return; } } cout << cnt % mod; exit(0); } for(int i = 1; i <= mx; i++) { curr[ind] = i; bk(ind + 1, mx); } curr[ind] = mx + 1; bk(ind + 1, mx + 1); curr[ind] = 0; } int main(){ ios_base::sync_with_stdio(0);cin.tie(0); cin >> n; for(int i = 1; i <= n; i++) { cin >> v[i]; } bk(1, 0); return 0; }

Compilation message (stderr)

teams.cpp: In function 'void bk(int, int)':
teams.cpp:18:19: error: 'mod' was not declared in this scope; did you mean 'modf'?
   18 |     cout << cnt % mod;
      |                   ^~~
      |                   modf