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_38896745_9765.cpp:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
0_0_38896745_9765.cpp:1:1: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
0_0_38896745_9765.cpp:3:11: error: expected ':' before 'ArrayList'
    3 |     public ArrayList<Integer> stack=new ArrayList<Integer>();
      |           ^~~~~~~~~~
      |           :
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
    3 |     public ArrayList<Integer> stack=new ArrayList<Integer>();
      |                      ^~~~~~~
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:3:22: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:3:12: error: 'ArrayList' does not name a type
    3 |     public ArrayList<Integer> stack=new ArrayList<Integer>();
      |            ^~~~~~~~~
0_0_38896745_9765.cpp:4:11: error: expected ':' before 'Stack'
    4 |     public Stack(ArrayList<Integer> a){
      |           ^~~~~~
      |           :
0_0_38896745_9765.cpp:4:28: error: 'Integer' was not declared in this scope
    4 |     public Stack(ArrayList<Integer> a){
      |                            ^~~~~~~
0_0_38896745_9765.cpp:4:28: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:4:28: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:4:28: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:4:28: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:4:28: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:4:28: error: 'Integer' was not declared in this scope
0_0_38896745_9765.cpp:4:27: error: expected ')' before '<' token
    4 |     public Stack(ArrayList<Integer> a){
      |                 ~         ^
      |                           )
0_0_38896745_9765.cpp:7:11: error: expected ':' before 'Integer'
    7 |     public Integer pop(){
      |           ^~~~~~~~
      |           :
0_0_38896745_9765.cpp:7:12: error: 'Integer' does not name a type
    7 |     public Integer pop(){
      |            ^~~~~~~
0_0_38896745_9765.cpp:12:11: error: expected ':' before 'void'
   12 |     public void add(){
      |           ^~~~~
      |           :
0_0_38896745_9765.cpp:15:2: error: expected ';' after class definition
   15 | }
      |  ^
      |  ;
0_0_38896745_9765.cpp:16:1: error: expected unqualified-id before 'public'
   16 | public class Main {
      | ^~~~~~


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-12-01 14:00:04, Gzip enabled