Submission #901388

#TimeUsernameProblemLanguageResultExecution timeMemory
901388nxteruAncient Books (IOI17_books)C++14
Compilation error
0 ms0 KiB
using ll =long long; int64 minimum_walk(int[] p, int s){ int n=sizeof(p); ll ans=0; int ma=0; for(int i=0;i<n;i++){ ans+=abs(p[i]-i); ma=max(ma,p[i]); if(ma<=i&&i<n-1)ans+=2; } return ans; }

Compilation message (stderr)

books.cpp:2:1: error: 'int64' does not name a type; did you mean 'int'?
    2 | int64 minimum_walk(int[] p, int s){
      | ^~~~~
      | int