답안 #1007530

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1007530 2024-06-25T06:40:32 Z pawned 사탕 분배 (IOI21_candies) C++17
3 / 100
5000 ms 10140 KB
// without pragmas

#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;

#include "candies.h"

vi distribute_candies(vi C, vi L, vi R, vi V) {
	int N = C.size();
	int Q = V.size();
	vi ans(N, 0);
	for (int i = 0; i < Q; i++) {
		for (int j = L[i]; j <= R[i]; j++) {
			ans[j] += V[i];
			ans[j] = max(ans[j], 0);
			ans[j] = min(ans[j], C[j]);
		}
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 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 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 5055 ms 10140 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 127 ms 6852 KB Output is correct
3 Correct 123 ms 5188 KB Output is correct
4 Execution timed out 5067 ms 9556 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 285 ms 5100 KB Output is correct
4 Correct 280 ms 2884 KB Output is correct
5 Execution timed out 5093 ms 7248 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 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 2 ms 348 KB Output is correct
6 Execution timed out 5055 ms 10140 KB Time limit exceeded
7 Halted 0 ms 0 KB -