Submission #1223228

#TimeUsernameProblemLanguageResultExecution timeMemory
1223228porquenomedejainiciarsesionDungeons Game (IOI21_dungeons)C++20
Compilation error
0 ms0 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; int n; vector<int> s,p,w,l; void init(int in, vector<int> is, vector<int> ip, vector<int> iw, vector<int> il){ n=in; s=is; p=ip; w=iw; l=il; } int simulate(int a,int b){ while(a!=n){ if(b>=s[a]){ b+=s[a]; a=w[a]; }else{ b+=p[a]; a=l[a]; } } return b; }

Compilation message (stderr)

dungeons.cpp:13:5: error: ambiguating new declaration of 'int simulate(int, int)'
   13 | int simulate(int a,int b){
      |     ^~~~~~~~
In file included from dungeons.cpp:1:
dungeons.h:4:11: note: old declaration 'long long int simulate(int, int)'
    4 | long long simulate(int x, int z);
      |           ^~~~~~~~