QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#268590#6736. Alice and Bobucup-team2499#Compile Error//C++20999b2023-11-28 18:50:592023-11-28 18:50:59

Details

answer.code: In function ‘int main()’:
answer.code:32:10: error: ‘function’ is not a member of ‘std’
   32 |     std::function<int(int, int)> binom = [&](int n, int m) {
      |          ^~~~~~~~
answer.code:3:1: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
    2 | #include <vector>
  +++ |+#include <functional>
    3 | 
answer.code:32:31: error: expression list treated as compound expression in functional cast [-fpermissive]
   32 |     std::function<int(int, int)> binom = [&](int n, int m) {
      |                               ^
answer.code:32:19: error: expected primary-expression before ‘int’
   32 |     std::function<int(int, int)> binom = [&](int n, int m) {
      |                   ^~~
answer.code:38:26: error: ‘binom’ was not declared in this scope
   38 |         ans = (ans + (ll)binom(n - x, x - 1) * fact[n - x] % MOD * fact[x - 1]) % MOD;
      |                          ^~~~~