Submission #1076303

#TimeUsernameProblemLanguageResultExecution timeMemory
1076303MarwenElarbiSoccer Stadium (IOI23_soccer)C++17
0 / 100
0 ms348 KiB
#include <bits/stdc++.h> #include "soccer.h" using namespace std; #define pb push_back #define fi first #define se second const int nax = 2e5+5; const int MOD = 1e9+7; int biggest_stadium(int N, std::vector<std::vector<int>> F) { int n=N; int ans=0; bool test=0; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { test|=F[i][j]; if(F[i][j]){ ans=n*n-min({i+1+j,i+n-j,j+n-i,n-i+n-j-1}); } } } if(n==1&&test) return 0; if(test) return 1; else return n*n; }

Compilation message (stderr)

soccer.cpp: In function 'int biggest_stadium(int, std::vector<std::vector<int> >)':
soccer.cpp:13:9: warning: variable 'ans' set but not used [-Wunused-but-set-variable]
   13 |     int ans=0;
      |         ^~~
#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...