답안 #798822

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
798822 2023-07-31T04:48:08 Z khshg 사탕 분배 (IOI21_candies) C++17
3 / 100
5000 ms 13268 KB
#include <bits/stdc++.h>
using namespace std;
#define pb push_back

vector<int> distribute_candies(vector<int> C, vector<int> L, vector<int> R, vector<int> V) {
	int Q = (int)L.size(), N = (int)C.size();
	vector<int> ans(N);
	for(int i = 0; i < Q; ++i) {
		for(; L[i] <= R[i]; ++L[i]) {
			ans[L[i]] += V[i];
			ans[L[i]] = max(0, ans[L[i]]);
			ans[L[i]] = min(C[L[i]], ans[L[i]]);
		}
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 2 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 5074 ms 12120 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 300 KB Output is correct
2 Correct 190 ms 8092 KB Output is correct
3 Correct 166 ms 5948 KB Output is correct
4 Execution timed out 5019 ms 13268 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 467 ms 7656 KB Output is correct
4 Correct 423 ms 4012 KB Output is correct
5 Execution timed out 5065 ms 10848 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 2 ms 340 KB Output is correct
6 Execution timed out 5074 ms 12120 KB Time limit exceeded
7 Halted 0 ms 0 KB -