Language: C++

#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(X,Y) (X=max(X,Y))
#define chmax(X,Y) (X=min(X,Y))
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}
#define N 500010
ll dp[N][3];
int main(){
	int n;
	string s;
	cin>>n>>s;
	s = "0"+s+"0";
	rep(i, n) rep(k, 3) dp[i][k] = -1e8;
	dp[0][0] = 1;
	for(int i = 1, cnt = 0, t = 0; i <= n; i++){
		if(s[i]=='1'){
			dp[i][0] = 
		} else {
			if(s[i+1]==0) cnt = 0;
			else {
				t = !t;
				mset(dp[t], 0);
				rep(k, 3){
					chmax(dp[t][0], dp[!t][k]);
					if(cnt>=(k==0?1:2)) chmax(dp[t][1], dp[!t][k]+1);
					chmax(dp[t][2], dp
			}
		}
	}
	return 0;
}


Compiler output:
a.cc:65:2: error: unterminated argument list invoking macro "chmax"
   65 | }
      |  ^
a.cc: In function 'int main()':
a.cc:52:17: error: expected primary-expression before '}' token
   52 |                 } else {
      |                 ^
a.cc:60:41: error: 'chmax' was not declared in this scope
   60 |                                         chmax(dp[t][2], dp
      |                                         ^~~~~
a.cc:60:46: error: expected '}' at end of input
   60 |                                         chmax(dp[t][2], dp
      |                                              ^
a.cc:57:42: note: to match this '{'
   57 |                                 rep(k, 3){
      |                                          ^
a.cc:60:46: error: expected '}' at end of input
   60 |                                         chmax(dp[t][2], dp
      |                                              ^
a.cc:54:30: note: to match this '{'
   54 |                         else {
      |                              ^
a.cc:60:46: error: expected '}' at end of input
   60 |                                         chmax(dp[t][2], dp
      |                                              ^
a.cc:52:24: note: to match this '{'
   52 |                 } else {
      |                        ^
a.cc:60:46: error: expected '}' at end of input
   60 |                                         chmax(dp[t][2], dp
      |                                              ^
a.cc:49:52: note: to match this '{'
   49 |         for(int i = 1, cnt = 0, t = 0; i <= n; i++){
      |                                                    ^
a.cc:60:46: error: expected '}' at end of input
   60 |                                         chmax(dp[t][2], dp
      |                                              ^
a.cc:42:11: note: to match this '{'
   42 | int main(){
      |           ^