Language: C++

//#include "pch.h"
//#include "stdafx.h"
#include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
#include <math.h>
#include <string>
#include <cstring>

using namespace std;

/*-----------------------------------------------------------------------------
　定義
 -------------------------------------------------------------------------------*/
#define REP(i, n) for (int (i) = 0 ; (i) < (int)(n) ; ++(i))
#define REPN(i, m, n) for (int (i) = m ; (i) < (int)(n) ; ++(i))
#define REP_REV(i, n) for (int (i) = (int)(n) - 1 ; (i) >= 0 ; --(i))
#define REPN_REV(i, m, n) for (int (i) = (int)(n) - 1 ; (i) >= m ; --(i))

#define INF				2e9
#define MOD				(1000 * 1000 * 1000 + 7)
#define MIN(a, b)		((a) < (b) ? a : b)
#define MAX(a, b)		((a) > (b) ? a : b)
#define CeilN(x, n)		(((((DWORD)(x))+((n)-1))/n)*n)	/* Nの倍数に切り上げ */
#define FloorN(x, n)	((x)-(x)%(n))					/* Nの倍数に切り下げ */
#define IsOdd(x)		(((x)&0x01UL) == 0x01UL)			
#define IsEven(x)		(!IsOdd((x)))						

#define ArrayLength(x)	( sizeof( x ) / sizeof( x[ 0 ] ) )
#define	ArrayEnd(a)		(&(a)[ArrayLength(a)])			
#define	ArrayLast(a)	(&(a)[ArrayLength(a) - 1])		
#define MAX_BYTE		(255)
#define MIN_BYTE		(0)
#define MAX_WORD		(65535)
#define MIN_WORD		(0)
#define MAX_SWORD		(32767)
#define MIN_SWORD		(-32768)
#define MAX_DWORD		(0xFFFFFFFF)
#define MIN_DWORD		(0)
#define	MAX_SDWORD		((SDWORD)0x7FFFFFFF)
#define	MIN_SDWORD		((SDWORD)0x80000000)
#define	MAX_QWORD		((QWORD)0xFFFFFFFFFFFFFFFF)
#define	MIN_QWORD		((QWORD)0x0000000000000000)
#define	MAX_SQWORD		((SQWORD)0x7FFFFFFFFFFFFFFF)
#define	MIN_SQWORD		((SQWORD)0x8000000000000000)

#define	BitSetV(Val,Bit)		((Val) |= (Bit))			
#define	BitClrV(Val,Bit)		((Val) &= (~(Bit)))			
#define	BitTstV(Val,Bit)		((Val) & (Bit))				
#define	BitInvV(Val,Bit)		((Val) ^= (Bit))			
#define	BitTstVVal(Val, Bit)	(BitTstV((Val), (Bit)) == (Bit))	

typedef short SWORD;
typedef unsigned short WORD;
typedef long SDWORD;
typedef unsigned long DWORD;
typedef long long int QWORD;
typedef pair<int, int> P;

#define N_MAX	(10)
#define K_MAX	(10)
#define M_MAX	(1000)
#define H_MAX	(1000)
#define W_MAX	(1000)

/*-----------------------------------------------------------------------------
　処理
 -------------------------------------------------------------------------------*/
// K回操作、左からの位置、右からの位置
int main()
{
	// 入力
	int N, K;
	SDWORD value[100];
	cin >> N >> Kmax;
	REP(i, N) cin >> value[i];

	// K回操作、左からの位置、右からの位置
	vector<vector<vector<SDWORD>>> dp(N + 1, vector<vector<SDWORD>>(Kmax, vector<SDWORD>(Kmax, - 1)));

	// 一回づつ操作
	dp[0][0][0] = 0;
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < Kmax; j++) {
			for (int k = 0; k < Kmax; k++) {
				if (0 <= dp[i][j][k]) {
					// 何もしない
					dp[i + 1][j][k] = MAX(dp[i + 1][j][k], dp[i][j][k]);

					// 取れたらとる
					if ((j + k) < N) {
						// 左からとる
						// 右からとる
					}

					// 持ってたら入れる
					if ((0 < j) || (0 < k)) {

					}
				}
			}
		}
	}

	cout << ret;
	cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:76:21: error: 'Kmax' was not declared in this scope; did you mean 'fmax'?
   76 |         cin >> N >> Kmax;
      |                     ^~~~
      |                     fmax
a.cc:106:17: error: 'ret' was not declared in this scope
  106 |         cout << ret;
      |                 ^~~