Submission #3004048


Source Code Expand

n, q = gets.not_nil!.split.map(&.to_i)
l = [] of Int32
r = [] of Int32
q.times do
  arr = gets.not_nil!.split.map(&.to_i)
  l << arr[0] - 1
  r << arr[1] - 1
end
temp = [] of Int32
n.times do
  temp << 0
end
0.upto(q - 1) do |i|
  l[i].upto(r[i]) do |j|
    temp[j] += 1
  end
end
0.upto(n - 1) do |k|
  temp[k] %= 2
  if k < n - 1
    print temp[k]
  else
    puts temp[k]
  end
end

Submission Info

Submission Time
Task C - オセロ
User NiCd
Language Crystal (0.20.5)
Score 60
Code Size 407 Byte
Status TLE
Exec Time 2108 ms
Memory 12540 KB

Judge Result

Set Name Sample Subtask1 All
Score / Max Score 0 / 0 60 / 60 0 / 40
Status
AC × 2
AC × 12
AC × 23
TLE × 11
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt
Subtask1 00_example_01.txt, 00_example_02.txt, 10_small_01.txt, 10_small_02.txt, 10_small_03.txt, 10_small_04.txt, 10_small_05.txt, 10_small_06.txt, 10_small_07.txt, 10_small_08.txt, 10_small_09.txt, 10_small_10.txt
All 00_example_01.txt, 00_example_02.txt, 10_small_01.txt, 10_small_02.txt, 10_small_03.txt, 10_small_04.txt, 10_small_05.txt, 10_small_06.txt, 10_small_07.txt, 10_small_08.txt, 10_small_09.txt, 10_small_10.txt, 20_rand_01.txt, 20_rand_02.txt, 20_rand_03.txt, 20_rand_04.txt, 20_rand_05.txt, 20_rand_06.txt, 20_rand_07.txt, 20_rand_08.txt, 20_rand_09.txt, 20_rand_10.txt, 30_max_01.txt, 30_max_02.txt, 30_max_03.txt, 30_max_04.txt, 30_max_05.txt, 40_corner_01.txt, 40_corner_02.txt, 40_corner_03.txt, 40_corner_04.txt, 40_corner_05.txt, 40_corner_06.txt, 40_corner_07.txt
Case Name Status Exec Time Memory
00_example_01.txt AC 1 ms 636 KB
00_example_02.txt AC 2 ms 636 KB
10_small_01.txt AC 4 ms 764 KB
10_small_02.txt AC 2 ms 636 KB
10_small_03.txt AC 3 ms 636 KB
10_small_04.txt AC 3 ms 764 KB
10_small_05.txt AC 2 ms 636 KB
10_small_06.txt AC 3 ms 764 KB
10_small_07.txt AC 3 ms 636 KB
10_small_08.txt AC 2 ms 636 KB
10_small_09.txt AC 2 ms 636 KB
10_small_10.txt AC 2 ms 636 KB
20_rand_01.txt TLE 2108 ms 5244 KB
20_rand_02.txt AC 1441 ms 3580 KB
20_rand_03.txt AC 497 ms 2428 KB
20_rand_04.txt TLE 2107 ms 2428 KB
20_rand_05.txt AC 518 ms 1660 KB
20_rand_06.txt TLE 2107 ms 2940 KB
20_rand_07.txt AC 1290 ms 4476 KB
20_rand_08.txt AC 88 ms 892 KB
20_rand_09.txt AC 467 ms 2172 KB
20_rand_10.txt AC 1024 ms 3196 KB
30_max_01.txt TLE 2107 ms 10492 KB
30_max_02.txt TLE 2108 ms 8572 KB
30_max_03.txt TLE 2108 ms 10876 KB
30_max_04.txt TLE 2108 ms 8572 KB
30_max_05.txt TLE 2107 ms 12540 KB
40_corner_01.txt AC 173 ms 8060 KB
40_corner_02.txt TLE 2107 ms 11308 KB
40_corner_03.txt TLE 2108 ms 10876 KB
40_corner_04.txt AC 549 ms 10364 KB
40_corner_05.txt AC 742 ms 11388 KB
40_corner_06.txt AC 174 ms 8956 KB
40_corner_07.txt TLE 2108 ms 9468 KB