답안 #705331

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
705331 2023-03-04T03:29:35 Z bin9638 말 (IOI15_horses) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define fs first
#define sc second
#define N 100010
#define pb push_back
#define ii pair<int,int>

const ll mod=1e9+7;

ll init(int n,int x[],int y[])
{
    ll res=0,cnt=1;
    for(int i=0;i<n;i++)
    {
        cnt*=x[i];
        res=max(res,cnt*y[i]);
    }
    return res;
}

#ifdef SKY
int main()
{
    freopen("A.inp","r",stdin);
    freopen("A.out","w",stdout);
    int n;
    cin>>n;
    int x[n],y[n];
    for(int i=0;i<n;i++)
        cin>>x[i];
    for(int i=0;i<n;i++)
        cin>>y[i];
    cout<<init(n,x,y);
    return 0;
}
#endif // SKY

Compilation message

/usr/bin/ld: /tmp/ccczfnKz.o: in function `main':
grader.c:(.text.startup+0x113): undefined reference to `updateX(int, int)'
/usr/bin/ld: grader.c:(.text.startup+0x16d): undefined reference to `updateY(int, int)'
collect2: error: ld returned 1 exit status