답안 #966118

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
966118 2024-04-19T12:01:42 Z AkibAzmain 사탕 분배 (IOI21_candies) C++17
3 / 100
5000 ms 13284 KB
#include "candies.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

std::vector<int> distribute_candies (std::vector<int> c, std::vector<int> l,
                                     std::vector<int> r, std::vector<int> v)
{
  ll n = c.size(), q = v.size ();
  vector < int > s (n);
  for (int i = 0; i < q; ++i)
    for (int j = l[i]; j <= r[i]; ++j)
      s[j] += v[i], s[j] = max (s[j], 0), s[j] = min (s[j], c[j]);
  return s;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 3 ms 448 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 5039 ms 7416 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 181 ms 8020 KB Output is correct
3 Correct 177 ms 6028 KB Output is correct
4 Execution timed out 5043 ms 13284 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 465 ms 8016 KB Output is correct
4 Correct 442 ms 3932 KB Output is correct
5 Execution timed out 5028 ms 10836 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 3 ms 448 KB Output is correct
6 Execution timed out 5039 ms 7416 KB Time limit exceeded
7 Halted 0 ms 0 KB -