結果

問題 No.923 オセロきりきざむたん
ユーザー kotamanegikotamanegi
提出日時 2019-11-08 23:05:55
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,421 bytes
コンパイル時間 1,238 ms
コンパイル使用メモリ 112,736 KB
実行使用メモリ 8,880 KB
最終ジャッジ日時 2023-08-20 13:24:48
合計ジャッジ時間 4,454 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,388 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 1 ms
4,376 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 WA -
testcase_17 AC 1 ms
4,380 KB
testcase_18 WA -
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 WA -
testcase_22 AC 2 ms
4,380 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 4 ms
4,376 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 3 ms
4,384 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 WA -
testcase_32 AC 2 ms
4,380 KB
testcase_33 AC 2 ms
4,380 KB
testcase_34 AC 1 ms
4,380 KB
testcase_35 AC 2 ms
4,380 KB
testcase_36 AC 1 ms
4,384 KB
testcase_37 AC 1 ms
4,376 KB
testcase_38 AC 2 ms
4,376 KB
testcase_39 AC 1 ms
4,380 KB
testcase_40 AC 1 ms
4,380 KB
testcase_41 AC 2 ms
4,384 KB
testcase_42 WA -
testcase_43 AC 1 ms
4,380 KB
testcase_44 AC 2 ms
4,380 KB
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 2 ms
4,376 KB
testcase_48 AC 1 ms
4,380 KB
testcase_49 AC 1 ms
4,380 KB
testcase_50 AC 5 ms
4,380 KB
testcase_51 AC 5 ms
4,380 KB
testcase_52 WA -
testcase_53 WA -
testcase_54 AC 6 ms
4,380 KB
testcase_55 AC 7 ms
4,380 KB
testcase_56 WA -
testcase_57 WA -
testcase_58 AC 2 ms
4,376 KB
testcase_59 WA -
testcase_60 AC 2 ms
4,376 KB
testcase_61 WA -
testcase_62 WA -
testcase_63 AC 2 ms
4,380 KB
testcase_64 AC 1 ms
4,376 KB
testcase_65 AC 16 ms
7,764 KB
testcase_66 WA -
testcase_67 WA -
testcase_68 WA -
testcase_69 AC 3 ms
4,376 KB
testcase_70 AC 3 ms
4,376 KB
testcase_71 WA -
testcase_72 AC 3 ms
4,384 KB
testcase_73 WA -
testcase_74 WA -
testcase_75 AC 3 ms
4,376 KB
testcase_76 WA -
testcase_77 AC 3 ms
4,380 KB
testcase_78 WA -
testcase_79 WA -
testcase_80 AC 3 ms
4,380 KB
testcase_81 AC 3 ms
4,384 KB
testcase_82 AC 3 ms
4,380 KB
testcase_83 WA -
testcase_84 WA -
testcase_85 AC 4 ms
4,376 KB
testcase_86 WA -
testcase_87 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
#include <cctype>
#include <bitset>
using namespace std;
typedef string::const_iterator State;
#define Ma_PI 3.141592653589793
#define eps 1e-5
#define LONG_INF 2000000000000000000LL
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007LL
#define GYAKU 500000004LL
#define MOD 998244353LL
#define seg_size 262144
#define REP(a,b) for(long long a = 0;a < b;++a)
int main() {
	int h, w;
	cin >> h >> w;
	vector<string> inputs;
	REP(i, h) {
		string s;
		cin >> s;
		inputs.push_back(s);
	}
	int ok = 1;
	for (int i = 0; i < h - 1; ++i) {
		int tea = 0;
		for (int q = 0; q < w; ++q) {
			if (inputs[i][q] != inputs[i + 1][q]) tea = 1;
		}
		ok &= tea;
	}
	for (int i = 0; i < w - 1; ++i) {
		int tea = 0;
		for (int q = 0; q < h; ++q) {
			if (inputs[q][i] != inputs[q][i+1]) tea = 1;
		}
		ok &= tea;
	}
	string s[2] = { "NO","YES" };
	cout << s[ok] << endl;
}
0