Submission #1247402

#TimeUsernameProblemLanguageResultExecution timeMemory
1247402emad234Soccer Stadium (IOI23_soccer)C++20
Compilation error
0 ms0 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(a[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(a[i][j] == 1){
        if(num != 0) flag = 1;
        num = 0;
      }else{
        if(flag) can = 0;
        num++;
      }
    }
  }
  return (can ? N * N : 0);
}

Compilation message (stderr)

soccer.cpp: In function 'int biggest_stadium(int, std::vector<std::vector<int> >)':
soccer.cpp:23:10: error: 'a' was not declared in this scope
   23 |       if(a[i][j] == 1){
      |          ^
soccer.cpp:36:10: error: 'a' was not declared in this scope
   36 |       if(a[i][j] == 1){
      |          ^