Submission #1122301

#TimeUsernameProblemLanguageResultExecution timeMemory
1122301deeraSoccer Stadium (IOI23_soccer)C++17
0 / 100
1 ms504 KiB
#include "bits/stdc++.h" using namespace std; int biggest_stadium(int N, vector<vector<int>> F) { int num_trees = 0; for (auto i: F) for (int j: i) num_trees += j; if (num_trees == 1) { int x, y; for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) if (F[i][j] == 1) { x = i, y = j; break; } return N*N - min(x + 1, N - x) * min(y + 1, N - y); } return 0; }

Compilation message (stderr)

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