Submission #33881


Source Code Expand

Copy
  inp=STDIN.readlines
fs=inp[0].split(" ")[1].to_i
pos=inp[fs+1].split(//).find_index{|n|n=="o"}
i=fs
w=inp[1].size-1
while i>0
  if w!=pos&&inp[i][pos+1]=="-"
    pos+=2
  elsif  0!=pos&&inp[i][pos-1]=="-"
    pos-=2
  end
  i-=1
end
puts pos/2+1

Submission Info

Submission Time
Task B - あみだくじ
User wass80
Language Ruby (1.9.3)
Score 100
Code Size 262 Byte
Status AC
Exec Time 59 ms
Memory 4240 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 59 ms 4136 KB
00_sample_01.txt AC 54 ms 4232 KB
00_sample_02.txt AC 53 ms 4108 KB
00_sample_03.txt AC 55 ms 4108 KB
00_sample_04.txt AC 54 ms 4112 KB
00_sample_05.txt AC 54 ms 4136 KB
01_rnd_00.txt AC 54 ms 4240 KB
01_rnd_01.txt AC 54 ms 4236 KB
01_rnd_02.txt AC 54 ms 4108 KB
01_rnd_03.txt AC 54 ms 4204 KB
01_rnd_04.txt AC 55 ms 4204 KB
01_rnd_05.txt AC 54 ms 4228 KB
01_rnd_06.txt AC 54 ms 4112 KB
01_rnd_07.txt AC 54 ms 4112 KB
01_rnd_08.txt AC 55 ms 4208 KB
01_rnd_09.txt AC 54 ms 4240 KB
01_rnd_10.txt AC 53 ms 4236 KB
01_rnd_11.txt AC 54 ms 4112 KB
01_rnd_12.txt AC 56 ms 4228 KB
01_rnd_13.txt AC 54 ms 4112 KB
01_rnd_14.txt AC 56 ms 4236 KB
01_rnd_15.txt AC 55 ms 4108 KB
01_rnd_16.txt AC 56 ms 4236 KB
01_rnd_17.txt AC 55 ms 4112 KB
01_rnd_18.txt AC 55 ms 4232 KB
01_rnd_19.txt AC 54 ms 4112 KB
02_maxrnd_00.txt AC 57 ms 4112 KB
02_maxrnd_01.txt AC 55 ms 4112 KB
02_maxrnd_02.txt AC 54 ms 4232 KB
02_maxrnd_03.txt AC 56 ms 4104 KB
02_maxrnd_04.txt AC 55 ms 4232 KB
03_empty_00.txt AC 54 ms 4236 KB
03_empty_01.txt AC 54 ms 4112 KB
03_empty_02.txt AC 54 ms 4212 KB