# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
833325 |
2023-08-22T04:34:53 Z |
vjudge1 |
Exam (eJOI20_exam) |
C++17 |
|
1 ms |
212 KB |
#include <bits/stdc++.h>
using namespace std;
int n, m;
const int maxn = 2504;
int prevw;
int prevh[maxn];
int main() {
cin >> n >> m;
int maxpossiblew = maxn;
int maxpossibleh = maxn;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
char x;
cin >> x;
if (x == '1') {
prevw++;
prevh[j]++;
} else {
if (prevw > 0) {
maxpossiblew = min(maxpossiblew, prevw);
}
if (prevh[j] > 0) {
maxpossibleh = min(maxpossibleh, prevh[j]);
}
prevw = 0;
prevh[j] = 0;
}
}
if (prevw > 0) {
maxpossiblew = min(maxpossiblew, prevw);
}
prevw = 0;
}
for (int j = 1; j <= m; j++) {
if (prevh[j] > 0)
maxpossibleh = min(maxpossibleh, prevh[j]);
}
cout << maxpossibleh * maxpossiblew << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |