結果
問題 |
No.3010 水色コーダーさん
|
ユーザー |
![]() |
提出日時 | 2025-01-25 12:35:05 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 179 ms / 2,000 ms |
コード長 | 2,039 bytes |
コンパイル時間 | 5,500 ms |
コンパイル使用メモリ | 114,832 KB |
実行使用メモリ | 48,104 KB |
最終ジャッジ日時 | 2025-01-25 22:04:47 |
合計ジャッジ時間 | 9,378 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; class Program { static string InputPattern = "InputX"; static List<string> GetInputList() { var WillReturn = new List<string>(); if (InputPattern == "Input1") { WillReturn.Add("4 7"); WillReturn.Add("xxooooo 1000"); WillReturn.Add("oooooxo 1400"); WillReturn.Add("oooxxox 1300"); WillReturn.Add("ooxoxxx 1200"); //2 } else if (InputPattern == "Input2") { WillReturn.Add("3 5"); WillReturn.Add("oooox 1500"); WillReturn.Add("ooxxo 1100"); WillReturn.Add("xxxxx 800"); //0 } else if (InputPattern == "Input3") { WillReturn.Add("8 10"); WillReturn.Add("ooooooxxxx 1500"); WillReturn.Add("oooxoxoxox 1600"); WillReturn.Add("xxoxxxxxxx 400"); WillReturn.Add("ooooxxxxxx 600"); WillReturn.Add("oooooooooo 2300"); WillReturn.Add("xoxxxoxoxo 1200"); WillReturn.Add("oooxoxoxox 1300"); WillReturn.Add("ooooxxxxxx 400"); //3 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List<string> InputList = GetInputList(); //int[] wkArr = InputList[0].Split(' ').Select(pX => int.Parse(pX)).ToArray(); int Answer = 0; foreach (string EachStr in InputList.Skip(1)) { string[] SplitArr = EachStr.Split(' '); string Result = SplitArr[0]; int Rate = int.Parse(SplitArr[1]); bool HasBatu = false; for (int I = 0; I <= 3; I++) { if (Result[I] == 'x') HasBatu = true; } if (HasBatu && Rate>=1200) { Answer++; } } Console.WriteLine(Answer); } }