제출 #1065256

#제출 시각아이디문제언어결과실행 시간메모리
1065256LittleOrange축구 경기장 (IOI23_soccer)C++17
컴파일 에러
0 ms0 KiB
#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; }

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

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;
      |           ^