답안 #91357

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
91357 2018-12-27T08:44:37 Z emil_physmath Bomb (IZhO17_bomb) C++17
20 / 100
353 ms 132096 KB
#include <iostream>
#include <stdio.h>
using namespace std;

bool 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=='1'?true:false);
		}
	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);
    ~~~~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 504 KB Output is correct
3 Correct 6 ms 6608 KB Output is correct
4 Correct 6 ms 6640 KB Output is correct
5 Correct 9 ms 12836 KB Output is correct
6 Correct 5 ms 12836 KB Output is correct
7 Correct 1 ms 12836 KB Output is correct
8 Incorrect 2 ms 12836 KB Output isn't correct
9 Incorrect 2 ms 12836 KB Output isn't correct
10 Incorrect 2 ms 12836 KB Output isn't correct
11 Incorrect 2 ms 12836 KB Output isn't correct
12 Incorrect 2 ms 12836 KB Output isn't correct
13 Correct 2 ms 12836 KB Output is correct
14 Correct 2 ms 12836 KB Output is correct
15 Incorrect 2 ms 12836 KB Output isn't correct
16 Correct 2 ms 12836 KB Output is correct
17 Correct 2 ms 12836 KB Output is correct
18 Incorrect 2 ms 12836 KB Output isn't correct
19 Incorrect 2 ms 12836 KB Output isn't correct
20 Incorrect 2 ms 12836 KB Output isn't correct
21 Incorrect 2 ms 12836 KB Output isn't correct
22 Incorrect 2 ms 12836 KB Output isn't correct
23 Incorrect 2 ms 12836 KB Output isn't correct
24 Incorrect 2 ms 12836 KB Output isn't correct
25 Incorrect 2 ms 12836 KB Output isn't correct
26 Correct 2 ms 12836 KB Output is correct
27 Correct 6 ms 12836 KB Output is correct
28 Incorrect 8 ms 12836 KB Output isn't correct
29 Incorrect 9 ms 12836 KB Output isn't correct
30 Incorrect 12 ms 12836 KB Output isn't correct
31 Incorrect 11 ms 12836 KB Output isn't correct
32 Incorrect 11 ms 12836 KB Output isn't correct
33 Incorrect 13 ms 12836 KB Output isn't correct
34 Incorrect 7 ms 12836 KB Output isn't correct
35 Incorrect 13 ms 12836 KB Output isn't correct
36 Correct 14 ms 12836 KB Output is correct
37 Incorrect 2 ms 12836 KB Output isn't correct
38 Correct 337 ms 20724 KB Output is correct
39 Incorrect 2 ms 20724 KB Output isn't correct
40 Incorrect 44 ms 20724 KB Output isn't correct
41 Incorrect 2 ms 20724 KB Output isn't correct
42 Incorrect 2 ms 20724 KB Output isn't correct
43 Correct 347 ms 27484 KB Output is correct
44 Incorrect 14 ms 27484 KB Output isn't correct
45 Incorrect 345 ms 33812 KB Output isn't correct
46 Correct 351 ms 39964 KB Output is correct
47 Incorrect 340 ms 46148 KB Output isn't correct
48 Incorrect 342 ms 52312 KB Output isn't correct
49 Correct 348 ms 58360 KB Output is correct
50 Incorrect 345 ms 64356 KB Output isn't correct
51 Incorrect 343 ms 70468 KB Output isn't correct
52 Incorrect 349 ms 76744 KB Output isn't correct
53 Incorrect 342 ms 82824 KB Output isn't correct
54 Incorrect 346 ms 88856 KB Output isn't correct
55 Incorrect 346 ms 94976 KB Output isn't correct
56 Correct 340 ms 101160 KB Output is correct
57 Incorrect 343 ms 107220 KB Output isn't correct
58 Incorrect 340 ms 113380 KB Output isn't correct
59 Incorrect 341 ms 119492 KB Output isn't correct
60 Correct 341 ms 125476 KB Output is correct
61 Runtime error 344 ms 131880 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 347 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 346 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 347 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 343 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 342 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 340 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 341 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 341 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 223 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 353 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 346 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 344 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 350 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 348 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 349 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 346 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 343 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 337 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 340 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 340 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 344 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 340 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 334 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 344 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 344 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 345 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 342 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 344 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 217 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 338 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 345 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 340 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 333 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 341 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 338 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 345 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 338 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 341 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 335 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.