結果

問題 No.923 オセロきりきざむたん
ユーザー chocoruskchocorusk
提出日時 2019-11-08 22:51:23
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 1,287 bytes
コンパイル時間 956 ms
コンパイル使用メモリ 109,940 KB
実行使用メモリ 6,828 KB
最終ジャッジ日時 2023-10-13 05:33:45
合計ジャッジ時間 4,028 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
6,600 KB
testcase_01 AC 4 ms
6,796 KB
testcase_02 AC 3 ms
6,472 KB
testcase_03 AC 3 ms
6,460 KB
testcase_04 AC 3 ms
6,460 KB
testcase_05 AC 3 ms
6,460 KB
testcase_06 AC 3 ms
6,592 KB
testcase_07 AC 4 ms
6,740 KB
testcase_08 AC 3 ms
6,540 KB
testcase_09 AC 3 ms
6,464 KB
testcase_10 AC 4 ms
6,596 KB
testcase_11 AC 4 ms
6,520 KB
testcase_12 AC 4 ms
6,544 KB
testcase_13 AC 3 ms
6,540 KB
testcase_14 AC 3 ms
6,552 KB
testcase_15 AC 3 ms
6,472 KB
testcase_16 AC 3 ms
6,512 KB
testcase_17 AC 4 ms
6,468 KB
testcase_18 AC 3 ms
6,472 KB
testcase_19 AC 3 ms
6,532 KB
testcase_20 AC 3 ms
6,476 KB
testcase_21 AC 4 ms
6,472 KB
testcase_22 AC 4 ms
6,672 KB
testcase_23 AC 3 ms
6,496 KB
testcase_24 AC 3 ms
6,540 KB
testcase_25 AC 3 ms
6,680 KB
testcase_26 AC 6 ms
6,784 KB
testcase_27 AC 6 ms
6,696 KB
testcase_28 AC 5 ms
6,680 KB
testcase_29 AC 5 ms
6,648 KB
testcase_30 AC 4 ms
6,576 KB
testcase_31 AC 5 ms
6,804 KB
testcase_32 AC 3 ms
6,520 KB
testcase_33 AC 3 ms
6,544 KB
testcase_34 AC 3 ms
6,672 KB
testcase_35 AC 4 ms
6,476 KB
testcase_36 AC 4 ms
6,672 KB
testcase_37 AC 3 ms
6,468 KB
testcase_38 AC 3 ms
6,548 KB
testcase_39 AC 3 ms
6,468 KB
testcase_40 AC 3 ms
6,480 KB
testcase_41 AC 3 ms
6,472 KB
testcase_42 AC 4 ms
6,752 KB
testcase_43 AC 3 ms
6,468 KB
testcase_44 AC 4 ms
6,520 KB
testcase_45 AC 4 ms
6,468 KB
testcase_46 AC 3 ms
6,524 KB
testcase_47 AC 4 ms
6,496 KB
testcase_48 AC 4 ms
6,460 KB
testcase_49 AC 4 ms
6,472 KB
testcase_50 AC 8 ms
6,476 KB
testcase_51 AC 7 ms
6,472 KB
testcase_52 AC 7 ms
6,460 KB
testcase_53 AC 9 ms
6,604 KB
testcase_54 AC 7 ms
6,660 KB
testcase_55 AC 7 ms
6,516 KB
testcase_56 AC 7 ms
6,660 KB
testcase_57 AC 3 ms
6,564 KB
testcase_58 AC 4 ms
6,612 KB
testcase_59 AC 3 ms
6,484 KB
testcase_60 AC 3 ms
6,628 KB
testcase_61 AC 3 ms
6,536 KB
testcase_62 AC 3 ms
6,748 KB
testcase_63 AC 3 ms
6,532 KB
testcase_64 AC 4 ms
6,488 KB
testcase_65 AC 14 ms
6,520 KB
testcase_66 AC 15 ms
6,580 KB
testcase_67 AC 14 ms
6,460 KB
testcase_68 AC 15 ms
6,660 KB
testcase_69 AC 5 ms
6,600 KB
testcase_70 AC 5 ms
6,740 KB
testcase_71 AC 13 ms
6,516 KB
testcase_72 AC 6 ms
6,604 KB
testcase_73 AC 4 ms
6,528 KB
testcase_74 AC 4 ms
6,576 KB
testcase_75 AC 5 ms
6,648 KB
testcase_76 AC 3 ms
6,688 KB
testcase_77 AC 5 ms
6,628 KB
testcase_78 AC 3 ms
6,688 KB
testcase_79 AC 5 ms
6,828 KB
testcase_80 AC 4 ms
6,664 KB
testcase_81 AC 5 ms
6,640 KB
testcase_82 AC 5 ms
6,652 KB
testcase_83 AC 5 ms
6,564 KB
testcase_84 AC 5 ms
6,720 KB
testcase_85 AC 5 ms
6,616 KB
testcase_86 AC 4 ms
6,740 KB
testcase_87 AC 5 ms
6,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;

int main()
{
    int h, w;
    cin>>h>>w;
    string a[100010];
    for(int i=0; i<h; i++){
        cin>>a[i];
    }
    bool dameh=0;
    for(int i=0; i<h; i++){
        bool dame=1;
        for(int j=0; j<w-1; j++){
            if(a[i][j]!=a[i][j+1]){
                dame=0;
                break;
            }
        }
        if(dame){
            dameh=1;
            break;
        }
    }
    bool damew=0;
    for(int j=0; j<w; j++){
        bool dame=1;
        for(int i=0; i<h-1; i++){
            if(a[i][j]!=a[i+1][j]){
                dame=0; break;
            }
        }
        if(dame){
            damew=1;
            break;
        }
    }
    if(!dameh || !damew) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
	return 0;
}
0