Submission #91356

# Submission time Handle Problem Language Result Execution time Memory
91356 2018-12-27T08:42:03 Z emil_physmath Bomb (IZhO17_bomb) C++14
18 / 100
446 ms 132096 KB
#include <iostream>
#include <stdio.h>
using namespace std;

int a[2505][2505], temp[2505][2505];

int FindLen(int n, int m);
int main()
{
	int n, m;
	cin>>n>>m;
	for (int i=0; i<n; i++)
		for (int j=0; j<m; j++)
		{
			char temp;
			scanf(" %c", &temp);
			a[i][j]=temp-'0';
		}
	int len=FindLen(n, m);
	for (int i=0; i<n; i++)
		for (int j=0; j<m; j++)
			temp[j][i]=a[i][j];
	swap(n, m);
	for (int i=0; i<n; i++)
		for (int j=0; j<m; j++)
			a[i][j]=temp[i][j];
	int wid=FindLen(n, m);
	cout<<wid*len<<'\n';

	char I;
	cin >> I;
	return 0;
}

int FindLen(int n, int m)
{
	int minLen=m;
	for (int i=0; i<n; i++)
		for (int stj=0; stj<m; stj++)
		{
			int j=stj;
			if (!a[i][j]) continue;
			while (j+1<m && a[i][j+1])
				j++;
			minLen=min(minLen, j-stj+1);
			stj=j+1;
		}
	return minLen;
}

Compilation message

bomb.cpp: In function 'int main()':
bomb.cpp:16:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf(" %c", &temp);
    ~~~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 508 KB Output is correct
2 Correct 2 ms 632 KB Output is correct
3 Correct 8 ms 10428 KB Output is correct
4 Correct 9 ms 10456 KB Output is correct
5 Correct 17 ms 20488 KB Output is correct
6 Correct 6 ms 20488 KB Output is correct
7 Correct 2 ms 20488 KB Output is correct
8 Incorrect 2 ms 20488 KB Output isn't correct
9 Incorrect 2 ms 20488 KB Output isn't correct
10 Incorrect 2 ms 20488 KB Output isn't correct
11 Incorrect 2 ms 20488 KB Output isn't correct
12 Incorrect 2 ms 20488 KB Output isn't correct
13 Correct 2 ms 20488 KB Output is correct
14 Correct 2 ms 20488 KB Output is correct
15 Incorrect 2 ms 20488 KB Output isn't correct
16 Correct 2 ms 20488 KB Output is correct
17 Correct 2 ms 20488 KB Output is correct
18 Incorrect 2 ms 20488 KB Output isn't correct
19 Incorrect 2 ms 20488 KB Output isn't correct
20 Incorrect 2 ms 20488 KB Output isn't correct
21 Incorrect 2 ms 20488 KB Output isn't correct
22 Incorrect 2 ms 20488 KB Output isn't correct
23 Incorrect 3 ms 20488 KB Output isn't correct
24 Incorrect 2 ms 20488 KB Output isn't correct
25 Incorrect 3 ms 20488 KB Output isn't correct
26 Correct 3 ms 20488 KB Output is correct
27 Correct 8 ms 20488 KB Output is correct
28 Incorrect 10 ms 20488 KB Output isn't correct
29 Incorrect 11 ms 20488 KB Output isn't correct
30 Incorrect 14 ms 20488 KB Output isn't correct
31 Incorrect 13 ms 20488 KB Output isn't correct
32 Incorrect 12 ms 20488 KB Output isn't correct
33 Incorrect 15 ms 20488 KB Output isn't correct
34 Incorrect 8 ms 20488 KB Output isn't correct
35 Incorrect 16 ms 20488 KB Output isn't correct
36 Correct 16 ms 20488 KB Output is correct
37 Incorrect 2 ms 20488 KB Output isn't correct
38 Correct 428 ms 57460 KB Output is correct
39 Incorrect 2 ms 57460 KB Output isn't correct
40 Incorrect 51 ms 57460 KB Output isn't correct
41 Incorrect 2 ms 57460 KB Output isn't correct
42 Incorrect 3 ms 57460 KB Output isn't correct
43 Correct 405 ms 64428 KB Output is correct
44 Incorrect 15 ms 64428 KB Output isn't correct
45 Incorrect 407 ms 70600 KB Output isn't correct
46 Correct 405 ms 76772 KB Output is correct
47 Incorrect 420 ms 83012 KB Output isn't correct
48 Incorrect 406 ms 88852 KB Output isn't correct
49 Correct 399 ms 95108 KB Output is correct
50 Incorrect 402 ms 101220 KB Output isn't correct
51 Incorrect 399 ms 107276 KB Output isn't correct
52 Incorrect 433 ms 113420 KB Output isn't correct
53 Incorrect 401 ms 119428 KB Output isn't correct
54 Incorrect 432 ms 125720 KB Output isn't correct
55 Runtime error 398 ms 131652 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
56 Runtime error 433 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
57 Runtime error 411 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
58 Runtime error 405 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
59 Runtime error 419 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
60 Runtime error 445 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
61 Runtime error 416 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
62 Runtime error 406 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
63 Runtime error 419 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
64 Runtime error 425 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
65 Runtime error 434 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
66 Runtime error 416 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
67 Runtime error 429 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
68 Runtime error 432 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
69 Runtime error 436 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
70 Runtime error 261 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
71 Runtime error 434 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
72 Runtime error 441 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
73 Runtime error 438 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
74 Runtime error 437 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
75 Runtime error 439 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
76 Runtime error 439 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
77 Runtime error 436 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
78 Runtime error 431 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
79 Runtime error 435 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
80 Runtime error 435 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
81 Runtime error 426 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
82 Runtime error 432 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
83 Runtime error 431 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
84 Runtime error 431 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
85 Runtime error 435 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
86 Runtime error 432 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
87 Runtime error 430 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
88 Runtime error 436 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
89 Runtime error 437 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
90 Runtime error 278 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
91 Runtime error 446 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
92 Runtime error 436 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
93 Runtime error 427 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
94 Runtime error 428 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
95 Runtime error 419 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
96 Runtime error 420 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
97 Runtime error 424 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
98 Runtime error 409 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
99 Runtime error 421 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.
100 Runtime error 420 ms 132096 KB Memory limit exceeded: We have a known bug that the memory usage is measured incorrectly (possibly because of Meltdown/Spectre patch), so your solution may be correct. Please submit again. Sorry for the inconvenience.