제출 #833406

#제출 시각아이디문제언어결과실행 시간메모리
833406vjudge1Bomb (IZhO17_bomb)C++17
6 / 100
177 ms10308 KiB
#include <bits/stdc++.h> #define ll long long #define fi first #define se second #define pb push_back #define pll pair<ll, ll> using namespace std; ll n, m, hor, ver, cnt; string s[3000]; int main(){ cin >> n >> m; for(ll i=0; i<n; i++){ cin >> s[i]; } hor=n; ver=m; //cari minimum di horizontal for(ll i=0; i<n; i++){ cnt=0; bool ujung=1; for(ll j=0; j<m; j++){ if(s[i][j]=='0'){ if(cnt>0 && !ujung) hor=min(hor, cnt); cnt=0; ujung=0; } else cnt++; } } //cari minimum di vertikal for(ll i=0; i<m; i++){ cnt=0; bool ujung=1; for(ll j=0; j<n; j++){ if(s[j][i]=='0'){ if(cnt>0 && !ujung) ver=min(ver, cnt); cnt=0; ujung=0; } else cnt++; } } cout << hor*ver << endl; return 0; }

컴파일 시 표준 에러 (stderr) 메시지

bomb.cpp: In function 'int main()':
bomb.cpp:23:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   23 |     if(cnt>0 && !ujung) hor=min(hor, cnt); cnt=0;
      |     ^~
bomb.cpp:23:44: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   23 |     if(cnt>0 && !ujung) hor=min(hor, cnt); cnt=0;
      |                                            ^~~
bomb.cpp:36:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   36 |     if(cnt>0 && !ujung) ver=min(ver, cnt); cnt=0;
      |     ^~
bomb.cpp:36:44: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   36 |     if(cnt>0 && !ujung) ver=min(ver, cnt); cnt=0;
      |                                            ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...