제출 #1122301

#제출 시각아이디문제언어결과실행 시간메모리
1122301deera축구 경기장 (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; }

컴파일 시 표준 에러 (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...