0_0_39739846_31880\Main.java:5: 错误: 需要class, interface或enum
public clas Main{
^
0_0_39739846_31880\Main.java:6: 错误: 需要class, interface或enum
public static void main(String[] args) {
^
0_0_39739846_31880\Main.java:9: 错误: 需要class, interface或enum
int testCases = scanner.nextInt();
^
0_0_39739846_31880\Main.java:10: 错误: 需要class, interface或enum
scanner.nextLine(); // 读取换行符
^
0_0_39739846_31880\Main.java:11: 错误: 需要class, interface或enum
for (int i = 0; i < testCases; i++) {
^
0_0_39739846_31880\Main.java:11: 错误: 需要class, interface或enum
for (int i = 0; i < testCases; i++) {
^
0_0_39739846_31880\Main.java:11: 错误: 需要class, interface或enum
for (int i = 0; i < testCases; i++) {
^
0_0_39739846_31880\Main.java:14: 错误: 需要class, interface或enum
int n = Integer.parseInt(line[0]);
^
0_0_39739846_31880\Main.java:15: 错误: 需要class, interface或enum
String mode = line[1];
^
0_0_39739846_31880\Main.java:17: 错误: 需要class, interface或enum
Queue<Integer> queue = new LinkedList<>();
^
0_0_39739846_31880\Main.java:18: 错误: 需要class, interface或enum
Stack<Integer> stack = new Stack<>();
^
0_0_39739846_31880\Main.java:19: 错误: 需要class, interface或enum
boolean isQueue = "FIFO".equals(mode);
^
0_0_39739846_31880\Main.java:21: 错误: 需要class, interface或enum
for (int j = 0; j < n; j++) {
^
0_0_39739846_31880\Main.java:21: 错误: 需要class, interface或enum
for (int j = 0; j < n; j++) {
^
0_0_39739846_31880\Main.java:21: 错误: 需要class, interface或enum
for (int j = 0; j < n; j++) {
^
0_0_39739846_31880\Main.java:23: 错误: 需要class, interface或enum
if ("IN".equals(line[0])) {
^
0_0_39739846_31880\Main.java:25: 错误: 需要class, interface或enum
if (isQueue) {
^
0_0_39739846_31880\Main.java:27: 错误: 需要class, interface或enum
} else {
^
0_0_39739846_31880\Main.java:29: 错误: 需要class, interface或enum
}
^
0_0_39739846_31880\Main.java:33: 错误: 需要class, interface或enum
} else if (!stack.isEmpty()) {
^
0_0_39739846_31880\Main.java:35: 错误: 需要class, interface或enum
}
^
0_0_39739846_31880\Main.java:39: 错误: 需要class, interface或enum
System.out.print(queue.poll() + (queue.isEmpty() ? "" : " ")); }
^
0_0_39739846_31880\Main.java:43: 错误: 需要class, interface或enum
}
^
0_0_39739846_31880\Main.java:46: 错误: 需要class, interface或enum
}
^
0_0_39739846_31880\Main.java:48: 错误: 需要class, interface或enum
}
^
25 个错误
|