제출 #1132504

#제출 시각아이디문제언어결과실행 시간메모리
1132504KubetiCalvinball championship (CEOI15_teams)C++20
컴파일 에러
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; }

컴파일 시 표준 에러 (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