Submission #1037865

#TimeUsernameProblemLanguageResultExecution timeMemory
1037865fv3Soccer Stadium (IOI23_soccer)C++17
0 / 100
1 ms600 KiB
#include "soccer.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; int biggest_stadium(int N, vector<vector<int>> F) { int x, y; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (F[i][j]) { y = j; x = i; } } } return N*N - min(min((x+1)*(y+1), (x+1)*(N-y)), min((N-x)*(y+1), (N-x)*(N-y))); }

Compilation message (stderr)

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