Submission #901391

#TimeUsernameProblemLanguageResultExecution timeMemory
901391nxteruAncient Books (IOI17_books)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll =long long; int p[10000005]; int main(void){ int n,s; cin>>n>>s; ll ans=0; int ma=0; for(int i=0;i<n;i++){ cin>>p[i]; ans+=abs(p[i]-i); ma=max(ma,p[i]); if(ma<=i&&i<n-1)ans+=2; } cout<<ans<<endl; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cceJzppY.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cceXV9KZ.o:books.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cceJzppY.o: in function `main':
grader.cpp:(.text.startup+0x26b): undefined reference to `minimum_walk(std::vector<int, std::allocator<int> >, int)'
collect2: error: ld returned 1 exit status