Submission #706714

#TimeUsernameProblemLanguageResultExecution timeMemory
706714dungnguyenn_05Boxes with souvenirs (IOI15_boxes)C++17
Compilation error
0 ms0 KiB
// Written By DungNguyen #include<bits/stdc++.h> #define fs first #define sc second #define pb push_back #define all(x) x.begin(),x.end() using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> pi; typedef tuple<int,int,int> tp; const int N=10000005; int n,k,l,a[N]; void sub1() { ll res=0; for(int i=1;i<=n;i++) res+=min(a[i],n+1-a[i]); cout<<res; } void solve() { cin>>n>>k>>l; for(int i=1;i<=n;i++) cin>>a[i]; if(k==1) sub1(); } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); int test=1; // cin>>test; while(test--) solve(); }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccNOVcVH.o: in function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccMd8RCE.o:boxes.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccNOVcVH.o: in function `main':
grader.c:(.text.startup+0x1ef): undefined reference to `delivery(int, int, int, int*)'
collect2: error: ld returned 1 exit status