| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 145497 | charlies_moo | Rasvjeta (COCI17_rasvjeta) | C++98 | 3 ms | 376 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
using namespace std;
int main()
{
	int n, k, l, x, i, j, s;
	cin >> n >> k >> l;
	int a[n+1]={0};
	for(i=0;i<k;i++)
	{
		cin >> x;
		for(j=-l;j<=l;j++)
		{
			if(x+j>=1 && x+j<=n)
			    a[x+j]=1;
		}
	}
	s=0;
	for(i=1;i<=n;i++)
	{
		if(a[i]==0)
		{
			for(j=0;j<=2*l;j++)
			{
				if(i+j<=n)
				    a[i+j]=1;
			}
			s++;
		}
	}
	cout << s;
	return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
