F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38888067_15835.cpp:3:20: error: 'vector' has not been declared
    3 |     bool stoneGame(vector<int>& piles) {
      |                    ^~~~~~
0_0_38888067_15835.cpp:3:26: error: expected ',' or '...' before '<' token
    3 |     bool stoneGame(vector<int>& piles) {
      |                          ^
0_0_38888067_15835.cpp: In member function 'bool Solution::stoneGame(int)':
0_0_38888067_15835.cpp:14:17: error: 'piles' was not declared in this scope
   14 |         int n = piles.size();
      |                 ^~~~~
0_0_38888067_15835.cpp:15:16: error: 'vector' was not declared in this scope
   15 |         vector<vector<int>> dps(n);
      |                ^~~~~~
0_0_38888067_15835.cpp:15:23: error: expected primary-expression before 'int'
   15 |         vector<vector<int>> dps(n);
      |                       ^~~
0_0_38888067_15835.cpp:18:17: error: 'dps' was not declared in this scope
   18 |                 dps[i].resize(n);
      |                 ^~~
0_0_38888067_15835.cpp:23:17: error: 'dps' was not declared in this scope
   23 |                 dps[i][i] = piles[i];
      |                 ^~~
0_0_38888067_15835.cpp:32:25: error: 'dps' was not declared in this scope
   32 |                         dps[j][d + j] = max(piles[j] - dps[j + 1][d + j], piles[d + j] - dps[j][d + j - 1]);
      |                         ^~~
0_0_38888067_15835.cpp:32:41: error: 'max' was not declared in this scope
   32 |                         dps[j][d + j] = max(piles[j] - dps[j + 1][d + j], piles[d + j] - dps[j][d + j - 1]);
      |                                         ^~~
0_0_38888067_15835.cpp:35:16: error: 'dps' was not declared in this scope
   35 |         return dps[0][n - 1]>0;
      |                ^~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-01-11 03:58:15, Gzip enabled