Submission #480624

# Submission time Handle Problem Language Result Execution time Memory
480624 2021-10-17T13:00:23 Z Haidara Distributing Candies (IOI21_candies) C++17
0 / 100
5000 ms 7264 KB
#include<bits/stdc++.h>
#include<candies.h>
using namespace std;
vector<int> distribute_candies(vector<int> c,vector<int> l,vector<int> r, vector<int> v)
{
	vector<int>a((int)c.size(),0);
	for(int i=0;i<(int)l.size();i++)
		for(int j=l[i];j<=r[i];j++)
			if(v[i]>0)
				a[j]=min((long long)a[j]+(long long)v[i],(long long)c[j]);
			else 
				a[j]=max(0,a[j]-v[i]);
	return a;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 0 ms 204 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 5048 ms 7264 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 0 ms 204 KB Output isn't correct
3 Halted 0 ms 0 KB -