結果

問題 No.607 開通777年記念
ユーザー pekempey
提出日時 2017-12-07 00:02:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 573 ms
コンパイル使用メモリ 68,836 KB
実行使用メモリ 7,344 KB
最終ジャッジ日時 2024-11-29 01:31:24
合計ジャッジ時間 1,756 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 7 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int a[1001][1000];

int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cin >> a[i + 1][j];
      a[i + 1][j] += a[i][j];
    }
    for (int j = 0; j + 3 < n; j++) {
      if (a[i + 1][j] + a[i + 1][j + 1] + a[i + 1][j + 2] == 777) {
        puts("YES");
        return 0;
      } 
    }
  }
  puts("NO");
}
0