Submission #33525


Source Code Expand

Copy
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Program
{
    static void Main(string[] args)
    {
        string[] tmp = Console.ReadLine().Split();
        int N = int.Parse(tmp[0]), L = int.Parse(tmp[1]);
        string[] board = new string[L];
        int i, j = 0;

        for (i = 0; i < L; i++)
        {
            board[i] = Console.ReadLine();
        }

        i = L - 1;
        j = Console.ReadLine().IndexOf('o');

        while (i >= 0)
        {
            if (j - 1 >= 0 && board[i][j - 1] == '-') { j -= 2; }
            else if (j + 1 < board[i].Length && board[i][j + 1] == '-') { j += 2; }
            i--;
        }

        Console.WriteLine(j / 2 + 1);
    }
}

Submission Info

Submission Time
Task B - あみだくじ
User eitaho
Language C# (Mono 2.10.8.1)
Score 100
Code Size 792 Byte
Status AC
Exec Time 193 ms
Memory 7848 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 34
Set Name Test Cases
All 00_min.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, 01_rnd_00.txt, 01_rnd_01.txt, 01_rnd_02.txt, 01_rnd_03.txt, 01_rnd_04.txt, 01_rnd_05.txt, 01_rnd_06.txt, 01_rnd_07.txt, 01_rnd_08.txt, 01_rnd_09.txt, 01_rnd_10.txt, 01_rnd_11.txt, 01_rnd_12.txt, 01_rnd_13.txt, 01_rnd_14.txt, 01_rnd_15.txt, 01_rnd_16.txt, 01_rnd_17.txt, 01_rnd_18.txt, 01_rnd_19.txt, 02_maxrnd_00.txt, 02_maxrnd_01.txt, 02_maxrnd_02.txt, 02_maxrnd_03.txt, 02_maxrnd_04.txt, 03_empty_00.txt, 03_empty_01.txt, 03_empty_02.txt
Case Name Status Exec Time Memory
00_min.txt AC 130 ms 7720 KB
00_sample_01.txt AC 132 ms 7764 KB
00_sample_02.txt AC 129 ms 7704 KB
00_sample_03.txt AC 129 ms 7716 KB
00_sample_04.txt AC 133 ms 7708 KB
00_sample_05.txt AC 137 ms 7712 KB
01_rnd_00.txt AC 140 ms 7708 KB
01_rnd_01.txt AC 140 ms 7704 KB
01_rnd_02.txt AC 143 ms 7820 KB
01_rnd_03.txt AC 133 ms 7656 KB
01_rnd_04.txt AC 129 ms 7760 KB
01_rnd_05.txt AC 130 ms 7768 KB
01_rnd_06.txt AC 127 ms 7756 KB
01_rnd_07.txt AC 129 ms 7780 KB
01_rnd_08.txt AC 130 ms 7724 KB
01_rnd_09.txt AC 130 ms 7664 KB
01_rnd_10.txt AC 138 ms 7716 KB
01_rnd_11.txt AC 140 ms 7680 KB
01_rnd_12.txt AC 138 ms 7776 KB
01_rnd_13.txt AC 193 ms 7648 KB
01_rnd_14.txt AC 135 ms 7716 KB
01_rnd_15.txt AC 138 ms 7704 KB
01_rnd_16.txt AC 135 ms 7712 KB
01_rnd_17.txt AC 128 ms 7716 KB
01_rnd_18.txt AC 127 ms 7712 KB
01_rnd_19.txt AC 128 ms 7720 KB
02_maxrnd_00.txt AC 127 ms 7848 KB
02_maxrnd_01.txt AC 128 ms 7708 KB
02_maxrnd_02.txt AC 129 ms 7720 KB
02_maxrnd_03.txt AC 135 ms 7684 KB
02_maxrnd_04.txt AC 132 ms 7708 KB
03_empty_00.txt AC 132 ms 7712 KB
03_empty_01.txt AC 132 ms 7712 KB
03_empty_02.txt AC 128 ms 7760 KB