結果
問題 | No.204 ゴールデン・ウィーク(2) |
ユーザー | sekiya9311 |
提出日時 | 2016-09-16 14:43:34 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,524 bytes |
コンパイル時間 | 2,742 ms |
コンパイル使用メモリ | 108,800 KB |
実行使用メモリ | 18,944 KB |
最終ジャッジ日時 | 2024-04-28 14:35:03 |
合計ジャッジ時間 | 3,522 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 22 ms
18,688 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 23 ms
18,560 KB |
testcase_04 | AC | 23 ms
18,432 KB |
testcase_05 | AC | 23 ms
18,560 KB |
testcase_06 | AC | 22 ms
18,688 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 20 ms
18,688 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 20 ms
18,688 KB |
testcase_26 | AC | 22 ms
18,432 KB |
testcase_27 | AC | 21 ms
18,816 KB |
testcase_28 | WA | - |
testcase_29 | AC | 21 ms
18,560 KB |
testcase_30 | AC | 21 ms
18,432 KB |
testcase_31 | AC | 21 ms
18,688 KB |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | AC | 22 ms
18,560 KB |
testcase_35 | AC | 21 ms
18,304 KB |
testcase_36 | AC | 21 ms
18,560 KB |
testcase_37 | AC | 22 ms
18,432 KB |
testcase_38 | AC | 21 ms
18,816 KB |
testcase_39 | WA | - |
testcase_40 | AC | 20 ms
18,688 KB |
testcase_41 | AC | 21 ms
18,304 KB |
testcase_42 | WA | - |
testcase_43 | AC | 21 ms
18,688 KB |
testcase_44 | AC | 25 ms
18,688 KB |
testcase_45 | AC | 23 ms
18,688 KB |
testcase_46 | AC | 21 ms
18,560 KB |
testcase_47 | WA | - |
testcase_48 | AC | 20 ms
18,560 KB |
コンパイルメッセージ
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.Collections; using System.Collections.Generic; using System.Text; using System.Linq; class Template { static Scanner sc; static int D; static string c = ""; public static void Main(string[] args) { sc = new Scanner(); D = sc.nextInt(); for (int i = 0; i < 2; i++) { c += sc.next(); } int ans = 0; for (int i = 0; i < 14; i++) { ans = Math.Max(ans, func(i)); } Console.WriteLine(ans); } static int func(int d) { int res = 0; string bufs = String.Copy(c); char[] buf = bufs.ToArray(); for (int i = 0; i + d < buf.Length && i < D; i++) { if (buf[i + d] == 'o') break; buf[i + d] = 'o'; } int cnt = 0; for (int i = 0; i < buf.Length; i++) { if (buf[i] == 'o') cnt++; else { res = Math.Max(res, cnt); cnt = 0; } } res = Math.Max(res, cnt); return res; } } public class Scanner { public Scanner() { } public string next() { return Console.ReadLine(); } public int nextInt() { return int.Parse(next()); } public double nextDouble() { return double.Parse(next()); } public long nextLong() { return long.Parse(next()); } public string[] nextArray() { return next().Split(' '); } public int[] nextIntArray() { return Array.ConvertAll(nextArray(), e => int.Parse(e)); } public long[] nextLongArray() { return Array.ConvertAll(nextArray(), e => long.Parse(e)); } public double[] nextDoubleArray() { return Array.ConvertAll(nextArray(), e => double.Parse(e)); } }