제출 #1060993

#제출 시각아이디문제언어결과실행 시간메모리
1060993Sir_Ahmed_Imran전선 연결 (IOI17_wiring)C++17
컴파일 에러
0 ms0 KiB
///~~~LOTA~~~/// #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define append push_back #define add insert #define nl '\n' #define ff first #define ss second #define pii pair<int,int> #define pll pair<ll,ll> #define all(x) (x).begin(),(x).end() #define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define terminator main #define MAXN 201 ll dp[MAXN][MAXN]; ll min_total_length(vector<int> r,vector<int> b){ int n,m; dp[0][0]=0; n=r.size(); m=b.size(); for(int i=1;i<=m;i++) dp[0][i]=1e18; for(int i=1;i<=n;i++) dp[i][0]=dp[i-1][0]+abs(r[i-1]-b[0]); for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) dp[i][j]=min(dp[i][j-1],dp[i-1][j-1])+abs(r[i-1]-b[j-1]); return dp[n][m]; } void solve(){ int n,m,o; cin>>n>>m; vector<int> r,b; for(int i=0;i<n;i++){ cin>>o; r.append(o); } for(int i=0;i<m;i++){ cin>>o; b.append(o); } cout<<min_total_length(r,b)<<nl; } int terminator(){ L0TA; solve(); return 0; }

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

/usr/bin/ld: /tmp/cck5c4Yr.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccchVgJt.o:wiring.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status