/ Vijos /

记录详情

Compile Error

foo.cc:6:1: error: '__uint128' does not name a type; did you mean '__uint128_t'?
 __uint128 dp[101][101];
 ^~~~~~~~~
 __uint128_t
foo.cc: In function 'int main()':
foo.cc:11:2: error: expected ';' before 'vector'
  vector<vector<__uint128>> matrix(n, vector<__uint128>(m));
  ^~~~~~
foo.cc:14:35: error: 'matrix' was not declared in this scope
   for (int j = 0; j < m; j++)cin>>matrix[i][j];
                                   ^~~~~~
foo.cc:14:35: note: suggested alternative: 'main'
   for (int j = 0; j < m; j++)cin>>matrix[i][j];
                                   ^~~~~~
                                   main
foo.cc:16:2: error: '__uint128' was not declared in this scope
  __uint128 res = 0;
  ^~~~~~~~~
foo.cc:16:2: note: suggested alternative: '__uint128_t'
  __uint128 res = 0;
  ^~~~~~~~~
  __uint128_t
foo.cc:19:10: error: 'dp' was not declared in this scope
   memset(dp, 0, sizeof(dp));
          ^~
foo.cc:20:13: error: expected ';' before 'curBonus'
   __uint128 curBonus = 1 << m;
             ^~~~~~~~
foo.cc:21:41: error: 'curBonus' was not declared in this scope
   for (int j = 0; j < m; j++)dp[j][j] = curBonus * matrix[i][j];
                                         ^~~~~~~~
foo.cc:21:52: error: 'matrix' was not declared in this scope
   for (int j = 0; j < m; j++)dp[j][j] = curBonus * matrix[i][j];
                                                    ^~~~~~
foo.cc:21:52: note: suggested alternative: 'main'
   for (int j = 0; j < m; j++)dp[j][j] = curBonus * matrix[i][j];
                                                    ^~~~~~
                                                    main
foo.cc:24:4: error: 'curBonus' was not declared in this scope
    curBonus >>= 1;
    ^~~~~~~~
foo.cc:27:54: error: 'matrix' was not declared in this scope
     dp[k][k + j] = max(dp[k][k + j - 1] + curBonus * matrix[i][k + j], curBonus*matrix[i][k] + dp[k + 1][k + j]);
                                                      ^~~~~~
foo.cc:27:54: note: suggested alternative: 'main'
     dp[k][k + j] = max(dp[k][k + j - 1] + curBonus * matrix[i][k + j], curBonus*matrix[i][k] + dp[k + 1][k + j]);
                                                      ^~~~~~
                                                      main
foo.cc:30:3: error: 'res' was not declared in this scope
   res += dp[0][m - 1];
   ^~~
foo.cc:32:8: error: 'res' was not declared in this scope
  cout<<res<<endl;
        ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1378 矩阵取数游戏
语言
C++
递交时间
2021-11-29 10:29:11
评测时间
2021-11-29 10:29:11
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes