QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#752504#7895. Graph Partitioning 2ucup-team3932Compile Error//C++201.4kb2024-11-16 06:18:512024-11-16 06:18:51

Details

answer.code:6:24: error: ‘__gnu_pbds’ does not name a type
    6 | using SparseKnapsack = __gnu_pbds::gp_hash_table<int, int>;
      |                        ^~~~~~~~~~
answer.code: In function ‘void solve()’:
answer.code:23:12: error: ‘SparseKnapsack’ was not declared in this scope
   23 |     vector<SparseKnapsack> dp(N);
      |            ^~~~~~~~~~~~~~
answer.code:23:26: error: template argument 1 is invalid
   23 |     vector<SparseKnapsack> dp(N);
      |                          ^
answer.code:23:26: error: template argument 2 is invalid
answer.code: In lambda function:
answer.code:28:11: error: invalid types ‘int[int]’ for array subscript
   28 |         dp[u][1] = 1;
      |           ^
answer.code:32:49: error: invalid types ‘int[int]’ for array subscript
   32 |                 for (const auto& [i, val_i] : dp[u]) {
      |                                                 ^
answer.code:33:53: error: invalid types ‘int[const int]’ for array subscript
   33 |                     for (const auto& [j, val_j] : dp[v]) {
      |                                                     ^
answer.code:35:29: error: ‘result’ was not declared in this scope
   35 |                             result[i + j] = ((i64)val_i * val_j + result[i + j]) % MOD;
      |                             ^~~~~~
answer.code:39:19: error: invalid types ‘int[int]’ for array subscript
   39 |                 dp[u].swap(result);
      |                   ^
answer.code:39:28: error: ‘result’ was not declared in this scope
   39 |                 dp[u].swap(result);
      |                            ^~~~~~
answer.code:43:12: error: invalid types ‘int[int]’ for array subscript
   43 |         (dp[u][0] += dp[u][K] + dp[u][K + 1]) %= MOD;
      |            ^
answer.code:43:24: error: invalid types ‘int[int]’ for array subscript
   43 |         (dp[u][0] += dp[u][K] + dp[u][K + 1]) %= MOD;
      |                        ^
answer.code:43:35: error: invalid types ‘int[int]’ for array subscript
   43 |         (dp[u][0] += dp[u][K] + dp[u][K + 1]) %= MOD;
      |                                   ^
answer.code: In function ‘void solve()’:
answer.code:46:15: error: invalid types ‘int[int]’ for array subscript
   46 |     cout << dp[0][0] << "\n";
      |               ^