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_39374767_13189.cpp:3:21: error: 'vector' has not been declared
    3 |     int maxSubArray(vector<int>& nums) {
      |                     ^~~~~~
0_0_39374767_13189.cpp:3:27: error: expected ',' or '...' before '<' token
    3 |     int maxSubArray(vector<int>& nums) {
      |                           ^
0_0_39374767_13189.cpp: In member function 'int Solution::maxSubArray(int)':
0_0_39374767_13189.cpp:4:20: error: 'INT_MAX' was not declared in this scope
    4 |         int sum = -INT_MAX,b = 0;
      |                    ^~~~~~~
0_0_39374767_13189.cpp:1:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
  +++ |+#include <climits>
    1 | class Solution {
0_0_39374767_13189.cpp:5:28: error: 'nums' was not declared in this scope
    5 |         for(int i = 0; i < nums.size(); i ++)
      |                            ^~~~
0_0_39374767_13189.cpp:7:13: error: 'b' was not declared in this scope
    7 |             b = b > 0 ? b + nums[i] : nums[i];
      |             ^
0_0_39374767_13189.cpp:8:19: error: 'max' was not declared in this scope
    8 |             sum = max(sum, b);
      |                   ^~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-06-21 13:51:16, Gzip enabled