Submission #287483


Source Code Expand

Copy
n, q = gets.chomp.split(" ").map(&:to_i)
arr  = gets.chomp.split(" ").map(&:to_i)
arr.unshift( 0 )
while q = gets
  q = q.chomp.split(" ").map(&:to_i)
  if    q[0] == 1
    q[1].upto(q[2]){|i|
      arr[i] += q[3]
    }
  elsif q[0] == 2
    arr[q[1]..q[2]] = arr[q[3]..q[4]]
  elsif q[0] == 3
    puts arr[q[1]..q[2]].inject(:+)
  end
end

Submission Info

Submission Time
Task D - グラフではない
User yosidaa
Language Ruby (1.9.3)
Score 0
Code Size 355 Byte
Status TLE
Exec Time 5057 ms
Memory 74848 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
AC × 2
AC × 13
TLE × 9
Set Name Test Cases
Sample subtask0_sample_01.txt, subtask0_sample_02.txt
All subtask0_sample_01.txt, subtask0_sample_02.txt, subtask1_largerandom_t1_01.txt, subtask1_largerandom_t1_02.txt, subtask1_largerandom_t2_03.txt, subtask1_largerandom_t2_04.txt, subtask1_largespecial01.txt, subtask1_largespecial02.txt, subtask1_largespecial03.txt, subtask1_largespecial04.txt, subtask1_largespecial05.txt, subtask1_largespecial06.txt, subtask1_smallrandom_01.txt, subtask1_smallrandom_02.txt, subtask1_smallrandom_03.txt, subtask1_smallrandom_04.txt, subtask1_smallrandom_05.txt, subtask1_smallrandom_06.txt, subtask1_smallrandom_07.txt, subtask1_smallrandom_08.txt, subtask1_smallrandom_09.txt, subtask1_smallrandom_10.txt
Case Name Status Exec Time Memory
subtask0_sample_01.txt AC 57 ms 4212 KB
subtask0_sample_02.txt AC 53 ms 4212 KB
subtask1_largerandom_t1_01.txt TLE 5046 ms 44508 KB
subtask1_largerandom_t1_02.txt TLE 5048 ms 38240 KB
subtask1_largerandom_t2_03.txt TLE 5046 ms 42380 KB
subtask1_largerandom_t2_04.txt TLE 5043 ms 43004 KB
subtask1_largespecial01.txt TLE 5050 ms 58596 KB
subtask1_largespecial02.txt TLE 5042 ms 36720 KB
subtask1_largespecial03.txt TLE 5041 ms 36704 KB
subtask1_largespecial04.txt TLE 5057 ms 74848 KB
subtask1_largespecial05.txt TLE 5048 ms 47840 KB
subtask1_largespecial06.txt AC 1132 ms 4208 KB
subtask1_smallrandom_01.txt AC 56 ms 4208 KB
subtask1_smallrandom_02.txt AC 57 ms 4212 KB
subtask1_smallrandom_03.txt AC 55 ms 4208 KB
subtask1_smallrandom_04.txt AC 59 ms 4332 KB
subtask1_smallrandom_05.txt AC 57 ms 4208 KB
subtask1_smallrandom_06.txt AC 57 ms 4208 KB
subtask1_smallrandom_07.txt AC 56 ms 4256 KB
subtask1_smallrandom_08.txt AC 55 ms 4204 KB
subtask1_smallrandom_09.txt AC 53 ms 4208 KB
subtask1_smallrandom_10.txt AC 58 ms 4212 KB