結果

問題 No.923 オセロきりきざむたん
ユーザー mamekin
提出日時 2019-11-09 15:05:29
言語 C++14
(gcc 8.3.0)
結果
AC  
実行時間 13 ms
コード長 1,049 Byte
コンパイル時間 887 ms
使用メモリ 8,924 KB
最終ジャッジ日時 2019-11-09 15:05:34

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
00_sample_1.txt AC 3 ms
6,876 KB
00_sample_2.txt AC 3 ms
6,872 KB
00_sample_3.txt AC 3 ms
6,876 KB
00_sample_4.txt AC 2 ms
6,872 KB
10_hand_1.txt AC 3 ms
6,876 KB
10_hand_2.txt AC 3 ms
6,872 KB
10_hand_3.txt AC 3 ms
6,876 KB
10_hand_4.txt AC 4 ms
6,872 KB
10_hand_5.txt AC 3 ms
6,872 KB
10_hand_6.txt AC 3 ms
6,872 KB
10_hand_7.txt AC 5 ms
6,876 KB
10_hand_8.txt AC 3 ms
6,876 KB
10_hand_9.txt AC 3 ms
6,872 KB
10_hand_10.txt AC 4 ms
6,876 KB
10_hand_11.txt AC 4 ms
6,876 KB
10_hand_12.txt AC 3 ms
6,876 KB
10_hand_13.txt AC 3 ms
6,876 KB
10_hand_14.txt AC 3 ms
6,876 KB
10_hand_15.txt AC 3 ms
6,876 KB
10_hand_16.txt AC 3 ms
6,872 KB
11_hand_1.txt AC 3 ms
6,876 KB
11_hand_2.txt AC 3 ms
6,872 KB
11_hand_3.txt AC 3 ms
6,876 KB
11_hand_4.txt AC 4 ms
6,872 KB
11_hand_5.txt AC 3 ms
6,872 KB
11_hand_6.txt AC 4 ms
6,876 KB
11_hand_7.txt AC 10 ms
6,872 KB
11_hand_8.txt AC 9 ms
6,876 KB
11_hand_9.txt AC 9 ms
6,876 KB
11_hand_10.txt AC 9 ms
6,876 KB
11_hand_11.txt AC 7 ms
6,872 KB
11_hand_12.txt AC 8 ms
6,876 KB
20_general_1.txt AC 4 ms
8,920 KB
20_general_2.txt AC 3 ms
6,872 KB
20_general_3.txt AC 3 ms
8,924 KB
20_general_4.txt AC 3 ms
6,876 KB
21_general_1.txt AC 3 ms
6,876 KB
21_general_2.txt AC 3 ms
6,876 KB
21_general_3.txt AC 3 ms
6,876 KB
21_general_4.txt AC 3 ms
6,876 KB
22_general_1.txt AC 3 ms
6,872 KB
22_general_2.txt AC 3 ms
6,876 KB
22_general_3.txt AC 3 ms
6,876 KB
22_general_4.txt AC 3 ms
6,876 KB
22_general_5.txt AC 3 ms
6,872 KB
22_general_6.txt AC 3 ms
6,876 KB
22_general_7.txt AC 4 ms
6,876 KB
22_general_8.txt AC 3 ms
8,920 KB
22_general_9.txt AC 3 ms
8,916 KB
22_general_10.txt AC 3 ms
6,872 KB
23_general_1.txt AC 10 ms
6,876 KB
23_general_2.txt AC 10 ms
6,872 KB
23_general_3.txt AC 10 ms
6,872 KB
23_general_4.txt AC 11 ms
6,872 KB
23_general_5.txt AC 10 ms
6,872 KB
23_general_6.txt AC 10 ms
6,876 KB
23_general_7.txt AC 11 ms
8,916 KB
23_general_8.txt AC 4 ms
6,876 KB
23_general_9.txt AC 5 ms
6,876 KB
23_general_10.txt AC 4 ms
6,872 KB
23_general_11.txt AC 4 ms
6,876 KB
23_general_12.txt AC 3 ms
6,872 KB
23_general_13.txt AC 4 ms
6,876 KB
23_general_14.txt AC 5 ms
6,876 KB
23_general_15.txt AC 3 ms
6,872 KB
24_general_1.txt AC 13 ms
6,876 KB
24_general_2.txt AC 13 ms
6,872 KB
24_general_3.txt AC 13 ms
6,876 KB
24_general_4.txt AC 13 ms
6,876 KB
24_general_5.txt AC 11 ms
6,872 KB
24_general_6.txt AC 11 ms
8,920 KB
24_general_7.txt AC 13 ms
6,872 KB
24_general_8.txt AC 10 ms
6,872 KB
25_general_1.txt AC 3 ms
6,872 KB
25_general_2.txt AC 5 ms
6,876 KB
25_general_3.txt AC 8 ms
6,872 KB
25_general_4.txt AC 5 ms
6,876 KB
25_general_5.txt AC 8 ms
6,876 KB
25_general_6.txt AC 4 ms
6,876 KB
25_general_7.txt AC 9 ms
8,916 KB
25_general_8.txt AC 9 ms
8,912 KB
25_general_9.txt AC 7 ms
6,872 KB
25_general_10.txt AC 8 ms
6,872 KB
25_general_11.txt AC 6 ms
6,876 KB
25_general_12.txt AC 9 ms
6,872 KB
25_general_13.txt AC 9 ms
6,872 KB
25_general_14.txt AC 7 ms
6,872 KB
25_general_15.txt AC 8 ms
6,872 KB
テストケース一括ダウンロード

ソースコード

diff #
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <array>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
#include <memory>
#include <regex>
using namespace std;

int main()
{
    int h, w;
    cin >> h >> w;

    vector<int> yCnt(h), xCnt(w);
    for(int y=0; y<h; ++y){
        for(int x=0; x<w; ++x){
            char c;
            cin >> c;
            if(c == '1'){
                ++ yCnt[y];
                ++ xCnt[x];
            }
        }
    }

    sort(yCnt.begin(), yCnt.end());
    sort(xCnt.begin(), xCnt.end());

    if((yCnt.front() == 0 || yCnt.back() == w) && (xCnt.front() == 0 || xCnt.back() == h))
        cout << "NO" << endl;
    else
        cout << "YES" << endl;

    return 0;
}
0