QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#176592#6736. Alice and BobMaMengQiCompile Error//C++20310b2023-09-11 20:07:112023-09-11 20:07:11

詳細信息

answer.code:6:14: error: size of array ‘dp’ is not an integral constant-expression
    6 | long long dp[n] {
      |              ^
answer.code:6:11: error: conflicting declaration ‘long long int dp [1]’
    6 | long long dp[n] {
      |           ^~
answer.code:4:11: note: previous declaration as ‘long long int dp [1000001]’
    4 | long long dp[1000001];
      |           ^~
answer.code:7:3: error: expected primary-expression before ‘if’
    7 |   if (n == 1) {
      |   ^~
answer.code:7:3: error: expected ‘}’ before ‘if’
answer.code:6:17: note: to match this ‘{’
    6 | long long dp[n] {
      |                 ^
answer.code:11:3: error: expected unqualified-id before ‘if’
   11 |   if (dp[n] != 0) {
      |   ^~
answer.code:15:3: error: ‘dp’ does not name a type
   15 |   dp[n] = dp[n - 1] * [n - 1];
      |   ^~
answer.code:16:3: error: expected unqualified-id before ‘return’
   16 |   return dp[n];
      |   ^~~~~~
answer.code:17:1: error: expected declaration before ‘}’ token
   17 | }
      | ^