/ Vijos /

记录详情

Compile Error

./Main.java:2: error: class, interface, enum, or record expected
    static Set<String> set = new HashSet<>();
           ^
./Main.java:3: error: class, interface, enum, or record expected
    static int n = 0;
           ^
./Main.java:5: error: class, interface, enum, or record expected
    public static void main(String[] args) {
                  ^
./Main.java:7: error: class, interface, enum, or record expected
        s.useDelimiter("[ \n]");
        ^
./Main.java:8: error: class, interface, enum, or record expected
        String num = s.next();
        ^
./Main.java:9: error: class, interface, enum, or record expected
        int k = s.nextInt();
        ^
./Main.java:10: error: class, interface, enum, or record expected
        n = k;
        ^
./Main.java:11: error: class, interface, enum, or record expected
        Map<Character, List<Character>> map = new HashMap<>();
        ^
./Main.java:12: error: class, interface, enum, or record expected
        for (int i = 0; i < k; i++) {
        ^
./Main.java:12: error: class, interface, enum, or record expected
        for (int i = 0; i < k; i++) {
                        ^
./Main.java:12: error: class, interface, enum, or record expected
        for (int i = 0; i < k; i++) {
                               ^
./Main.java:14: error: class, interface, enum, or record expected
            char b = (char) ('0' + s.nextInt());
            ^
./Main.java:15: error: class, interface, enum, or record expected
            List<Character> l = map.getOrDefault(a, new ArrayList<>());
            ^
./Main.java:16: error: class, interface, enum, or record expected
            l.add(b);
            ^
./Main.java:17: error: class, interface, enum, or record expected
            map.put(a, l);
            ^
./Main.java:18: error: class, interface, enum, or record expected
        }
        ^
./Main.java:20: error: class, interface, enum, or record expected
        cal(map, num);
        ^
./Main.java:21: error: class, interface, enum, or record expected
        System.out.println(set.size());
        ^
./Main.java:22: error: class, interface, enum, or record expected
        System.out.println(set);
        ^
./Main.java:23: error: class, interface, enum, or record expected
    }
    ^
./Main.java:28: error: class, interface, enum, or record expected
        que.offer(num);
        ^
./Main.java:29: error: class, interface, enum, or record expected
        while (!que.isEmpty()) {
        ^
./Main.java:31: error: class, interface, enum, or record expected
            for (int i = 0; i < size; i++) {
            ^
./Main.java:31: error: class, interface, enum, or record expected
            for (int i = 0; i < size; i++) {
                            ^
./Main.java:31: error: class, interface, enum, or record expected
            for (int i = 0; i < size; i++) {
                                      ^
./Main.java:33: error: class, interface, enum, or record expected
                for (int j = 0; j < s.length(); j++) {
                ^
./Main.java:33: error: class, interface, enum, or record expected
                for (int j = 0; j < s.length(); j++) {
                                ^
./Main.java:33: error: class, interface, enum, or record expected
                for (int j = 0; j < s.length(); j++) {
                                                ^
./Main.java:36: error: class, interface, enum, or record expected
                        arr[j] = c;
                        ^
./Main.java:37: error: class, interface, enum, or record expected
                        String temp = new String(arr);
                        ^
./Main.java:38: error: class, interface, enum, or record expected
                        if (!set.contains(temp)) {
                        ^
./Main.java:40: error: class, interface, enum, or record expected
                            que.offer(temp);
                            ^
./Main.java:41: error: class, interface, enum, or record expected
                        }
                        ^
33 errors
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1129 产生数
语言
Java
递交时间
2022-07-09 06:39:43
评测时间
2022-07-09 06:39:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes