Submission #171777

# Submission time Handle Problem Language Result Execution time Memory
171777 2019-12-30T11:27:01 Z mosiashvililuka Bomb (IZhO17_bomb) C++14
24 / 100
104 ms 31160 KB
#include<bits/stdc++.h>
using namespace std;
int a,b,c,d,e,i,j,zx,xc,qw,we,pas,dd,mxa,mxb;
string s;
int f[2509][2509];
int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>a>>b;
    for(c=1; c<=a; c++){
        cin>>s;
        for(d=1; d<=b; d++){
            f[c][d]=s[d-1]-'0';
        }
    }
    mxb=mxa=a+b+2;
        for(c=1; c<=a; c++){
        	zx=0;
        	for(d=1; d<=b; d++){
        		if(f[c][d]==1){
        			zx++;
				}else{
				    if(zx!=0) mxa=min(zx,mxa);
					zx=0;
				}
			}
			if(zx!=0) mxa=min(zx,mxa);
		}
		for(d=1; d<=b; d++){
			xc=0;
			for(c=1; c<=a; c++){
				if(f[c][d]==1){
					xc++;
				}else{
				    if(xc!=0) mxb=min(mxb,xc);
					xc=0;
				}
			}
			if(xc!=0) mxb=min(mxb,xc);
		}
		cout<<mxa*mxb;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 380 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 10 ms 10368 KB Output is correct
4 Correct 10 ms 10452 KB Output is correct
5 Correct 2 ms 392 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Incorrect 2 ms 384 KB Output isn't correct
9 Incorrect 2 ms 376 KB Output isn't correct
10 Incorrect 2 ms 504 KB Output isn't correct
11 Incorrect 2 ms 376 KB Output isn't correct
12 Incorrect 2 ms 376 KB Output isn't correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Incorrect 2 ms 376 KB Output isn't correct
16 Correct 2 ms 376 KB Output is correct
17 Correct 2 ms 676 KB Output is correct
18 Incorrect 2 ms 636 KB Output isn't correct
19 Incorrect 3 ms 760 KB Output isn't correct
20 Incorrect 2 ms 804 KB Output isn't correct
21 Incorrect 2 ms 632 KB Output isn't correct
22 Incorrect 2 ms 760 KB Output isn't correct
23 Incorrect 2 ms 760 KB Output isn't correct
24 Incorrect 2 ms 632 KB Output isn't correct
25 Incorrect 2 ms 760 KB Output isn't correct
26 Correct 2 ms 760 KB Output is correct
27 Correct 4 ms 1912 KB Output is correct
28 Incorrect 4 ms 2060 KB Output isn't correct
29 Incorrect 4 ms 2552 KB Output isn't correct
30 Incorrect 5 ms 2940 KB Output isn't correct
31 Incorrect 4 ms 2396 KB Output isn't correct
32 Incorrect 4 ms 2680 KB Output isn't correct
33 Incorrect 5 ms 3064 KB Output isn't correct
34 Incorrect 4 ms 2168 KB Output isn't correct
35 Incorrect 5 ms 3116 KB Output isn't correct
36 Correct 5 ms 3064 KB Output is correct
37 Incorrect 2 ms 376 KB Output isn't correct
38 Correct 92 ms 30816 KB Output is correct
39 Incorrect 2 ms 376 KB Output isn't correct
40 Incorrect 12 ms 7612 KB Output isn't correct
41 Incorrect 2 ms 376 KB Output isn't correct
42 Incorrect 2 ms 760 KB Output isn't correct
43 Correct 90 ms 31064 KB Output is correct
44 Incorrect 5 ms 3064 KB Output isn't correct
45 Incorrect 88 ms 29816 KB Output isn't correct
46 Correct 98 ms 31044 KB Output is correct
47 Incorrect 89 ms 30984 KB Output isn't correct
48 Incorrect 91 ms 28920 KB Output isn't correct
49 Correct 91 ms 30640 KB Output is correct
50 Incorrect 92 ms 31048 KB Output isn't correct
51 Incorrect 93 ms 30992 KB Output isn't correct
52 Incorrect 93 ms 30016 KB Output isn't correct
53 Incorrect 94 ms 31056 KB Output isn't correct
54 Incorrect 101 ms 30836 KB Output isn't correct
55 Incorrect 91 ms 31048 KB Output isn't correct
56 Correct 97 ms 30424 KB Output is correct
57 Incorrect 91 ms 31048 KB Output isn't correct
58 Incorrect 90 ms 31160 KB Output isn't correct
59 Incorrect 90 ms 31028 KB Output isn't correct
60 Correct 89 ms 31028 KB Output is correct
61 Correct 95 ms 31032 KB Output is correct
62 Correct 93 ms 31036 KB Output is correct
63 Correct 104 ms 31048 KB Output is correct
64 Correct 91 ms 30968 KB Output is correct
65 Incorrect 91 ms 31080 KB Output isn't correct
66 Incorrect 90 ms 30456 KB Output isn't correct
67 Incorrect 93 ms 30940 KB Output isn't correct
68 Incorrect 91 ms 31048 KB Output isn't correct
69 Incorrect 90 ms 31052 KB Output isn't correct
70 Incorrect 58 ms 23948 KB Output isn't correct
71 Incorrect 90 ms 30968 KB Output isn't correct
72 Incorrect 93 ms 30160 KB Output isn't correct
73 Incorrect 91 ms 31076 KB Output isn't correct
74 Incorrect 90 ms 31048 KB Output isn't correct
75 Incorrect 91 ms 31056 KB Output isn't correct
76 Incorrect 91 ms 29624 KB Output isn't correct
77 Incorrect 91 ms 31048 KB Output isn't correct
78 Incorrect 91 ms 29668 KB Output isn't correct
79 Incorrect 92 ms 31036 KB Output isn't correct
80 Incorrect 90 ms 31048 KB Output isn't correct
81 Incorrect 91 ms 30940 KB Output isn't correct
82 Incorrect 93 ms 31052 KB Output isn't correct
83 Incorrect 90 ms 31052 KB Output isn't correct
84 Incorrect 89 ms 31032 KB Output isn't correct
85 Incorrect 91 ms 31096 KB Output isn't correct
86 Incorrect 89 ms 31048 KB Output isn't correct
87 Incorrect 92 ms 30968 KB Output isn't correct
88 Incorrect 95 ms 30968 KB Output isn't correct
89 Incorrect 91 ms 30964 KB Output isn't correct
90 Incorrect 66 ms 23928 KB Output isn't correct
91 Incorrect 92 ms 31108 KB Output isn't correct
92 Incorrect 90 ms 31044 KB Output isn't correct
93 Incorrect 87 ms 30968 KB Output isn't correct
94 Incorrect 93 ms 30968 KB Output isn't correct
95 Incorrect 92 ms 31052 KB Output isn't correct
96 Incorrect 90 ms 31048 KB Output isn't correct
97 Incorrect 90 ms 31048 KB Output isn't correct
98 Incorrect 89 ms 31048 KB Output isn't correct
99 Incorrect 100 ms 30968 KB Output isn't correct
100 Incorrect 98 ms 30968 KB Output isn't correct