#include "soccer.h"
#include<bits/stdc++.h>
#include<random>
#define ll long long
#define F first
#define S second
#define in insert
#define pb push_back
#define ppb pop_back()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define sqr 340
#define mod 1000000007
#define mid ((l+r)/2)
#define lc (2*n)
#define rc (2*n+1)
using namespace std;
ll n;
int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
n=N;
ll w = (1<<(n*n));
ll ans = 0;
for(int h = 0 ; w>h ; h++)
{
ll g[n][n];
ll b = 1;
ll sz=0;
for(int i = 0 ; n>i ; i++)
{
for(int j = 0 ; n>j ; j++)
{
g[i][j]= (h&b);
b*=2;
}
}
bool nt = 0;
for(int i = 0 ; n>i ; i++)
{
for(int j = 0 ; n>j ; j++)
{
if(F[i][j]&&g[i][j])
nt=1;
if(g[i][j])
sz++;
}
}
if(nt)
continue;
bool gt = 1;
for(int i = 0 ; n>i ; i++)
{
for(int j = 0 ; n>j ; j++)
{
for(int i1 = 0 ; n>i1 ; i1++)
{
for(int j1 = 0 ; n>j1 ; j1++)
{
if(!g[i][j]||!g[i1][j1])
continue;
bool l1 = 1 , r1 = 1 , l2 = 1 , r2 = 1;
for(int d = min(i,i1) ; max(i,i1)>=d ; d++)
{
if(g[d][j]==0)
l1=0;
if(g[d][j1]==0)
l2=0;
}
for(int d = min(j,j1) ; max(j,j1)>=d ; d++)
{
if(g[i1][d]==0)
r1=0;
if(g[i][d]==0)
r2=0;
}
if((!(l1&&r1))&&(!(l2&&r2)))
gt=0;
}
}
}
}
if(gt)
ans=max(ans,sz);
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
4567 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
ok |
2 |
Correct |
0 ms |
348 KB |
ok |
3 |
Incorrect |
363 ms |
408 KB |
wrong |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
ok |
2 |
Correct |
0 ms |
348 KB |
ok |
3 |
Correct |
0 ms |
348 KB |
ok |
4 |
Correct |
0 ms |
348 KB |
ok |
5 |
Correct |
0 ms |
348 KB |
ok |
6 |
Correct |
0 ms |
348 KB |
ok |
7 |
Correct |
0 ms |
348 KB |
ok |
8 |
Correct |
0 ms |
348 KB |
ok |
9 |
Correct |
0 ms |
348 KB |
ok |
10 |
Correct |
1 ms |
348 KB |
ok |
11 |
Correct |
0 ms |
348 KB |
ok |
12 |
Correct |
1 ms |
344 KB |
ok |
13 |
Correct |
0 ms |
348 KB |
ok |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
4567 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
4567 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
4567 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
4567 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |