Submission #832175

# Submission time Handle Problem Language Result Execution time Memory
832175 2023-08-21T05:43:47 Z vjudge1 Bomb (IZhO17_bomb) C++14
13 / 100
87 ms 13112 KB
#include<bits/stdc++.h>

#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;

#define ll long long
#define rep(i,n,N) for(int i = n; i<=N; ++i)
#define rap(i,n,N) for(int i = n; i>=N; --i)
#define For(i,n,N) for(int i = n; i< N; ++i)
#define endl '\n'

const int MAX = 2500 + 5;

int n,m,mnr,mnc,cnt;
char c;
bool x[MAX][MAX];

int main(){
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin>>n>>m;
	mnr = n, mnc = m;
	rep(i,1,n){
		rep(j,1,m){
			cin>>c;
			x[i][j] = c=='1';
			if(x[i][j])++cnt;
			else if(cnt)mnc = min(mnc, cnt), cnt = 0;
		}
		if(cnt)mnc = min(mnc, cnt), cnt = 0;
	}
	rep(j,1,m){
		rep(i,1,n){
			if(x[i][j])++cnt;
			else if(cnt)mnr = min(mnr, cnt), cnt = 0;
		}
		if(cnt)mnr = min(mnr, cnt), cnt = 0;
	}
	assert(mnr*mnc<=100);
	cout<<mnr*mnc<<endl;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 340 KB Output is correct
3 Correct 2 ms 6356 KB Output is correct
4 Correct 2 ms 6356 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Incorrect 0 ms 340 KB Output isn't correct
9 Incorrect 0 ms 340 KB Output isn't correct
10 Incorrect 0 ms 340 KB Output isn't correct
11 Incorrect 0 ms 340 KB Output isn't correct
12 Incorrect 1 ms 340 KB Output isn't correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Incorrect 0 ms 340 KB Output isn't correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 468 KB Output is correct
18 Incorrect 0 ms 468 KB Output isn't correct
19 Runtime error 1 ms 980 KB Execution killed with signal 6
20 Runtime error 1 ms 980 KB Execution killed with signal 6
21 Incorrect 0 ms 340 KB Output isn't correct
22 Incorrect 0 ms 468 KB Output isn't correct
23 Runtime error 1 ms 980 KB Execution killed with signal 6
24 Runtime error 1 ms 852 KB Execution killed with signal 6
25 Runtime error 1 ms 980 KB Execution killed with signal 6
26 Runtime error 1 ms 980 KB Execution killed with signal 6
27 Correct 1 ms 980 KB Output is correct
28 Incorrect 2 ms 980 KB Output isn't correct
29 Runtime error 3 ms 2388 KB Execution killed with signal 6
30 Runtime error 4 ms 2644 KB Execution killed with signal 6
31 Runtime error 3 ms 2164 KB Execution killed with signal 6
32 Runtime error 3 ms 2516 KB Execution killed with signal 6
33 Runtime error 4 ms 2644 KB Execution killed with signal 6
34 Incorrect 1 ms 1108 KB Output isn't correct
35 Runtime error 4 ms 2644 KB Execution killed with signal 6
36 Runtime error 4 ms 2644 KB Execution killed with signal 6
37 Incorrect 0 ms 340 KB Output isn't correct
38 Runtime error 72 ms 12864 KB Execution killed with signal 6
39 Incorrect 1 ms 340 KB Output isn't correct
40 Runtime error 10 ms 4804 KB Execution killed with signal 6
41 Incorrect 1 ms 340 KB Output isn't correct
42 Runtime error 1 ms 980 KB Execution killed with signal 6
43 Runtime error 68 ms 12796 KB Execution killed with signal 6
44 Runtime error 4 ms 2724 KB Execution killed with signal 6
45 Runtime error 68 ms 12824 KB Execution killed with signal 6
46 Runtime error 75 ms 12796 KB Execution killed with signal 6
47 Runtime error 70 ms 12836 KB Execution killed with signal 6
48 Runtime error 76 ms 12848 KB Execution killed with signal 6
49 Correct 67 ms 6324 KB Output is correct
50 Runtime error 66 ms 12852 KB Execution killed with signal 6
51 Runtime error 66 ms 12912 KB Execution killed with signal 6
52 Runtime error 71 ms 12876 KB Execution killed with signal 6
53 Runtime error 66 ms 12836 KB Execution killed with signal 6
54 Runtime error 70 ms 12888 KB Execution killed with signal 6
55 Runtime error 68 ms 12876 KB Execution killed with signal 6
56 Runtime error 69 ms 12872 KB Execution killed with signal 6
57 Runtime error 87 ms 12820 KB Execution killed with signal 6
58 Runtime error 67 ms 12896 KB Execution killed with signal 6
59 Runtime error 69 ms 12832 KB Execution killed with signal 6
60 Runtime error 70 ms 12840 KB Execution killed with signal 6
61 Runtime error 75 ms 12892 KB Execution killed with signal 6
62 Runtime error 67 ms 12916 KB Execution killed with signal 6
63 Runtime error 74 ms 12876 KB Execution killed with signal 6
64 Runtime error 66 ms 12796 KB Execution killed with signal 6
65 Runtime error 69 ms 12864 KB Execution killed with signal 6
66 Runtime error 68 ms 12832 KB Execution killed with signal 6
67 Runtime error 70 ms 12828 KB Execution killed with signal 6
68 Runtime error 74 ms 12796 KB Execution killed with signal 6
69 Runtime error 66 ms 12876 KB Execution killed with signal 6
70 Runtime error 43 ms 10388 KB Execution killed with signal 6
71 Runtime error 69 ms 12820 KB Execution killed with signal 6
72 Runtime error 66 ms 12880 KB Execution killed with signal 6
73 Runtime error 67 ms 12868 KB Execution killed with signal 6
74 Runtime error 70 ms 12920 KB Execution killed with signal 6
75 Runtime error 70 ms 12832 KB Execution killed with signal 6
76 Runtime error 68 ms 12832 KB Execution killed with signal 6
77 Runtime error 67 ms 12904 KB Execution killed with signal 6
78 Runtime error 72 ms 12920 KB Execution killed with signal 6
79 Runtime error 67 ms 12924 KB Execution killed with signal 6
80 Runtime error 76 ms 12892 KB Execution killed with signal 6
81 Runtime error 67 ms 12876 KB Execution killed with signal 6
82 Runtime error 81 ms 12888 KB Execution killed with signal 6
83 Runtime error 66 ms 12800 KB Execution killed with signal 6
84 Runtime error 66 ms 12804 KB Execution killed with signal 6
85 Runtime error 80 ms 12836 KB Execution killed with signal 6
86 Runtime error 68 ms 12876 KB Execution killed with signal 6
87 Runtime error 67 ms 12876 KB Execution killed with signal 6
88 Runtime error 69 ms 12892 KB Execution killed with signal 6
89 Runtime error 66 ms 12884 KB Execution killed with signal 6
90 Runtime error 46 ms 10316 KB Execution killed with signal 6
91 Runtime error 68 ms 12808 KB Execution killed with signal 6
92 Runtime error 69 ms 13112 KB Execution killed with signal 6
93 Runtime error 66 ms 12848 KB Execution killed with signal 6
94 Runtime error 68 ms 12908 KB Execution killed with signal 6
95 Runtime error 68 ms 12828 KB Execution killed with signal 6
96 Runtime error 67 ms 12836 KB Execution killed with signal 6
97 Runtime error 66 ms 12884 KB Execution killed with signal 6
98 Runtime error 66 ms 12860 KB Execution killed with signal 6
99 Runtime error 70 ms 12832 KB Execution killed with signal 6
100 Runtime error 67 ms 12848 KB Execution killed with signal 6