# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
91488 |
2018-12-27T17:33:14 Z |
davitmarg |
Bomb (IZhO17_bomb) |
C++17 |
|
505 ms |
32732 KB |
/*
DEATH-MATCH
Davit-Marg
*/
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cassert>
#include <vector>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <iterator>
#include <ctype.h>
#include <stdlib.h>
#include <fstream>
#define mod 1000000007ll
#define LL long long
#define LD long double
#define MP make_pair
#define PB push_back
using namespace std;
int n, m,w,h;
int mp[2503][2503];
char tmp;
int main()
{
cin >> n >> m;
w = h = mod;
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
{
cin >> tmp;
mp[i][j] = tmp - '0';
}
for (int i = 0; i < n; i++)
{
int l = 0;
for (int j = 0; j < m; j++)
{
if (mp[i][j] == 1)
{
if (j > l)
w = min(w, j - l);
l = j + 1;
}
}
if (n > l)
w = min(w, n - l);
}
for (int i = 0; i < m; i++)
{
int l = 0;
for (int j = 0; j < n; j++)
{
if (mp[j][i] != 1)
{
if(j>l)
h = min(h, j - l);
l = j + 1;
}
}
if (n > l)
h = min(h, n - l);
}
cout << w * h << endl;
return 0;
}
/*
7 8
01001110
01001110
01001100
00000000
01000000
01000000
01000000
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
476 KB |
Output isn't correct |
3 |
Incorrect |
8 ms |
10412 KB |
Output isn't correct |
4 |
Incorrect |
8 ms |
10456 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
14 |
Correct |
2 ms |
10456 KB |
Output is correct |
15 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
16 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
17 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
18 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
19 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
20 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
21 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
22 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
23 |
Incorrect |
3 ms |
10456 KB |
Output isn't correct |
24 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
25 |
Incorrect |
3 ms |
10456 KB |
Output isn't correct |
26 |
Incorrect |
2 ms |
10456 KB |
Output isn't correct |
27 |
Incorrect |
7 ms |
10456 KB |
Output isn't correct |
28 |
Incorrect |
9 ms |
10456 KB |
Output isn't correct |
29 |
Incorrect |
10 ms |
10456 KB |
Output isn't correct |
30 |
Incorrect |
13 ms |
10456 KB |
Output isn't correct |
31 |
Incorrect |
11 ms |
10456 KB |
Output isn't correct |
32 |
Incorrect |
11 ms |
10456 KB |
Output isn't correct |
33 |
Incorrect |
14 ms |
10456 KB |
Output isn't correct |
34 |
Incorrect |
7 ms |
10456 KB |
Output isn't correct |
35 |
Incorrect |
14 ms |
10456 KB |
Output isn't correct |
36 |
Incorrect |
14 ms |
10456 KB |
Output isn't correct |
37 |
Incorrect |
1 ms |
10456 KB |
Output isn't correct |
38 |
Incorrect |
505 ms |
25976 KB |
Output isn't correct |
39 |
Incorrect |
2 ms |
25976 KB |
Output isn't correct |
40 |
Incorrect |
48 ms |
25976 KB |
Output isn't correct |
41 |
Incorrect |
2 ms |
25976 KB |
Output isn't correct |
42 |
Incorrect |
2 ms |
25976 KB |
Output isn't correct |
43 |
Incorrect |
368 ms |
27700 KB |
Output isn't correct |
44 |
Incorrect |
14 ms |
27700 KB |
Output isn't correct |
45 |
Incorrect |
371 ms |
27700 KB |
Output isn't correct |
46 |
Correct |
371 ms |
27704 KB |
Output is correct |
47 |
Incorrect |
404 ms |
27704 KB |
Output isn't correct |
48 |
Incorrect |
392 ms |
27704 KB |
Output isn't correct |
49 |
Incorrect |
386 ms |
27704 KB |
Output isn't correct |
50 |
Incorrect |
392 ms |
27704 KB |
Output isn't correct |
51 |
Incorrect |
390 ms |
27704 KB |
Output isn't correct |
52 |
Incorrect |
390 ms |
27704 KB |
Output isn't correct |
53 |
Incorrect |
407 ms |
27764 KB |
Output isn't correct |
54 |
Incorrect |
389 ms |
27764 KB |
Output isn't correct |
55 |
Incorrect |
404 ms |
27764 KB |
Output isn't correct |
56 |
Incorrect |
379 ms |
27764 KB |
Output isn't correct |
57 |
Incorrect |
386 ms |
27764 KB |
Output isn't correct |
58 |
Incorrect |
387 ms |
27764 KB |
Output isn't correct |
59 |
Incorrect |
381 ms |
27764 KB |
Output isn't correct |
60 |
Incorrect |
377 ms |
28528 KB |
Output isn't correct |
61 |
Incorrect |
372 ms |
28528 KB |
Output isn't correct |
62 |
Incorrect |
383 ms |
30176 KB |
Output isn't correct |
63 |
Incorrect |
368 ms |
30176 KB |
Output isn't correct |
64 |
Incorrect |
397 ms |
30192 KB |
Output isn't correct |
65 |
Incorrect |
392 ms |
30228 KB |
Output isn't correct |
66 |
Incorrect |
388 ms |
30228 KB |
Output isn't correct |
67 |
Incorrect |
389 ms |
30392 KB |
Output isn't correct |
68 |
Incorrect |
427 ms |
30392 KB |
Output isn't correct |
69 |
Incorrect |
391 ms |
30392 KB |
Output isn't correct |
70 |
Incorrect |
261 ms |
30392 KB |
Output isn't correct |
71 |
Incorrect |
397 ms |
30516 KB |
Output isn't correct |
72 |
Incorrect |
393 ms |
30516 KB |
Output isn't correct |
73 |
Incorrect |
397 ms |
30516 KB |
Output isn't correct |
74 |
Incorrect |
404 ms |
30516 KB |
Output isn't correct |
75 |
Incorrect |
396 ms |
30516 KB |
Output isn't correct |
76 |
Incorrect |
393 ms |
30516 KB |
Output isn't correct |
77 |
Incorrect |
394 ms |
30516 KB |
Output isn't correct |
78 |
Incorrect |
392 ms |
30516 KB |
Output isn't correct |
79 |
Incorrect |
397 ms |
31344 KB |
Output isn't correct |
80 |
Incorrect |
388 ms |
31344 KB |
Output isn't correct |
81 |
Incorrect |
394 ms |
32452 KB |
Output isn't correct |
82 |
Incorrect |
387 ms |
32540 KB |
Output isn't correct |
83 |
Incorrect |
393 ms |
32652 KB |
Output isn't correct |
84 |
Incorrect |
394 ms |
32652 KB |
Output isn't correct |
85 |
Incorrect |
395 ms |
32652 KB |
Output isn't correct |
86 |
Incorrect |
385 ms |
32652 KB |
Output isn't correct |
87 |
Incorrect |
405 ms |
32732 KB |
Output isn't correct |
88 |
Incorrect |
388 ms |
32732 KB |
Output isn't correct |
89 |
Incorrect |
390 ms |
32732 KB |
Output isn't correct |
90 |
Incorrect |
247 ms |
32732 KB |
Output isn't correct |
91 |
Incorrect |
389 ms |
32732 KB |
Output isn't correct |
92 |
Incorrect |
390 ms |
32732 KB |
Output isn't correct |
93 |
Incorrect |
383 ms |
32732 KB |
Output isn't correct |
94 |
Incorrect |
389 ms |
32732 KB |
Output isn't correct |
95 |
Incorrect |
392 ms |
32732 KB |
Output isn't correct |
96 |
Incorrect |
395 ms |
32732 KB |
Output isn't correct |
97 |
Incorrect |
384 ms |
32732 KB |
Output isn't correct |
98 |
Incorrect |
385 ms |
32732 KB |
Output isn't correct |
99 |
Incorrect |
375 ms |
32732 KB |
Output isn't correct |
100 |
Incorrect |
366 ms |
32732 KB |
Output isn't correct |