Submission #386375

# Submission time Handle Problem Language Result Execution time Memory
386375 2021-04-06T13:22:03 Z vanic Bomb (IZhO17_bomb) C++14
3 / 100
1000 ms 640 KB
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <set>
#include <stack>
#include <vector>
#include <queue>
#include <map>
#include <cstring>
#include <array>
#include <bitset>
#include <cassert>

using namespace std;

const int maxn=105;

bitset < maxn > a[maxn];
bitset < maxn > b[maxn];
int n, m;

bool provjeri(int x, int y){
	for(int i=0; i<n; i++){
		for(int j=0; j<m; j++){
			b[i][j]=a[i][j];
		}
	}
	bool p;
	bool ne;
	for(int i=0; i<n; i++){
		for(int j=0; j<m; j++){
			if(a[i][j]){
				p=0;
				ne=0;
				for(int k=i; k<i+x; k++){
					for(int l=j; l<j+y; l++){
						if(k>=n || l>=m || !a[k][l]){
							ne=1;
							continue;
						}
						if(b[k][l]){
							b[k][l]=0;
							p=1;
						}
					}
				}
				if(ne && p){
					return 0;
				}
			}
		}
	}
	return 1;

}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin >> n >> m;
	assert(n<maxn && m<maxn);
	string s;
	for(int i=0; i<n; i++){
		cin >> s;
		for(int j=0; j<m; j++){
			if(s[j]=='1'){
				a[i][j]=1;
			}
		}
	}
	int maksi=0;
	for(int i=1; i<=n; i++){
		for(int j=1; j<=m; j++){
			if(provjeri(i, j)){
				maksi=max(maksi, i*j);
			}
		}
	}
	cout << maksi << '\n';
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Output isn't correct
2 Correct 1 ms 364 KB Output is correct
3 Runtime error 1 ms 492 KB Execution killed with signal 6
4 Runtime error 2 ms 492 KB Execution killed with signal 6
5 Runtime error 1 ms 492 KB Execution killed with signal 6
6 Runtime error 2 ms 640 KB Execution killed with signal 6
7 Incorrect 1 ms 364 KB Output isn't correct
8 Incorrect 2 ms 364 KB Output isn't correct
9 Incorrect 2 ms 364 KB Output isn't correct
10 Incorrect 1 ms 364 KB Output isn't correct
11 Incorrect 2 ms 364 KB Output isn't correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Incorrect 1 ms 364 KB Output isn't correct
15 Incorrect 1 ms 364 KB Output isn't correct
16 Incorrect 2 ms 384 KB Output isn't correct
17 Incorrect 86 ms 492 KB Output isn't correct
18 Incorrect 79 ms 364 KB Output isn't correct
19 Incorrect 206 ms 396 KB Output isn't correct
20 Incorrect 231 ms 492 KB Output isn't correct
21 Incorrect 82 ms 492 KB Output isn't correct
22 Incorrect 185 ms 364 KB Output isn't correct
23 Incorrect 395 ms 364 KB Output isn't correct
24 Incorrect 140 ms 492 KB Output isn't correct
25 Incorrect 483 ms 492 KB Output isn't correct
26 Incorrect 721 ms 492 KB Output isn't correct
27 Runtime error 2 ms 492 KB Execution killed with signal 6
28 Runtime error 2 ms 492 KB Execution killed with signal 6
29 Runtime error 1 ms 492 KB Execution killed with signal 6
30 Runtime error 1 ms 492 KB Execution killed with signal 6
31 Runtime error 2 ms 636 KB Execution killed with signal 6
32 Runtime error 1 ms 492 KB Execution killed with signal 6
33 Runtime error 2 ms 492 KB Execution killed with signal 6
34 Runtime error 1 ms 492 KB Execution killed with signal 6
35 Runtime error 2 ms 492 KB Execution killed with signal 6
36 Runtime error 2 ms 492 KB Execution killed with signal 6
37 Incorrect 2 ms 364 KB Output isn't correct
38 Runtime error 2 ms 492 KB Execution killed with signal 6
39 Incorrect 2 ms 364 KB Output isn't correct
40 Runtime error 2 ms 492 KB Execution killed with signal 6
41 Incorrect 2 ms 364 KB Output isn't correct
42 Execution timed out 1083 ms 364 KB Time limit exceeded
43 Runtime error 1 ms 492 KB Execution killed with signal 6
44 Runtime error 2 ms 492 KB Execution killed with signal 6
45 Runtime error 1 ms 492 KB Execution killed with signal 6
46 Runtime error 1 ms 492 KB Execution killed with signal 6
47 Runtime error 2 ms 492 KB Execution killed with signal 6
48 Runtime error 1 ms 492 KB Execution killed with signal 6
49 Runtime error 1 ms 492 KB Execution killed with signal 6
50 Runtime error 2 ms 492 KB Execution killed with signal 6
51 Runtime error 1 ms 492 KB Execution killed with signal 6
52 Runtime error 2 ms 492 KB Execution killed with signal 6
53 Runtime error 2 ms 492 KB Execution killed with signal 6
54 Runtime error 2 ms 492 KB Execution killed with signal 6
55 Runtime error 1 ms 492 KB Execution killed with signal 6
56 Runtime error 2 ms 492 KB Execution killed with signal 6
57 Runtime error 1 ms 492 KB Execution killed with signal 6
58 Runtime error 1 ms 492 KB Execution killed with signal 6
59 Runtime error 1 ms 492 KB Execution killed with signal 6
60 Runtime error 1 ms 492 KB Execution killed with signal 6
61 Runtime error 1 ms 492 KB Execution killed with signal 6
62 Runtime error 2 ms 620 KB Execution killed with signal 6
63 Runtime error 2 ms 492 KB Execution killed with signal 6
64 Runtime error 1 ms 492 KB Execution killed with signal 6
65 Runtime error 1 ms 492 KB Execution killed with signal 6
66 Runtime error 1 ms 492 KB Execution killed with signal 6
67 Runtime error 1 ms 492 KB Execution killed with signal 6
68 Runtime error 1 ms 492 KB Execution killed with signal 6
69 Runtime error 1 ms 492 KB Execution killed with signal 6
70 Runtime error 1 ms 492 KB Execution killed with signal 6
71 Runtime error 1 ms 492 KB Execution killed with signal 6
72 Runtime error 1 ms 492 KB Execution killed with signal 6
73 Runtime error 1 ms 492 KB Execution killed with signal 6
74 Runtime error 1 ms 492 KB Execution killed with signal 6
75 Runtime error 1 ms 492 KB Execution killed with signal 6
76 Runtime error 1 ms 492 KB Execution killed with signal 6
77 Runtime error 2 ms 492 KB Execution killed with signal 6
78 Runtime error 2 ms 492 KB Execution killed with signal 6
79 Runtime error 1 ms 492 KB Execution killed with signal 6
80 Runtime error 1 ms 492 KB Execution killed with signal 6
81 Runtime error 1 ms 492 KB Execution killed with signal 6
82 Runtime error 1 ms 492 KB Execution killed with signal 6
83 Runtime error 2 ms 492 KB Execution killed with signal 6
84 Runtime error 2 ms 492 KB Execution killed with signal 6
85 Runtime error 1 ms 492 KB Execution killed with signal 6
86 Runtime error 1 ms 492 KB Execution killed with signal 6
87 Runtime error 1 ms 492 KB Execution killed with signal 6
88 Runtime error 1 ms 492 KB Execution killed with signal 6
89 Runtime error 1 ms 492 KB Execution killed with signal 6
90 Runtime error 1 ms 492 KB Execution killed with signal 6
91 Runtime error 1 ms 492 KB Execution killed with signal 6
92 Runtime error 1 ms 492 KB Execution killed with signal 6
93 Runtime error 1 ms 492 KB Execution killed with signal 6
94 Runtime error 1 ms 492 KB Execution killed with signal 6
95 Runtime error 1 ms 492 KB Execution killed with signal 6
96 Runtime error 1 ms 492 KB Execution killed with signal 6
97 Runtime error 1 ms 492 KB Execution killed with signal 6
98 Runtime error 1 ms 492 KB Execution killed with signal 6
99 Runtime error 2 ms 492 KB Execution killed with signal 6
100 Runtime error 1 ms 492 KB Execution killed with signal 6