Submission #827008

# Submission time Handle Problem Language Result Execution time Memory
827008 2023-08-16T07:56:54 Z tigran Distributing Candies (IOI21_candies) C++17
0 / 100
82 ms 9580 KB
#include "candies.h"

#include <bits/stdc++.h>

std::vector<int> distribute_candies(std::vector<int> c, std::vector<int> l,
                                    std::vector<int> r, std::vector<int> v) {
    int n = c.size();
    std::vector<int> s(n);
	int q = l.size();
	int V = 0;
	for (int i = 0; i < q; i++){
		V += v[i];
	}
	for (int i = 0; i < n; i++){
		s[i] = c[i];
		if (V < s[i]){
			s[i] = V;
		}
	}
	return s;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 82 ms 9580 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -