답안 #1065256

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1065256 2024-08-19T04:52:04 Z LittleOrange 축구 경기장 (IOI23_soccer) C++17
컴파일 오류
0 ms 0 KB
#include "soccer.h"
#include<bits/stdc++.h>
using namespace std;
using ll = int;
struct pos{
    ll x,y;
    bool operator<(const pos &o) const{
        return x!=o.x?x<o.x:y<o.y;
    }
};
struct dsu{
    ll c;
    vector<ll> p;
    dsu(ll N):c(N),p(N,-1){}
    ll g(ll i){
        return p[i]<0?i:p[i] = g(p[i]);
    }
    bool m(ll a, ll b){
        a = g(a),b=g(b);
        if(a==b) return false;
        c--;
        if(p[a]>p[b]) swap(a,b);
        p[a] += p[b];
        p[b] = a;
        return true;
    }
}
int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
    auto &a = F;
    ll n = N;
    vector<pos> v;
    for(ll i = 0;i<n;i++){
        for(ll j = 0;j<n;j++){
            if (F[i][j]){
                ll v1 = j*n+(n-i-1)*(n-j);
                ll v2 = j*n+i*(n-j);
                ll v3 = (n-j-1)*n+(n-i-1)*(j+1);
                ll v4 = (n-j-1)*n+i*(j+1);
                return max({v1,v2,v3,v4});
            }
        }
    }
    return 0;
}

Compilation message

soccer.cpp:27:2: error: expected ';' after struct definition
   27 | }
      |  ^
      |  ;
soccer.cpp: In function 'int biggest_stadium(int, std::vector<std::vector<int> >)':
soccer.cpp:30:11: warning: unused variable 'a' [-Wunused-variable]
   30 |     auto &a = F;
      |           ^