Submission #224633

# Submission time Handle Problem Language Result Execution time Memory
224633 2020-04-18T14:16:47 Z Amy313 Rice Hub (IOI11_ricehub) C++14
Compilation error
0 ms 0 KB
#include "ricehub.h"
#include<bits/stdc++.h>
int besthub(int R, int L, int X[], long long B)
{
	int r, maxi= -1, cp = B, c, a;
	for(int i=0; i<L; i++)
	{
		c = 0;
		r = i;
		cp = B;
		for(int j=0; j<R; j++)
		{
			a = abs(i-X[j]);
			if(a<=cp)
			{
				cp-=a;
				c++:
			}
			else
			{
				break;
			}
		}
		if(c>maxi)
		{
			maxi = c;
		}
	}
  return maxi;
}

Compilation message

ricehub.cpp: In function 'int besthub(int, int, int*, long long int)':
ricehub.cpp:17:8: error: expected ';' before ':' token
     c++:
        ^