Submission #1081857

#TimeUsernameProblemLanguageResultExecution timeMemory
1081857LaMatematica14Soccer Stadium (IOI23_soccer)C++17
0 / 100
0 ms348 KiB
#include "soccer.h" #include <bits/stdc++.h> using namespace std; int biggest_stadium(int N, std::vector<std::vector<int>> F){ int a, b; for (int i =0 ; i < N; i++) { for (int j = 0; j < N; j++) { if (F[i][j]) { a = i; b = j; } } } return N*N-min(min(a*b,(N-a-1)*(N-b-1)),min((N-a-1)*b, (N-b-1)*a)); }

Compilation message (stderr)

soccer.cpp: In function 'int biggest_stadium(int, std::vector<std::vector<int> >)':
soccer.cpp:15:25: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
   15 |     return N*N-min(min(a*b,(N-a-1)*(N-b-1)),min((N-a-1)*b, (N-b-1)*a));
      |                        ~^~
soccer.cpp:15:25: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized]
#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...