Submission #1312304

#TimeUsernameProblemLanguageResultExecution timeMemory
1312304opeleklanos던전 (IOI21_dungeons)C++20
Compilation error
0 ms0 KiB
#include <iostream> #include <vector> #include "dungeons" using namespace std; #define ll long long vector<int> w, l, s, p; int n; void init(int n1, vector<int> s1, vector<int> p1, vector<int> w1, vector<int> l1){ n = n1; s = s1; p = p1; w = w1; l = l1; } ll simulate(int x, int z1){ ll z = ll(z1); while(x!=n){ if(z < s[x]){ z += (ll)p[x]; x = l[x]; } else{ z += s[x]; x = w[x]; } } return z; }

Compilation message (stderr)

dungeons.cpp: In function 'long long int simulate(int, int)':
dungeons.cpp:6:12: error: expected primary-expression before 'long'
    6 | #define ll long long
      |            ^~~~
dungeons.cpp:20:12: note: in expansion of macro 'll'
   20 |     ll z = ll(z1);
      |            ^~