結果

問題 No.2663 Zero-Sum Submatrices
ユーザー ks2mks2m
提出日時 2024-03-08 21:12:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 200 ms / 2,000 ms
コード長 503 bytes
コンパイル時間 4,866 ms
コンパイル使用メモリ 74,488 KB
実行使用メモリ 58,092 KB
最終ジャッジ日時 2024-03-08 21:12:59
合計ジャッジ時間 11,030 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
57,708 KB
testcase_01 AC 127 ms
57,820 KB
testcase_02 AC 128 ms
57,828 KB
testcase_03 AC 125 ms
57,696 KB
testcase_04 AC 128 ms
57,820 KB
testcase_05 AC 120 ms
56,788 KB
testcase_06 AC 129 ms
57,836 KB
testcase_07 AC 146 ms
57,708 KB
testcase_08 AC 126 ms
57,684 KB
testcase_09 AC 129 ms
57,692 KB
testcase_10 AC 136 ms
57,820 KB
testcase_11 AC 127 ms
57,696 KB
testcase_12 AC 126 ms
57,696 KB
testcase_13 AC 130 ms
57,832 KB
testcase_14 AC 117 ms
56,804 KB
testcase_15 AC 145 ms
56,804 KB
testcase_16 AC 136 ms
57,948 KB
testcase_17 AC 135 ms
57,820 KB
testcase_18 AC 138 ms
57,808 KB
testcase_19 AC 142 ms
57,960 KB
testcase_20 AC 144 ms
57,688 KB
testcase_21 AC 168 ms
57,960 KB
testcase_22 AC 160 ms
57,940 KB
testcase_23 AC 147 ms
57,820 KB
testcase_24 AC 153 ms
58,064 KB
testcase_25 AC 155 ms
57,964 KB
testcase_26 AC 155 ms
58,084 KB
testcase_27 AC 166 ms
58,076 KB
testcase_28 AC 186 ms
57,840 KB
testcase_29 AC 176 ms
58,092 KB
testcase_30 AC 200 ms
58,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		sc.close();

		int n2 = 1 << n;
		int m2 = 1 << m;
		int idx = 0;
		for (int i = 0; i < n2; i++) {
			StringBuilder sb = new StringBuilder();
			for (int j = 0; j < m2; j++) {
				sb.append(idx).append(' ');
				idx++;
			}
			sb.deleteCharAt(sb.length() - 1);
			System.out.println(sb.toString());
		}
	}
}
0