Submission #1122304

#TimeUsernameProblemLanguageResultExecution timeMemory
1122304deeraSoccer Stadium (IOI23_soccer)C++17
6 / 100
197 ms39580 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 == 0) { return N*N; } 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:20:48: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
   20 |         return N*N - min(x + 1, N - x) * min(y + 1, N - y);
      |                                              ~~^~~
soccer.cpp:20:28: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
   20 |         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...