結果
問題 | No.239 にゃんぱすー |
ユーザー |
![]() |
提出日時 | 2019-02-23 12:53:00 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 35 ms / 2,000 ms |
コード長 | 654 bytes |
コンパイル時間 | 3,014 ms |
コンパイル使用メモリ | 111,904 KB |
実行使用メモリ | 27,640 KB |
最終ジャッジ日時 | 2024-11-29 14:58:17 |
合計ジャッジ時間 | 5,572 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.IO;using System.Linq;using System.Collections;using System.Collections.Generic;using System.Numerics;using System.Diagnostics;using System.Text;using System.Text.RegularExpressions;using System.Threading.Tasks;using static System.Math;class P{static void Main(){int n = int.Parse(Console.ReadLine());var counts = Enumerable.Repeat(0, n).Select(_ => Console.ReadLine().Split()).Aggregate(Enumerable.Repeat(0, n), (x, y) => x.Zip(y, (z, w) => z+ (w == "nyanpass" ? 1 : 0))).ToList();Console.WriteLine(counts.Count(x => x == n - 1) != 1 ? -1 : counts.IndexOf(n - 1) + 1);}}