結果
| 問題 | No.607 開通777年記念 |
| コンテスト | |
| ユーザー |
No
|
| 提出日時 | 2018-01-26 18:38:08 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,035 bytes |
| 記録 | |
| コンパイル時間 | 5,381 ms |
| コンパイル使用メモリ | 105,984 KB |
| 実行使用メモリ | 42,292 KB |
| 最終ジャッジ日時 | 2024-12-27 23:45:53 |
| 合計ジャッジ時間 | 7,912 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 4 WA * 6 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
namespace y
{
class Program
{
static void Main(string[] args)
{
string[] ss = Console.ReadLine().Split();
int n = int.Parse(ss[0]);
int m = int.Parse(ss[1]);
int[] a = new int[n];
bool f = false;
for (int i = 0; i < m; i++)
{
int[] b = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
for (int j = 0; j < n; j++)
{
a[j] += b[j];
}
for (int j = 0; j < n; j++)
{
if (a[j] == 777)
{
f = true;
}
if (j != n - 1 && a[j] + a[j + 1] == 777)
{
f = true;
}
}
if (f) Console.WriteLine("YES");
else Console.WriteLine("NO");
}
}
}
}
No