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_36184061_27395.cpp:1:1: error: 'import' does not name a type
 import java.util.*;
 ^
0_0_36184061_27395.cpp:3:9: error: expected ':' before 'static'
  public static void main(String args[]){
         ^
0_0_36184061_27395.cpp:3:26: error: 'String' has not been declared
  public static void main(String args[]){
                          ^
0_0_36184061_27395.cpp:21:9: error: expected ':' before 'static'
  public static void dfs(boolean vis[],int a[],int i,int n){
         ^
0_0_36184061_27395.cpp:21:25: error: 'boolean' has not been declared
  public static void dfs(boolean vis[],int a[],int i,int n){
                         ^
0_0_36184061_27395.cpp:42:9: error: expected ':' before 'static'
  public static boolean sushu(int i){ //素数判断方法
         ^
0_0_36184061_27395.cpp:42:16: error: 'boolean' does not name a type
  public static boolean sushu(int i){ //素数判断方法
                ^
0_0_36184061_27395.cpp:50:1: error: expected ';' after class definition
 }
 ^
0_0_36184061_27395.cpp: In static member function 'static void Main::main(int*)':
0_0_36184061_27395.cpp:4:3: error: 'Scanner' was not declared in this scope
   Scanner sc=new Scanner(System.in);
   ^
0_0_36184061_27395.cpp:6:9: error: 'sc' was not declared in this scope
   while(sc.hasNext()){
         ^
0_0_36184061_27395.cpp:8:4: error: 'boolean' was not declared in this scope
    boolean vis[]=new boolean[n+1]; //标记数组,用于标记该数是否被用过
    ^
0_0_36184061_27395.cpp:9:21: error: initializer fails to determine size of 'a'
    int a[]=new int[n]; //装素数环的数组
                     ^
0_0_36184061_27395.cpp:9:21: error: array must be initialized with a brace-enclosed initializer
0_0_36184061_27395.cpp:11:5: error: 'vis' was not declared in this scope
     vis[i]=true; //初始化标记数组,true为该书未被使用过
     ^
0_0_36184061_27395.cpp:13:4: error: 'System' was not declared in this scope
    System.out.println("Case "+(t++)+":");  //输出格式Case t:
    ^
0_0_36184061_27395.cpp:13:37: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
    System.out.println("Case "+(t++)+":");  //输出格式Case t:
                                     ^
0_0_36184061_27395.cpp:15:4: error: 'vis' was not declared in this scope
    vis[1]=false;  //标记数字1已经被用过
    ^
0_0_36184061_27395.cpp: In static member function 'static void Main::dfs(int*, int*, int, int)':
0_0_36184061_27395.cpp:22:23: error: 'sushu' was not declared in this scope
   if(sushu(a[0]+a[n-1])&&i==n){ //递归跳出条件,当素数环数组中第一个数与最后 一个数相加为素数时,并输出素数环
                       ^
0_0_36184061_27395.cpp:25:6: error: 'System' was not declared in this scope
      System.out.println(a[j]);
      ^
0_0_36184061_27395.cpp:27:6: error: 'System' was not declared in this scope
      System.out.print(a[j]+" ");
      ^
0_0_36184061_27395.cpp:34:29: error: 'sushu' was not declared in this scope
    if(vis[j]&&sushu(a[i-1]+j)){ //如果该数没被用过并且与素数环中的  上一个数相加为素数则把它加入到素数环中
                             ^


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-20 01:41:00, Gzip enabled