Submission #832178

# Submission time Handle Problem Language Result Execution time Memory
832178 2023-08-21T05:44:55 Z vjudge1 Bomb (IZhO17_bomb) C++14
0 / 100
101 ms 12924 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(0);
//	cout<<mnr*mnc<<endl;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 468 KB Execution killed with signal 6
2 Runtime error 1 ms 596 KB Execution killed with signal 6
3 Runtime error 9 ms 12908 KB Execution killed with signal 6
4 Runtime error 8 ms 12884 KB Execution killed with signal 6
5 Runtime error 1 ms 468 KB Execution killed with signal 6
6 Runtime error 1 ms 468 KB Execution killed with signal 6
7 Runtime error 1 ms 468 KB Execution killed with signal 6
8 Runtime error 1 ms 596 KB Execution killed with signal 6
9 Runtime error 1 ms 596 KB Execution killed with signal 6
10 Runtime error 1 ms 468 KB Execution killed with signal 6
11 Runtime error 1 ms 596 KB Execution killed with signal 6
12 Runtime error 1 ms 468 KB Execution killed with signal 6
13 Runtime error 1 ms 468 KB Execution killed with signal 6
14 Runtime error 1 ms 468 KB Execution killed with signal 6
15 Runtime error 1 ms 596 KB Execution killed with signal 6
16 Runtime error 1 ms 596 KB Execution killed with signal 6
17 Runtime error 1 ms 724 KB Execution killed with signal 6
18 Runtime error 1 ms 852 KB Execution killed with signal 6
19 Runtime error 2 ms 980 KB Execution killed with signal 6
20 Runtime error 1 ms 980 KB Execution killed with signal 6
21 Runtime error 1 ms 724 KB Execution killed with signal 6
22 Runtime error 1 ms 852 KB Execution killed with signal 6
23 Runtime error 2 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 Runtime error 4 ms 1876 KB Execution killed with signal 6
28 Runtime error 3 ms 1876 KB Execution killed with signal 6
29 Runtime error 3 ms 2388 KB Execution killed with signal 6
30 Runtime error 4 ms 2560 KB Execution killed with signal 6
31 Runtime error 4 ms 2132 KB Execution killed with signal 6
32 Runtime error 3 ms 2540 KB Execution killed with signal 6
33 Runtime error 5 ms 2644 KB Execution killed with signal 6
34 Runtime error 4 ms 2260 KB Execution killed with signal 6
35 Runtime error 4 ms 2644 KB Execution killed with signal 6
36 Runtime error 5 ms 2644 KB Execution killed with signal 6
37 Runtime error 1 ms 596 KB Execution killed with signal 6
38 Runtime error 75 ms 12832 KB Execution killed with signal 6
39 Runtime error 1 ms 596 KB Execution killed with signal 6
40 Runtime error 11 ms 4760 KB Execution killed with signal 6
41 Runtime error 1 ms 600 KB Execution killed with signal 6
42 Runtime error 1 ms 980 KB Execution killed with signal 6
43 Runtime error 81 ms 12828 KB Execution killed with signal 6
44 Runtime error 4 ms 2700 KB Execution killed with signal 6
45 Runtime error 80 ms 12860 KB Execution killed with signal 6
46 Runtime error 83 ms 12796 KB Execution killed with signal 6
47 Runtime error 77 ms 12876 KB Execution killed with signal 6
48 Runtime error 75 ms 12836 KB Execution killed with signal 6
49 Runtime error 78 ms 12832 KB Execution killed with signal 6
50 Runtime error 73 ms 12832 KB Execution killed with signal 6
51 Runtime error 75 ms 12856 KB Execution killed with signal 6
52 Runtime error 69 ms 12864 KB Execution killed with signal 6
53 Runtime error 76 ms 12804 KB Execution killed with signal 6
54 Runtime error 73 ms 12900 KB Execution killed with signal 6
55 Runtime error 73 ms 12872 KB Execution killed with signal 6
56 Runtime error 85 ms 12876 KB Execution killed with signal 6
57 Runtime error 71 ms 12904 KB Execution killed with signal 6
58 Runtime error 69 ms 12892 KB Execution killed with signal 6
59 Runtime error 71 ms 12872 KB Execution killed with signal 6
60 Runtime error 88 ms 12908 KB Execution killed with signal 6
61 Runtime error 84 ms 12800 KB Execution killed with signal 6
62 Runtime error 72 ms 12828 KB Execution killed with signal 6
63 Runtime error 78 ms 12828 KB Execution killed with signal 6
64 Runtime error 70 ms 12904 KB Execution killed with signal 6
65 Runtime error 68 ms 12896 KB Execution killed with signal 6
66 Runtime error 70 ms 12868 KB Execution killed with signal 6
67 Runtime error 75 ms 12828 KB Execution killed with signal 6
68 Runtime error 70 ms 12904 KB Execution killed with signal 6
69 Runtime error 72 ms 12912 KB Execution killed with signal 6
70 Runtime error 57 ms 10356 KB Execution killed with signal 6
71 Runtime error 93 ms 12836 KB Execution killed with signal 6
72 Runtime error 82 ms 12888 KB Execution killed with signal 6
73 Runtime error 74 ms 12904 KB Execution killed with signal 6
74 Runtime error 80 ms 12832 KB Execution killed with signal 6
75 Runtime error 66 ms 12792 KB Execution killed with signal 6
76 Runtime error 101 ms 12924 KB Execution killed with signal 6
77 Runtime error 70 ms 12848 KB Execution killed with signal 6
78 Runtime error 67 ms 12872 KB Execution killed with signal 6
79 Runtime error 68 ms 12876 KB Execution killed with signal 6
80 Runtime error 70 ms 12824 KB Execution killed with signal 6
81 Runtime error 69 ms 12912 KB Execution killed with signal 6
82 Runtime error 73 ms 12848 KB Execution killed with signal 6
83 Runtime error 73 ms 12836 KB Execution killed with signal 6
84 Runtime error 70 ms 12828 KB Execution killed with signal 6
85 Runtime error 73 ms 12896 KB Execution killed with signal 6
86 Runtime error 75 ms 12832 KB Execution killed with signal 6
87 Runtime error 75 ms 12860 KB Execution killed with signal 6
88 Runtime error 71 ms 12892 KB Execution killed with signal 6
89 Runtime error 71 ms 12920 KB Execution killed with signal 6
90 Runtime error 43 ms 10392 KB Execution killed with signal 6
91 Runtime error 73 ms 12844 KB Execution killed with signal 6
92 Runtime error 67 ms 12852 KB Execution killed with signal 6
93 Runtime error 68 ms 12836 KB Execution killed with signal 6
94 Runtime error 70 ms 12800 KB Execution killed with signal 6
95 Runtime error 76 ms 12876 KB Execution killed with signal 6
96 Runtime error 89 ms 12796 KB Execution killed with signal 6
97 Runtime error 69 ms 12884 KB Execution killed with signal 6
98 Runtime error 71 ms 12832 KB Execution killed with signal 6
99 Runtime error 68 ms 12876 KB Execution killed with signal 6
100 Runtime error 66 ms 12848 KB Execution killed with signal 6