# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1106799 |
2024-10-31T04:49:07 Z |
stdfloat |
Bomb (IZhO17_bomb) |
C++17 |
|
1000 ms |
7184 KB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(false); cin.tie(nullptr);
int n, m;
cin >> n >> m;
vector<string> a(n);
for (auto &i : a)
cin >> i;
int mn1 = n, mn2 = m;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
if (a[i][j] == '0') continue;
int l = i, r = i;
while (0 < l && a[l - 1][j] == '1') l--;
while (r + 1 < n && a[r + 1][j] == '1') r++;
mn1 = min(mn1, r - l + 1);
l = r = j;
while (0 < l && a[i][l - 1] == '1') l--;
while (r + 1 < m && a[i][r + 1] == '1') r++;
mn2 = min(mn2, r - l + 1);
}
}
cout << mn1 * mn2;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
2 ms |
536 KB |
Output is correct |
4 |
Correct |
2 ms |
504 KB |
Output is correct |
5 |
Correct |
1 ms |
336 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
8 |
Incorrect |
1 ms |
504 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
16 |
Correct |
1 ms |
336 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
19 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
20 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
21 |
Incorrect |
1 ms |
504 KB |
Output isn't correct |
22 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
23 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
24 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
25 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
26 |
Correct |
2 ms |
504 KB |
Output is correct |
27 |
Correct |
21 ms |
336 KB |
Output is correct |
28 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
29 |
Incorrect |
38 ms |
592 KB |
Output isn't correct |
30 |
Incorrect |
8 ms |
592 KB |
Output isn't correct |
31 |
Incorrect |
4 ms |
628 KB |
Output isn't correct |
32 |
Incorrect |
3 ms |
592 KB |
Output isn't correct |
33 |
Incorrect |
14 ms |
680 KB |
Output isn't correct |
34 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
35 |
Incorrect |
2 ms |
592 KB |
Output isn't correct |
36 |
Correct |
139 ms |
592 KB |
Output is correct |
37 |
Incorrect |
1 ms |
504 KB |
Output isn't correct |
38 |
Execution timed out |
1100 ms |
6992 KB |
Time limit exceeded |
39 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
40 |
Incorrect |
723 ms |
1104 KB |
Output isn't correct |
41 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
42 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
43 |
Execution timed out |
1075 ms |
6992 KB |
Time limit exceeded |
44 |
Incorrect |
48 ms |
592 KB |
Output isn't correct |
45 |
Execution timed out |
1053 ms |
7164 KB |
Time limit exceeded |
46 |
Correct |
125 ms |
6992 KB |
Output is correct |
47 |
Execution timed out |
1077 ms |
7184 KB |
Time limit exceeded |
48 |
Execution timed out |
1060 ms |
6992 KB |
Time limit exceeded |
49 |
Execution timed out |
1058 ms |
6992 KB |
Time limit exceeded |
50 |
Execution timed out |
1051 ms |
6992 KB |
Time limit exceeded |
51 |
Execution timed out |
1068 ms |
6992 KB |
Time limit exceeded |
52 |
Execution timed out |
1057 ms |
6992 KB |
Time limit exceeded |
53 |
Execution timed out |
1031 ms |
6992 KB |
Time limit exceeded |
54 |
Execution timed out |
1035 ms |
6992 KB |
Time limit exceeded |
55 |
Execution timed out |
1073 ms |
6992 KB |
Time limit exceeded |
56 |
Execution timed out |
1070 ms |
6992 KB |
Time limit exceeded |
57 |
Execution timed out |
1074 ms |
6992 KB |
Time limit exceeded |
58 |
Execution timed out |
1067 ms |
6992 KB |
Time limit exceeded |
59 |
Execution timed out |
1080 ms |
6992 KB |
Time limit exceeded |
60 |
Execution timed out |
1050 ms |
6992 KB |
Time limit exceeded |
61 |
Execution timed out |
1054 ms |
6992 KB |
Time limit exceeded |
62 |
Execution timed out |
1074 ms |
6992 KB |
Time limit exceeded |
63 |
Execution timed out |
1071 ms |
6992 KB |
Time limit exceeded |
64 |
Execution timed out |
1035 ms |
6992 KB |
Time limit exceeded |
65 |
Execution timed out |
1066 ms |
6992 KB |
Time limit exceeded |
66 |
Execution timed out |
1037 ms |
6992 KB |
Time limit exceeded |
67 |
Execution timed out |
1063 ms |
6992 KB |
Time limit exceeded |
68 |
Execution timed out |
1066 ms |
6992 KB |
Time limit exceeded |
69 |
Execution timed out |
1033 ms |
6992 KB |
Time limit exceeded |
70 |
Incorrect |
370 ms |
4688 KB |
Output isn't correct |
71 |
Execution timed out |
1066 ms |
6992 KB |
Time limit exceeded |
72 |
Execution timed out |
1065 ms |
6992 KB |
Time limit exceeded |
73 |
Execution timed out |
1065 ms |
6992 KB |
Time limit exceeded |
74 |
Execution timed out |
1037 ms |
6992 KB |
Time limit exceeded |
75 |
Execution timed out |
1069 ms |
6992 KB |
Time limit exceeded |
76 |
Execution timed out |
1049 ms |
6992 KB |
Time limit exceeded |
77 |
Execution timed out |
1038 ms |
6992 KB |
Time limit exceeded |
78 |
Execution timed out |
1067 ms |
6992 KB |
Time limit exceeded |
79 |
Incorrect |
18 ms |
6992 KB |
Output isn't correct |
80 |
Incorrect |
17 ms |
6992 KB |
Output isn't correct |
81 |
Incorrect |
92 ms |
6944 KB |
Output isn't correct |
82 |
Execution timed out |
1082 ms |
6992 KB |
Time limit exceeded |
83 |
Execution timed out |
1074 ms |
6992 KB |
Time limit exceeded |
84 |
Incorrect |
15 ms |
6992 KB |
Output isn't correct |
85 |
Execution timed out |
1099 ms |
7124 KB |
Time limit exceeded |
86 |
Execution timed out |
1044 ms |
6992 KB |
Time limit exceeded |
87 |
Execution timed out |
1054 ms |
7004 KB |
Time limit exceeded |
88 |
Execution timed out |
1058 ms |
7160 KB |
Time limit exceeded |
89 |
Execution timed out |
1062 ms |
6992 KB |
Time limit exceeded |
90 |
Execution timed out |
1004 ms |
4724 KB |
Time limit exceeded |
91 |
Execution timed out |
1068 ms |
6992 KB |
Time limit exceeded |
92 |
Execution timed out |
1083 ms |
6992 KB |
Time limit exceeded |
93 |
Execution timed out |
1067 ms |
6992 KB |
Time limit exceeded |
94 |
Execution timed out |
1060 ms |
6992 KB |
Time limit exceeded |
95 |
Execution timed out |
1035 ms |
6992 KB |
Time limit exceeded |
96 |
Execution timed out |
1066 ms |
6992 KB |
Time limit exceeded |
97 |
Execution timed out |
1068 ms |
6992 KB |
Time limit exceeded |
98 |
Execution timed out |
1061 ms |
6992 KB |
Time limit exceeded |
99 |
Execution timed out |
1083 ms |
6992 KB |
Time limit exceeded |
100 |
Execution timed out |
1073 ms |
6992 KB |
Time limit exceeded |