AtCoder Grand Contest 007

Submission #1350779

Source codeソースコード

import java.util.Scanner;

public class Main {
	static Scanner in = new Scanner(System.in);
	
	public static void main(String[] args){
		int H = in.nextInt(), W = in.nextInt();
		String[] a = new String[H];
		a[0] = in.nextLine();
		for(int i = 0; i < H; i++){
			a[i] = in.nextLine();
		}
		int sum = 0;
		for(int i = 0; i < H; i++){
			for(int j = 0; j < W; j++){
				if(a[i].charAt(j) == '#'){
					sum++;
				}
			}
		}
		if(sum == (H + W - 1)){
			System.out.println("Possible");
		}else{
			System.out.println("Impossible");
		}
	}
}

Submission

Task問題 A - Shik and Stone
User nameユーザ名 もっさん
Created time投稿日時
Language言語 Java8 (OpenJDK 1.8.0)
Status状態 AC
Score得点 200
Source lengthソースコード長 565 Byte
File nameファイル名
Exec time実行時間 95 ms
Memory usageメモリ使用量 21972 KB

Test case

Set

Set name Score得点 / Max score Cases
Sample - example0.txt,example1.txt,example2.txt
All 200 / 200 000.txt,001.txt,002.txt,003.txt,004.txt,005.txt,006.txt,007.txt,008.txt,009.txt,010.txt,011.txt,012.txt,013.txt,014.txt,015.txt,016.txt,017.txt,018.txt,example0.txt,example1.txt,example2.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
000.txt AC 93 ms 19540 KB
001.txt AC 94 ms 21844 KB
002.txt AC 93 ms 21844 KB
003.txt AC 93 ms 20564 KB
004.txt AC 92 ms 21972 KB
005.txt AC 94 ms 18900 KB
006.txt AC 91 ms 18772 KB
007.txt AC 94 ms 21204 KB
008.txt AC 93 ms 21716 KB
009.txt AC 93 ms 19796 KB
010.txt AC 92 ms 21716 KB
011.txt AC 95 ms 21588 KB
012.txt AC 92 ms 21844 KB
013.txt AC 94 ms 21332 KB
014.txt AC 93 ms 21716 KB
015.txt AC 93 ms 21716 KB
016.txt AC 93 ms 20820 KB
017.txt AC 91 ms 18644 KB
018.txt AC 93 ms 20692 KB
example0.txt AC 94 ms 19792 KB
example1.txt AC 93 ms 18640 KB
example2.txt AC 92 ms 21332 KB