Submission #1059665

#TimeUsernameProblemLanguageResultExecution timeMemory
1059665tolbiSoccer Stadium (IOI23_soccer)C++17
6 / 100
194 ms39432 KiB
#include "soccer.h" int biggest_stadium(int N, std::vector<std::vector<int>> F) { int x=-1,y=-1; for (int i =0 ; i < F.size(); i++){ for (int j = 0; j < F[i].size(); j++){ if (F[i][j]==1){ x=i,y=j; } } } if (x==-1){ return N*N; } else { return N*N-std::min(x+1,N-x)*std::min(y+1,N-y); } }

Compilation message (stderr)

soccer.cpp: In function 'int biggest_stadium(int, std::vector<std::vector<int> >)':
soccer.cpp:6:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    6 |     for (int i =0 ; i < F.size(); i++){
      |                     ~~^~~~~~~~~~
soccer.cpp:7:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |         for (int j = 0; j < F[i].size(); j++){
      |                         ~~^~~~~~~~~~~~~
#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...