Submission #612271

#TimeUsernameProblemLanguageResultExecution timeMemory
612271StrawHatWess던전 (IOI21_dungeons)C++17
Compilation error
0 ms0 KiB
#include "dungeons.h"

#include <bits/stdc++.h>
using namespace std; 

typedef long long ll;
typedef vector<int>vi; 
#define pb push_back
#define sz(x) (int)x.size()
#define all(x) begin(x),end(x)

#define FOR(i,a,b) for(int i=a; i<b; i++)
#define ROF(i,a,b) for(int i=b-1; i>=a; i--)

//------------------------------------------------ 

int N; 
vi s, p, w, l; 
vector<ll>jump; 
void init(int n, vi s, vi p, vi w, vi l) {
	N=n; 
	::s=s; ::p=p; ::w=w; ::l=l; 

	jump.assign(N+1,0); 
	ROF(i,0,N){
		jump[i]=s[i]+jump[w[i]]; 
	}

	FOR(i,0,N) cout << 
}

ll simulate(int st, int x){
	int i=st; 
	ll X=x; 
	while(1){
		if(i==N || X>=s[i]) break; 

		X+=p[i]; 
		i=l[i]; 
	}

	X+=jump[i]; 
	return X; 
}



/*

3 2
2 6 9
3 1 2
2 2 3
1 0 1
0 1
2 3

24
25



*/

Compilation message (stderr)

dungeons.cpp: In function 'void init(int, vi, vi, vi, vi)':
dungeons.cpp:30:1: error: expected primary-expression before '}' token
   30 | }
      | ^