結果

問題 No.2663 Zero-Sum Submatrices
ユーザー tentententen
提出日時 2024-03-12 09:41:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 1,441 bytes
コンパイル時間 5,827 ms
コンパイル使用メモリ 89,268 KB
実行使用メモリ 56,284 KB
最終ジャッジ日時 2024-03-12 09:41:43
合計ジャッジ時間 11,065 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
54,792 KB
testcase_01 AC 78 ms
54,856 KB
testcase_02 AC 74 ms
54,856 KB
testcase_03 AC 78 ms
54,880 KB
testcase_04 AC 80 ms
54,872 KB
testcase_05 AC 89 ms
55,136 KB
testcase_06 AC 76 ms
54,824 KB
testcase_07 AC 74 ms
54,764 KB
testcase_08 AC 78 ms
54,900 KB
testcase_09 AC 84 ms
55,020 KB
testcase_10 AC 92 ms
55,128 KB
testcase_11 AC 74 ms
54,864 KB
testcase_12 AC 78 ms
54,868 KB
testcase_13 AC 89 ms
55,252 KB
testcase_14 AC 75 ms
54,864 KB
testcase_15 AC 75 ms
54,984 KB
testcase_16 AC 96 ms
55,136 KB
testcase_17 AC 79 ms
54,864 KB
testcase_18 AC 83 ms
54,864 KB
testcase_19 AC 84 ms
55,140 KB
testcase_20 AC 83 ms
55,012 KB
testcase_21 AC 89 ms
55,524 KB
testcase_22 AC 85 ms
55,004 KB
testcase_23 AC 84 ms
55,156 KB
testcase_24 AC 91 ms
55,524 KB
testcase_25 AC 102 ms
55,504 KB
testcase_26 AC 128 ms
53,516 KB
testcase_27 AC 97 ms
55,640 KB
testcase_28 AC 115 ms
55,772 KB
testcase_29 AC 119 ms
55,644 KB
testcase_30 AC 136 ms
56,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        int n = sc.nextInt();
        int m = sc.nextInt();
        String result = IntStream.range(0, 1 << n).mapToObj(i -> {
            return IntStream.range(0, 1 << m)
                .mapToObj(j -> String.valueOf((i << m) + j))
                .collect(Collectors.joining(" "));
        }).collect(Collectors.joining("\n"));
        System.out.println(result);
    }
}
class Scanner {
    BufferedReader br;
    StringTokenizer st = new StringTokenizer("");
    StringBuilder sb = new StringBuilder();
    
    public Scanner() {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
        } catch (Exception e) {
            
        }
    }
    
    public int nextInt() {
        return Integer.parseInt(next());
    }
    
    public long nextLong() {
        return Long.parseLong(next());
    }
    
    public double nextDouble() {
        return Double.parseDouble(next());
    }
    
    public String next() {
        try {
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            return st.nextToken();
        }
    }
    
}
0