이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "soccer.h"
#include <bits/stdc++.h>
using namespace std;
typedef int ll;
typedef __int128 lll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pld;
#define MAX 9223372036854775807LL
#define MIN -9223372036854775807LL
#define INF 987654321
#define fi first
#define se second
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cout << fixed; cout.precision(10);
#define sp << " "
#define en << "\n"
#define compress(v) sort(v.begin(), v.end()), v.erase(unique(v.begin(), v.end()), v.end())
ll n;
ll a[2010][2010];
ll biggest_stadium(ll N, vector<vector<ll> > F)
{
n = N;
for(ll i = 1 ; i <= n ; i++)
{
for(ll j = 1 ; j <= n ; j++)
a[i][j] = F[i - 1][j - 1];
}
ll ans = 0;
for(ll i = 1 ; i <= n ; i++)
{
for(ll j = 1 ; j <= n ; j++)
{
if(a[i][j] == 0)
ans++;
}
}
return ans;
for(ll i = 1 ; i <= n ; i++)
{
ll minn = INF, maxx = -INF;
for(ll j = 1 ; j <= n ; j++)
{
if(a[i][j] == 0)
{
minn = min(minn, j);
maxx = max(maxx, j);
}
}
if(minn == INF)
continue;
for(ll j = minn + 1 ; j < maxx ; j++)
{
if(a[i][j] == 1)
return 1;
}
}
for(ll j = 1 ; j <= n ; j++)
{
ll minn = INF, maxx = -INF;
for(ll i = 1 ; i <= n ; i++)
{
if(a[i][j] == 0)
{
minn = min(minn, i);
maxx = max(maxx, i);
}
}
if(minn == INF)
continue;
for(ll i = minn + 1 ; i < maxx ; i++)
{
if(a[i][j] == 1)
return 1;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |