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_32398767_15670.cpp:1:1: error: 'import' does not name a type
 import java.util.Scanner;
 ^
0_0_32398767_15670.cpp:4:13: error: expected ':' before 'static'
     private static int cursor = 1;
             ^
0_0_32398767_15670.cpp:4:33: error: ISO C++ forbids in-class initialization of non-const static member 'Trie::cursor'
     private static int cursor = 1;
                                 ^
0_0_32398767_15670.cpp:5:13: error: expected ':' before 'static'
     private static int[][] trie = new int[1000005][26];
             ^
0_0_32398767_15670.cpp:5:23: error: expected unqualified-id before '[' token
     private static int[][] trie = new int[1000005][26];
                       ^
0_0_32398767_15670.cpp:6:13: error: expected ':' before 'static'
     private static int[] val = new int[1000005];
             ^
0_0_32398767_15670.cpp:6:23: error: expected unqualified-id before '[' token
     private static int[] val = new int[1000005];
                       ^
0_0_32398767_15670.cpp:8:12: error: expected ':' before 'static'
     public static void bulidTrie(String s) {
            ^
0_0_32398767_15670.cpp:8:34: error: 'String' has not been declared
     public static void bulidTrie(String s) {
                                  ^
0_0_32398767_15670.cpp:20:12: error: expected ':' before 'static'
     public static int findPrefixNum(String s) {
            ^
0_0_32398767_15670.cpp:20:37: error: 'String' has not been declared
     public static int findPrefixNum(String s) {
                                     ^
0_0_32398767_15670.cpp:32:1: error: expected ';' after class definition
 }
 ^
0_0_32398767_15670.cpp: In static member function 'static void Trie::bulidTrie(int)':
0_0_32398767_15670.cpp:10:30: error: request for member 'length' in 's', which is of non-class type 'int'
         for(int i = 0; i < s.length(); i++) {
                              ^
0_0_32398767_15670.cpp:11:25: error: request for member 'charAt' in 's', which is of non-class type 'int'
             int col = s.charAt(i) - 'a';
                         ^
0_0_32398767_15670.cpp:12:16: error: 'trie' was not declared in this scope
             if(trie[u][col] == 0) {
                ^
0_0_32398767_15670.cpp:15:17: error: 'trie' was not declared in this scope
             u = trie[u][col];
                 ^
0_0_32398767_15670.cpp:16:13: error: 'val' was not declared in this scope
             val[u]++;
             ^
0_0_32398767_15670.cpp: In static member function 'static int Trie::findPrefixNum(int)':
0_0_32398767_15670.cpp:22:30: error: request for member 'length' in 's', which is of non-class type 'int'
         for(int i = 0; i < s.length(); i++) {
                              ^
0_0_32398767_15670.cpp:23:21: error: request for member 'charAt' in 's', which is of non-class type 'int'
             col = s.charAt(i) - 'a';
                     ^
0_0_32398767_15670.cpp:24:16: error: 'trie' was not declared in this scope
             if(trie[u][col] == 0) {
                ^
0_0_32398767_15670.cpp:27:17: error: 'trie' was not declared in this scope
             u = trie[u][col];
                 ^
0_0_32398767_15670.cpp:29:16: error: 'val' was not declared in this scope
         return val[u];
                ^
0_0_32398767_15670.cpp: At global scope:
0_0_32398767_15670.cpp:33:1: error: expected unqualified-id before 'public'
 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-07-06 05:47:29, Gzip enabled