Submission #1011308

# Submission time Handle Problem Language Result Execution time Memory
1011308 2024-06-30T10:11:05 Z sadeep Horses (IOI15_horses) C++17
0 / 100
19 ms 8280 KB
#include "horses.h"

int N;
int *X;
int *Y;

const int MAX_HORSES = 1001;
int cache[12][MAX_HORSES+1];

int dp(int endOfWhichYear, int horsesLeft){
	if(cache[endOfWhichYear][horsesLeft] != -2)return cache[endOfWhichYear][horsesLeft];

	if(endOfWhichYear==-1){
		if(horsesLeft==1)return 0;
		return -1;
	}


}

int init(int n, int xx[], int yy[]) {
	for(auto & c : cache)for(int & i : c)i=-2;

	N = n;
	X = xx;
	Y = yy;
	return 0;
}

int updateX(int pos, int val) {	
	return 0;
}

int updateY(int pos, int val) {
	return 0;
}

Compilation message

horses.cpp: In function 'int updateX(int, int)':
horses.cpp:30:17: warning: unused parameter 'pos' [-Wunused-parameter]
   30 | int updateX(int pos, int val) {
      |             ~~~~^~~
horses.cpp:30:26: warning: unused parameter 'val' [-Wunused-parameter]
   30 | int updateX(int pos, int val) {
      |                      ~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:34:17: warning: unused parameter 'pos' [-Wunused-parameter]
   34 | int updateY(int pos, int val) {
      |             ~~~~^~~
horses.cpp:34:26: warning: unused parameter 'val' [-Wunused-parameter]
   34 | int updateY(int pos, int val) {
      |                      ~~~~^~~
horses.cpp: In function 'int dp(int, int)':
horses.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 8280 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -