Submission #1247403

#TimeUsernameProblemLanguageResultExecution timeMemory
1247403emad234Soccer Stadium (IOI23_soccer)C++20
0 / 100
0 ms324 KiB
#include "soccer.h"
#include "bits/stdc++.h"
#define F first
#define S second
#define ll long long
#define pii pair<ll,ll>
using namespace std;
const ll  mxN = 1e6 + 33;
const ll  mod = 998244353;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<class T>
using indexed_set = tree<T,null_type,less<T>,rb_tree_tag, tree_order_statistics_node_update>;

int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
  bool can = 1;
  for(int i = 0;i < N;i++){
    int num = 0;
    bool flag = 0;
    for(int j = 0;j < N;j++){
      if(F[i][j] == 1){
        if(num != 0) flag = 1;
        num = 0;
      }else{
        if(flag) can = 0;
        num++;
      }
    }
  }
  for(int j = 0;j < N;j++){
    int num = 0;
    bool flag = 0;
    for(int i = 0;i < N;i++){
      if(F[i][j] == 1){
        if(num != 0) flag = 1;
        num = 0;
      }else{
        if(flag) can = 0;
        num++;
      }
    }
  }
  return (can ? N * N : 0);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...