結果

問題 No.436 ccw
ユーザー jousenjousen
提出日時 2016-10-28 22:37:20
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 1,108 bytes
コンパイル時間 2,205 ms
コンパイル使用メモリ 104,544 KB
実行使用メモリ 24,328 KB
最終ジャッジ日時 2023-08-15 21:05:42
合計ジャッジ時間 4,739 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
22,008 KB
testcase_01 AC 66 ms
22,016 KB
testcase_02 AC 66 ms
22,028 KB
testcase_03 AC 66 ms
21,864 KB
testcase_04 AC 63 ms
19,916 KB
testcase_05 AC 63 ms
21,960 KB
testcase_06 AC 62 ms
21,964 KB
testcase_07 AC 66 ms
21,988 KB
testcase_08 AC 65 ms
22,008 KB
testcase_09 AC 67 ms
22,204 KB
testcase_10 AC 69 ms
24,328 KB
testcase_11 AC 63 ms
19,796 KB
testcase_12 AC 62 ms
21,860 KB
testcase_13 AC 63 ms
22,052 KB
testcase_14 AC 67 ms
22,252 KB
testcase_15 AC 65 ms
22,064 KB
testcase_16 AC 65 ms
22,068 KB
testcase_17 AC 61 ms
21,972 KB
testcase_18 AC 62 ms
22,080 KB
testcase_19 AC 62 ms
21,952 KB
testcase_20 AC 64 ms
22,072 KB
testcase_21 AC 65 ms
22,028 KB
testcase_22 AC 66 ms
21,832 KB
testcase_23 AC 66 ms
22,016 KB
testcase_24 AC 65 ms
22,056 KB
testcase_25 AC 64 ms
19,852 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;




namespace contest
{

    class contest
    {


        static void Main(string[] args)
        {


            //int n = int.Parse(Console.ReadLine());
            //var input = Console.ReadLine().Split().Select(int.Parse).ToArray();




            //var n = int.Parse(Console.ReadLine());
            //var input = Console.ReadLine().Split().Select(int.Parse).ToArray();

            string s = Console.ReadLine();

            var list = new List<int>();

            int index = -1;
            while(true)
            {
                index = s.IndexOf("ccw", index+1);
                if (index >= 0) list.Add(index);
                else break;
            }

            int min = 0;
            for(int i =0; i<list.Count(); i++)
            {
                //int tmp = list[i] + s.Length - (list[i] + 2);
                min = Math.Min(list[i]+1 , s.Length - (list[i] + 2));
            }

            Console.WriteLine(min);

            





            //Console.Read();


        }

    }


}
0