結果
| 問題 |
No.607 開通777年記念
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-07 00:02:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 452 bytes |
| コンパイル時間 | 665 ms |
| コンパイル使用メモリ | 69,248 KB |
| 実行使用メモリ | 7,380 KB |
| 最終ジャッジ日時 | 2024-11-29 01:31:22 |
| 合計ジャッジ時間 | 2,794 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 7 WA * 3 |
ソースコード
#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 < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i + 1][j];
a[i + 1][j] += a[i][j];
}
for (int j = 0; j + 3 < m; j++) {
if (a[i + 1][j] + a[i + 1][j + 1] + a[i + 1][j + 2] == 777) {
puts("YES");
return 0;
}
}
}
puts("NO");
}