Submission #843953

# Submission time Handle Problem Language Result Execution time Memory
843953 2023-09-04T17:58:47 Z mihaibun Soccer Stadium (IOI23_soccer) C++17
Compilation error
0 ms 0 KB
#include <iostream>
#include <soccer.h>
using namespace std;

int biggest_stadium(int N, int F[2001][2001] )
{
    int i,j,x;
    for(i = 0; i < N; i++)
        for(j = 0; j < N; j++)
            if(F[i][j]==0) x++;
    return x;
}

Compilation message

soccer.cpp: In function 'int biggest_stadium(int, int (*)[2001])':
soccer.cpp:11:12: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
   11 |     return x;
      |            ^
/usr/bin/ld: /tmp/cc1bWOXX.o: in function `main':
grader.cpp:(.text.startup+0x4ac): undefined reference to `biggest_stadium(int, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)'
collect2: error: ld returned 1 exit status