답안 #435781

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
435781 2021-06-23T17:45:21 Z monsoon 사탕 분배 (IOI21_candies) C++17
3 / 100
5000 ms 7272 KB
#include <bits/stdc++.h>
#include "candies.h"
using namespace std;
#define REP(i,n) for(int i=0;i<(n);++i)

vector<int> distribute_candies(vector<int> c, vector<int> l, vector<int> r, vector<int> v) {
  int n = c.size(), q = v.size();
  vector<int> a(n);

  REP(i,q) {
    for (int j = l[i]; j <= r[i]; ++j) {
      a[j] += v[i];
      a[j] = max(0, min(c[j], a[j]));
    }
  }

  return a;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 332 KB Output is correct
5 Correct 3 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 5064 ms 7272 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 230 ms 5076 KB Output is correct
3 Correct 271 ms 3824 KB Output is correct
4 Execution timed out 5026 ms 7268 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 268 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 542 ms 4960 KB Output is correct
4 Correct 529 ms 2796 KB Output is correct
5 Execution timed out 5033 ms 7264 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 332 KB Output is correct
5 Correct 3 ms 332 KB Output is correct
6 Execution timed out 5064 ms 7272 KB Time limit exceeded
7 Halted 0 ms 0 KB -