結果
問題 | No.346 チワワ数え上げ問題 |
ユーザー | okazuki |
提出日時 | 2016-02-29 20:32:19 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 925 bytes |
コンパイル時間 | 2,533 ms |
コンパイル使用メモリ | 112,428 KB |
実行使用メモリ | 37,028 KB |
最終ジャッジ日時 | 2023-10-24 19:13:45 |
合計ジャッジ時間 | 8,970 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | -- | - |
testcase_02 | -- | - |
testcase_03 | -- | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
コンパイルメッセージ
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; namespace ConsoleApplication6 { class Program { static void Main(string[] args) { var s = Console.ReadLine(); var count = MakeCww(s) .Where(x => x == "cww") .Count(); Console.WriteLine(count); } static IEnumerable<string> MakeCww(string s) { foreach (var a in s.Select((x, i) => new { Index = i, Value = x })) { foreach (var b in s.Where((_, i) => i != a.Index).Select((x, i) => new { Index = i, Value = x }).Skip(a.Index)) { foreach (var c in s.Where((_, i) => i != a.Index && i != b.Index).Skip(b.Index)) { yield return $"{a.Value}{b.Value}{c}"; } } } } } }