# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
333962 | 2020-12-08T04:04:34 Z | beksultan04 | Bomb (IZhO17_bomb) | C++14 | 539 ms | 49716 KB |
#include <bits/stdc++.h> using namespace std; #define int long long #define pii pair<int,int> #define OK puts("OK"); #define fr first #define sc second #define ret return #define scan1(a) scanf("%lld",&a); #define scan2(a,b) scanf("%lld %lld",&a, &b); #define scan3(a,b,c) scanf("%lld %lld %lld",&a,&b,&c); #define all(s) s.begin(),s.end() #define pb push_back #define endi puts(""); const int N = 1e6+12,INF=1e9+7; int q[2501][2501],v[2501][2501],p[2501][2501],gor[N],ver[N]; main(){ int m,i,j,k,c=0,n,x=INF,y=INF; scan2(n,m) for (i=1;i<=n;++i) for (j=1;j<=m;++j){ char ch; cin>>ch; q[i][j]=ch-'0'; } for (i=1;i<=n;++i){ c=0; for (j=1;j<=m;++j){ if (q[i][j]){ c++; } else if (c!=0){ x = min(c,x); c=0; } } } if (c!= 0) x = min(c,x); for (i=1;i<=m;++i){ c=0; for (j=1;j<=n;++j){ if (q[j][i]){ c++; } else if (c!=0){ y = min(c,y); c=0; } } } if (c!= 0) y = min(c,y); cout <<y*x<<"\n"; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Output isn't correct |
2 | Incorrect | 1 ms | 364 KB | Output isn't correct |
3 | Correct | 6 ms | 10348 KB | Output is correct |
4 | Correct | 6 ms | 10348 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 1 ms | 364 KB | Output is correct |
7 | Correct | 0 ms | 364 KB | Output is correct |
8 | Incorrect | 1 ms | 364 KB | Output isn't correct |
9 | Incorrect | 1 ms | 364 KB | Output isn't correct |
10 | Incorrect | 1 ms | 364 KB | Output isn't correct |
11 | Incorrect | 1 ms | 364 KB | Output isn't correct |
12 | Incorrect | 1 ms | 364 KB | Output isn't correct |
13 | Incorrect | 1 ms | 364 KB | Output isn't correct |
14 | Correct | 1 ms | 364 KB | Output is correct |
15 | Incorrect | 1 ms | 364 KB | Output isn't correct |
16 | Incorrect | 1 ms | 364 KB | Output isn't correct |
17 | Correct | 1 ms | 620 KB | Output is correct |
18 | Incorrect | 1 ms | 620 KB | Output isn't correct |
19 | Incorrect | 1 ms | 748 KB | Output isn't correct |
20 | Incorrect | 1 ms | 748 KB | Output isn't correct |
21 | Incorrect | 1 ms | 620 KB | Output isn't correct |
22 | Incorrect | 1 ms | 620 KB | Output isn't correct |
23 | Incorrect | 1 ms | 748 KB | Output isn't correct |
24 | Incorrect | 1 ms | 748 KB | Output isn't correct |
25 | Incorrect | 1 ms | 748 KB | Output isn't correct |
26 | Correct | 1 ms | 748 KB | Output is correct |
27 | Correct | 7 ms | 2156 KB | Output is correct |
28 | Incorrect | 9 ms | 2412 KB | Output isn't correct |
29 | Incorrect | 10 ms | 2924 KB | Output isn't correct |
30 | Incorrect | 15 ms | 3564 KB | Output isn't correct |
31 | Incorrect | 12 ms | 2796 KB | Output isn't correct |
32 | Incorrect | 12 ms | 3180 KB | Output isn't correct |
33 | Incorrect | 16 ms | 3692 KB | Output isn't correct |
34 | Incorrect | 7 ms | 2412 KB | Output isn't correct |
35 | Incorrect | 16 ms | 3692 KB | Output isn't correct |
36 | Incorrect | 16 ms | 3692 KB | Output isn't correct |
37 | Incorrect | 1 ms | 364 KB | Output isn't correct |
38 | Correct | 505 ms | 49388 KB | Output is correct |
39 | Incorrect | 1 ms | 364 KB | Output isn't correct |
40 | Incorrect | 57 ms | 9836 KB | Output isn't correct |
41 | Incorrect | 1 ms | 364 KB | Output isn't correct |
42 | Incorrect | 1 ms | 748 KB | Output isn't correct |
43 | Correct | 509 ms | 49260 KB | Output is correct |
44 | Incorrect | 17 ms | 3692 KB | Output isn't correct |
45 | Incorrect | 498 ms | 49276 KB | Output isn't correct |
46 | Correct | 500 ms | 49388 KB | Output is correct |
47 | Incorrect | 499 ms | 49388 KB | Output isn't correct |
48 | Incorrect | 516 ms | 49260 KB | Output isn't correct |
49 | Correct | 512 ms | 49328 KB | Output is correct |
50 | Incorrect | 514 ms | 49260 KB | Output isn't correct |
51 | Incorrect | 521 ms | 49260 KB | Output isn't correct |
52 | Incorrect | 517 ms | 49300 KB | Output isn't correct |
53 | Incorrect | 516 ms | 49516 KB | Output isn't correct |
54 | Incorrect | 532 ms | 49260 KB | Output isn't correct |
55 | Incorrect | 510 ms | 49260 KB | Output isn't correct |
56 | Incorrect | 511 ms | 49388 KB | Output isn't correct |
57 | Incorrect | 510 ms | 49260 KB | Output isn't correct |
58 | Incorrect | 512 ms | 49300 KB | Output isn't correct |
59 | Incorrect | 507 ms | 49388 KB | Output isn't correct |
60 | Correct | 505 ms | 49260 KB | Output is correct |
61 | Incorrect | 506 ms | 49388 KB | Output isn't correct |
62 | Correct | 502 ms | 49260 KB | Output is correct |
63 | Correct | 508 ms | 49444 KB | Output is correct |
64 | Correct | 509 ms | 49532 KB | Output is correct |
65 | Incorrect | 507 ms | 49260 KB | Output isn't correct |
66 | Incorrect | 508 ms | 49388 KB | Output isn't correct |
67 | Incorrect | 509 ms | 49388 KB | Output isn't correct |
68 | Incorrect | 503 ms | 49260 KB | Output isn't correct |
69 | Incorrect | 508 ms | 49388 KB | Output isn't correct |
70 | Incorrect | 334 ms | 39532 KB | Output isn't correct |
71 | Incorrect | 508 ms | 49260 KB | Output isn't correct |
72 | Incorrect | 514 ms | 49260 KB | Output isn't correct |
73 | Incorrect | 507 ms | 49368 KB | Output isn't correct |
74 | Incorrect | 511 ms | 49264 KB | Output isn't correct |
75 | Incorrect | 512 ms | 49516 KB | Output isn't correct |
76 | Incorrect | 506 ms | 49260 KB | Output isn't correct |
77 | Incorrect | 508 ms | 49260 KB | Output isn't correct |
78 | Incorrect | 508 ms | 49388 KB | Output isn't correct |
79 | Incorrect | 505 ms | 49260 KB | Output isn't correct |
80 | Incorrect | 509 ms | 49388 KB | Output isn't correct |
81 | Incorrect | 505 ms | 49260 KB | Output isn't correct |
82 | Incorrect | 506 ms | 49388 KB | Output isn't correct |
83 | Incorrect | 508 ms | 49384 KB | Output isn't correct |
84 | Incorrect | 509 ms | 49260 KB | Output isn't correct |
85 | Incorrect | 509 ms | 49516 KB | Output isn't correct |
86 | Incorrect | 510 ms | 49292 KB | Output isn't correct |
87 | Incorrect | 508 ms | 49388 KB | Output isn't correct |
88 | Incorrect | 524 ms | 49388 KB | Output isn't correct |
89 | Incorrect | 508 ms | 49716 KB | Output isn't correct |
90 | Incorrect | 327 ms | 39532 KB | Output isn't correct |
91 | Incorrect | 509 ms | 49388 KB | Output isn't correct |
92 | Incorrect | 539 ms | 49260 KB | Output isn't correct |
93 | Incorrect | 509 ms | 49388 KB | Output isn't correct |
94 | Incorrect | 511 ms | 49388 KB | Output isn't correct |
95 | Incorrect | 507 ms | 49260 KB | Output isn't correct |
96 | Incorrect | 512 ms | 49260 KB | Output isn't correct |
97 | Incorrect | 505 ms | 49260 KB | Output isn't correct |
98 | Incorrect | 509 ms | 49388 KB | Output isn't correct |
99 | Incorrect | 515 ms | 49272 KB | Output isn't correct |
100 | Incorrect | 518 ms | 49412 KB | Output isn't correct |