답안 #841785

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
841785 2023-09-02T05:38:10 Z ntannn 축구 경기장 (IOI23_soccer) C++17
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
//#pragma GCC optimize("O3,unroll-loops,no-stack-protector")
//#pragma GCC target("sse4,avx2,fma")
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()

using namespace std;

typedef long long ll;
typedef pair<int,int> ii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ii> vii;
typedef vector<vi> vvi;

const int N = 1e6+10;
const ll MOD = 1e9+7;

int n;
vvi a;

void solve() {
    for(int i = 0; i < n; i++) {
        for(int j = 0; j < n; j++) {
            if(a[i][j] == 1) {
                return cout << n*n - min({(i+1)*(j+1), (i+1)*(n-j), (n-i)*(j+1), (n-i)*(n-j)}), void();
            }
        }
    }
    cout << n*n;
}

void init() {
    cin >> n;
    for(int i = 0; i < n; i++) {
        vi temp;
        temp.resize(n);
        for(int j = 0; j < n; j++)
            cin >> temp[j];
        a.eb(temp);
    }
}

#define task "a"
signed main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    int test_case = 1;
    //cin >> test_case;
    while(test_case--) {
        init();
        solve();
    }
}

Compilation message

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