提出 #33990449


ソースコード 拡げる

#include<bits/stdc++.h>
using namespace std;

template<typename T>
inline void read(T &a) {
	char c;for (c = getchar(); (c < '0' || c > '9') && c != '-'; c = getchar());bool f = c == '-';T x = f ? 0 : (c ^ '0');for (c = getchar(); c >= '0' && c <= '9'; c = getchar()) {x = x * 10 + (c ^ '0');}a = f ? -x : x;
}
template<typename T, typename ...Argv>
inline void read(T &a, Argv &...argv) {
	read(a), read(argv...);
}

int x, y;
int a[1000][1000];
signed main() {
	for (int i = 1; i <= 7; ++i) {
		for (int j = 1; j <= 15; ++j) {
			for (int k = 1; k <= 15; ++k) {
				int ans = 100;
				ans = min(ans, min(j, 15 - j + 1));
				ans = min(ans, min(k, 15 - k + 1));
				if (ans & 1) a[j][k] = 1;
			}
		}
	}
	read(x, y);
	if (a[x][y]) puts("black");
	else puts("white");
}

提出情報

提出日時
問題 B - Nice Grid
ユーザ rsdbk_husky
言語 C++ (GCC 9.2.1)
得点 200
コード長 799 Byte
結果 AC
実行時間 6 ms
メモリ 3676 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 17
セット名 テストケース
Sample example0.txt, example1.txt
All 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, example0.txt, example1.txt
ケース名 結果 実行時間 メモリ
000.txt AC 6 ms 3576 KiB
001.txt AC 2 ms 3624 KiB
002.txt AC 2 ms 3672 KiB
003.txt AC 2 ms 3580 KiB
004.txt AC 2 ms 3676 KiB
005.txt AC 3 ms 3620 KiB
006.txt AC 2 ms 3500 KiB
007.txt AC 2 ms 3616 KiB
008.txt AC 2 ms 3616 KiB
009.txt AC 1 ms 3496 KiB
010.txt AC 2 ms 3640 KiB
011.txt AC 2 ms 3500 KiB
012.txt AC 2 ms 3620 KiB
013.txt AC 3 ms 3508 KiB
014.txt AC 2 ms 3512 KiB
example0.txt AC 2 ms 3496 KiB
example1.txt AC 2 ms 3676 KiB