結果

問題 No.607 開通777年記念
ユーザー pekempeypekempey
提出日時 2017-12-07 00:03:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 2,197 ms
コンパイル使用メモリ 67,984 KB
実行使用メモリ 7,228 KB
最終ジャッジ日時 2023-08-19 10:04:46
合計ジャッジ時間 1,923 ms
ジャッジサーバーID
(参考情報)
judge10 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
4,384 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 12 ms
4,384 KB
testcase_08 AC 2 ms
4,508 KB
testcase_09 AC 4 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 187 ms
6,844 KB
testcase_12 AC 192 ms
7,228 KB
権限があれば一括ダウンロードができます

ソースコード

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