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_39693747_16123\Main.java:5: 错误: 需要class, interface或enum
public Class HDU2019 {
       ^
0_0_39693747_16123\Main.java:17: 错误: 需要class, interface或enum
	public static void main(String[] args) {
	              ^
0_0_39693747_16123\Main.java:20: 错误: 需要class, interface或enum
		while (true) {
		^
0_0_39693747_16123\Main.java:22: 错误: 需要class, interface或enum
			String[] parts = line1.split(" "); // 按空格分割
			^
0_0_39693747_16123\Main.java:23: 错误: 需要class, interface或enum
			int n = Integer.parseInt(parts[0]);
			^
0_0_39693747_16123\Main.java:24: 错误: 需要class, interface或enum
			int m = Integer.parseInt(parts[1]);
			^
0_0_39693747_16123\Main.java:26: 错误: 需要class, interface或enum
			if (n == 0 && m == 0) {
			^
0_0_39693747_16123\Main.java:28: 错误: 需要class, interface或enum
			}
			^
0_0_39693747_16123\Main.java:31: 错误: 需要class, interface或enum
			String[] numbers = line2.split(" "); // 按空格分割数列
			^
0_0_39693747_16123\Main.java:34: 错误: 需要class, interface或enum
			LinkNode<Integer> head = new LinkNode<>(null); // 创建头节点
			^
0_0_39693747_16123\Main.java:35: 错误: 需要class, interface或enum
			LinkNode<Integer> current = head; // 当前节点指向头节点
			^
0_0_39693747_16123\Main.java:37: 错误: 需要class, interface或enum
			for (String numStr : numbers) {
			^
0_0_39693747_16123\Main.java:39: 错误: 需要class, interface或enum
				LinkNode<Integer> newNode = new LinkNode<>(value); // 创建新节点
				^
0_0_39693747_16123\Main.java:40: 错误: 需要class, interface或enum
				current.next = newNode; // 将当前节点的 next 指向新节点
				^
0_0_39693747_16123\Main.java:41: 错误: 需要class, interface或enum
				current = newNode; // 更新当前节点为新节点
				^
0_0_39693747_16123\Main.java:42: 错误: 需要class, interface或enum
			}
			^
0_0_39693747_16123\Main.java:46: 错误: 需要class, interface或enum
			LinkNode<Integer> prev = head; // 从头节点开始
			^
0_0_39693747_16123\Main.java:47: 错误: 需要class, interface或enum
			while (prev.next != null && prev.next.data < m) {
			^
0_0_39693747_16123\Main.java:49: 错误: 需要class, interface或enum
			}
			^
0_0_39693747_16123\Main.java:51: 错误: 需要class, interface或enum
			prev.next = newNode; // 前驱节点的 next 指向新节点
			^
0_0_39693747_16123\Main.java:54: 错误: 需要class, interface或enum
			LinkNode<Integer> currentNode = head.next; // 从头节点的下一个开始遍历
			^
0_0_39693747_16123\Main.java:55: 错误: 需要class, interface或enum
			while (currentNode != null) {
			^
0_0_39693747_16123\Main.java:57: 错误: 需要class, interface或enum
				currentNode = currentNode.next; // 移动到下一个节点
				^
0_0_39693747_16123\Main.java:58: 错误: 需要class, interface或enum
			}
			^
0_0_39693747_16123\Main.java:60: 错误: 需要class, interface或enum
		}
		^
0_0_39693747_16123\Main.java:63: 错误: 需要class, interface或enum
	}
	^
26 个错误


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-26 18:18:19, Gzip enabled