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_23474276_19801.cpp:2:9: error: expected ':' before 'static'
  public static void main(String[] args) {
         ^
0_0_23474276_19801.cpp:2:26: error: 'String' has not been declared
  public static void main(String[] args) {
                          ^
0_0_23474276_19801.cpp:2:35: error: expected ',' or '...' before 'args'
  public static void main(String[] args) {
                                   ^
0_0_23474276_19801.cpp:28:1: error: expected ';' after class definition
 }
 ^
0_0_23474276_19801.cpp: In static member function 'static void Main::main(int*)':
0_0_23474276_19801.cpp:3:3: error: 'Scanner' was not declared in this scope
   Scanner sc = new Scanner(System.in);
   ^
0_0_23474276_19801.cpp:4:9: error: 'sc' was not declared in this scope
   while(sc.hasNext()){
         ^
0_0_23474276_19801.cpp:9:24: error: initializer fails to determine size of 'a'
     int a[]=new int[N+1];
                        ^
0_0_23474276_19801.cpp:9:24: error: array must be initialized with a brace-enclosed initializer
0_0_23474276_19801.cpp:10:24: error: initializer fails to determine size of 'b'
     int b[]=new int[N+1];
                        ^
0_0_23474276_19801.cpp:10:24: error: array must be initialized with a brace-enclosed initializer
0_0_23474276_19801.cpp:11:24: error: initializer fails to determine size of 'f'
     int f[]=new int[V+1];
                        ^
0_0_23474276_19801.cpp:11:24: error: array must be initialized with a brace-enclosed initializer
0_0_23474276_19801.cpp:12:25: error: initializer fails to determine size of 'f1'
     int f1[]=new int[V+1];
                         ^
0_0_23474276_19801.cpp:12:25: error: array must be initialized with a brace-enclosed initializer
0_0_23474276_19801.cpp:13:25: error: request for member 'length' in 'a', which is of non-class type 'int [1]'
     for(int i = 1; i <a.length  ; i++){
                         ^
0_0_23474276_19801.cpp:16:25: error: request for member 'length' in 'b', which is of non-class type 'int [1]'
     for(int i = 1; i <b.length ; i++){
                         ^
0_0_23474276_19801.cpp:19:25: error: request for member 'length' in 'a', which is of non-class type 'int [1]'
     for(int i = 1; i <a.length  ; i++){
                         ^
0_0_23474276_19801.cpp:20:29: error: request for member 'length' in 'f', which is of non-class type 'int [1]'
      for(int j = a[i]; j <f.length  ; j++)
                             ^
0_0_23474276_19801.cpp:21:12: error: 'Math' was not declared in this scope
       f[j]=Math.max(f1[j],f1[j-a[i]]+b[i]); 
            ^
0_0_23474276_19801.cpp:22:11: error: request for member 'clone' in 'f', which is of non-class type 'int [1]'
      f1=f.clone();
           ^
0_0_23474276_19801.cpp:24:5: error: 'System' was not declared in this scope
     System.out.println(f1[V]);
     ^


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-11-29 21:11:53, Gzip enabled