結果
問題 | No.279 木の数え上げ |
ユーザー | nokonoko |
提出日時 | 2015-10-06 22:39:06 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 104 ms / 2,000 ms |
コード長 | 1,705 bytes |
コンパイル時間 | 2,606 ms |
コンパイル使用メモリ | 109,808 KB |
実行使用メモリ | 26,796 KB |
最終ジャッジ日時 | 2023-08-04 18:06:42 |
合計ジャッジ時間 | 5,495 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 56 ms
23,304 KB |
testcase_01 | AC | 54 ms
23,324 KB |
testcase_02 | AC | 55 ms
21,348 KB |
testcase_03 | AC | 54 ms
21,340 KB |
testcase_04 | AC | 55 ms
21,376 KB |
testcase_05 | AC | 55 ms
21,408 KB |
testcase_06 | AC | 56 ms
23,408 KB |
testcase_07 | AC | 54 ms
21,388 KB |
testcase_08 | AC | 56 ms
21,344 KB |
testcase_09 | AC | 55 ms
21,276 KB |
testcase_10 | AC | 102 ms
24,512 KB |
testcase_11 | AC | 66 ms
19,580 KB |
testcase_12 | AC | 87 ms
23,332 KB |
testcase_13 | AC | 62 ms
21,456 KB |
testcase_14 | AC | 104 ms
26,796 KB |
testcase_15 | AC | 95 ms
24,088 KB |
testcase_16 | AC | 91 ms
23,936 KB |
testcase_17 | AC | 100 ms
24,480 KB |
testcase_18 | AC | 78 ms
22,644 KB |
testcase_19 | AC | 99 ms
26,528 KB |
testcase_20 | AC | 103 ms
24,724 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using LIB; using System; using System.Linq; using System.Text; using System.Collections.Generic; class Program { static void Main(string[] args) { string s = IO.R<string>(); int tc = s.Count(c => c == 't'); int rc = s.Count(c => c == 'r'); int ec = s.Count(c => c == 'e') / 2; IO.W(Math.Min(Math.Min(tc, rc), ec)); IO.WFLUSH(); } } namespace LIB { public class IO { private const int WMAX = 1000; private static StringBuilder S = new StringBuilder(); public static T R<T>() { return UTIL.PARSE<T>(R()); } public static T[] R<T>(char s = ' ') { return R().Split(s).Select(UTIL.PARSE<T>).ToArray(); } public static T[] R<T>(int l) { T[] r = new T[l]; for (int i = 0; i < l; i++) { r[i] = R<T>(); } return r; } public static T[][] R<T>(int l, char s = ' ') { T[][] r = new T[l][]; for (int i = 0; i < l; i++) { r[i] = R<T>(s); } return r; } private static string R() { return Console.ReadLine(); } public static void W(object v, bool lf = true) { S.Append(UTIL.PARSE<string>(v)); if (lf == true) { S.Append('\n'); } if (S.Length >= WMAX) { WFLUSH(); } } public static void WFLUSH() { Console.Write(S.ToString()); S.Clear(); } } public class UTIL { public static T PARSE<T>(object value) { return (T)(Convert.ChangeType(value, typeof(T))); } } public class MEMO<Key, Result> { private Dictionary<Key, Result> R; public MEMO() { R = new Dictionary<Key, Result>(); } public Result EXEC(Key k, Func<Key, Result> f) { Result r; if (R.ContainsKey(k)) { r = R[k]; } else { r = f(k); R.Add(k, r); } return r; } } }