제출 #706713

#제출 시각아이디문제언어결과실행 시간메모리
706713dungnguyenn_05선물상자 (IOI15_boxes)C++17
컴파일 에러
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(); }

컴파일 시 표준 에러 (stderr) 메시지

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