답안 #833216

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
833216 2023-08-22T03:16:35 Z vjudge1 Bomb (IZhO17_bomb) C++17
5 / 100
125 ms 19840 KB
#include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define pb push_back
#define pll pair<ll, ll>
using namespace std;
int m, n, ans, ver, hor;
string s[2500];
vector<int> v;

void sub1a(){
	int k=0;
	for(int i=0; i<=m; i++){
		if(i<m && s[1][i]=='1') k++;
		else{
			if(k>0) v.pb(k); k=0;
		}
	}
	sort(v.begin(), v.end());
	if(v.size()>0) hor=v[0];
}

void sub1b(){
	ans=1e5;
	int k=0;
	for(int i=1; i<=n+1; i++){
		if(i<=n && s[i][0]=='1') k++;
		else{
			if(k>0) v.pb(k); k=0;
		}
	}	
	sort(v.begin(), v.end());
	if(v.size()>0) ver=v[0];
}

int main(){
	cin >> n >> m;
	for(int i=1; i<=n; i++){
		cin >> s[i];
	}
	sub1a(); sub1b();
	
	cout << ver*hor << endl;
	return 0;
}

Compilation message

bomb.cpp: In function 'void sub1a()':
bomb.cpp:17:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   17 |    if(k>0) v.pb(k); k=0;
      |    ^~
bomb.cpp:17:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   17 |    if(k>0) v.pb(k); k=0;
      |                     ^
bomb.cpp: In function 'void sub1b()':
bomb.cpp:30:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   30 |    if(k>0) v.pb(k); k=0;
      |    ^~
bomb.cpp:30:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   30 |    if(k>0) v.pb(k); k=0;
      |                     ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 340 KB Output isn't correct
2 Incorrect 0 ms 340 KB Output isn't correct
3 Incorrect 1 ms 340 KB Output isn't correct
4 Incorrect 1 ms 340 KB Output isn't correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Incorrect 0 ms 340 KB Output isn't correct
8 Incorrect 0 ms 340 KB Output isn't correct
9 Incorrect 1 ms 340 KB Output isn't correct
10 Incorrect 0 ms 340 KB Output isn't correct
11 Incorrect 0 ms 340 KB Output isn't correct
12 Incorrect 0 ms 340 KB Output isn't correct
13 Incorrect 0 ms 340 KB Output isn't correct
14 Correct 0 ms 340 KB Output is correct
15 Incorrect 0 ms 340 KB Output isn't correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Incorrect 1 ms 340 KB Output isn't correct
19 Incorrect 0 ms 340 KB Output isn't correct
20 Incorrect 0 ms 340 KB Output isn't correct
21 Incorrect 1 ms 340 KB Output isn't correct
22 Incorrect 1 ms 340 KB Output isn't correct
23 Incorrect 0 ms 340 KB Output isn't correct
24 Incorrect 0 ms 340 KB Output isn't correct
25 Incorrect 0 ms 340 KB Output isn't correct
26 Incorrect 1 ms 340 KB Output isn't correct
27 Incorrect 1 ms 468 KB Output isn't correct
28 Incorrect 2 ms 468 KB Output isn't correct
29 Incorrect 2 ms 468 KB Output isn't correct
30 Incorrect 3 ms 468 KB Output isn't correct
31 Incorrect 2 ms 468 KB Output isn't correct
32 Incorrect 3 ms 468 KB Output isn't correct
33 Incorrect 3 ms 596 KB Output isn't correct
34 Incorrect 2 ms 468 KB Output isn't correct
35 Incorrect 4 ms 596 KB Output isn't correct
36 Incorrect 3 ms 596 KB Output isn't correct
37 Incorrect 0 ms 340 KB Output isn't correct
38 Runtime error 92 ms 19660 KB Execution killed with signal 11
39 Incorrect 0 ms 340 KB Output isn't correct
40 Incorrect 11 ms 1108 KB Output isn't correct
41 Incorrect 0 ms 340 KB Output isn't correct
42 Incorrect 1 ms 340 KB Output isn't correct
43 Runtime error 99 ms 19816 KB Execution killed with signal 11
44 Incorrect 3 ms 596 KB Output isn't correct
45 Runtime error 92 ms 19672 KB Execution killed with signal 11
46 Runtime error 105 ms 19588 KB Execution killed with signal 11
47 Runtime error 99 ms 19608 KB Execution killed with signal 11
48 Runtime error 93 ms 19660 KB Execution killed with signal 11
49 Runtime error 94 ms 19660 KB Execution killed with signal 11
50 Runtime error 92 ms 19564 KB Execution killed with signal 11
51 Runtime error 91 ms 19592 KB Execution killed with signal 11
52 Runtime error 96 ms 19656 KB Execution killed with signal 11
53 Runtime error 101 ms 19688 KB Execution killed with signal 11
54 Runtime error 91 ms 19628 KB Execution killed with signal 11
55 Runtime error 93 ms 19664 KB Execution killed with signal 11
56 Runtime error 100 ms 19580 KB Execution killed with signal 11
57 Runtime error 98 ms 19656 KB Execution killed with signal 11
58 Runtime error 92 ms 19576 KB Execution killed with signal 11
59 Runtime error 98 ms 19672 KB Execution killed with signal 11
60 Runtime error 94 ms 19660 KB Execution killed with signal 11
61 Runtime error 91 ms 19660 KB Execution killed with signal 11
62 Runtime error 93 ms 19596 KB Execution killed with signal 11
63 Runtime error 96 ms 19652 KB Execution killed with signal 11
64 Runtime error 93 ms 19696 KB Execution killed with signal 11
65 Runtime error 92 ms 19572 KB Execution killed with signal 11
66 Runtime error 93 ms 19628 KB Execution killed with signal 11
67 Runtime error 93 ms 19572 KB Execution killed with signal 11
68 Runtime error 101 ms 19656 KB Execution killed with signal 11
69 Runtime error 94 ms 19660 KB Execution killed with signal 11
70 Incorrect 54 ms 7840 KB Output isn't correct
71 Runtime error 94 ms 19584 KB Execution killed with signal 11
72 Runtime error 92 ms 19660 KB Execution killed with signal 11
73 Runtime error 93 ms 19588 KB Execution killed with signal 11
74 Runtime error 105 ms 19664 KB Execution killed with signal 11
75 Runtime error 93 ms 19644 KB Execution killed with signal 11
76 Runtime error 94 ms 19652 KB Execution killed with signal 11
77 Runtime error 91 ms 19656 KB Execution killed with signal 11
78 Runtime error 92 ms 19636 KB Execution killed with signal 11
79 Runtime error 125 ms 19580 KB Execution killed with signal 11
80 Runtime error 94 ms 19712 KB Execution killed with signal 11
81 Runtime error 92 ms 19648 KB Execution killed with signal 11
82 Runtime error 92 ms 19636 KB Execution killed with signal 11
83 Runtime error 95 ms 19840 KB Execution killed with signal 11
84 Runtime error 97 ms 19660 KB Execution killed with signal 11
85 Runtime error 91 ms 19580 KB Execution killed with signal 11
86 Runtime error 92 ms 19632 KB Execution killed with signal 11
87 Runtime error 103 ms 19604 KB Execution killed with signal 11
88 Runtime error 92 ms 19656 KB Execution killed with signal 11
89 Runtime error 94 ms 19728 KB Execution killed with signal 11
90 Incorrect 55 ms 7884 KB Output isn't correct
91 Runtime error 92 ms 19660 KB Execution killed with signal 11
92 Runtime error 94 ms 19700 KB Execution killed with signal 11
93 Runtime error 92 ms 19696 KB Execution killed with signal 11
94 Runtime error 97 ms 19660 KB Execution killed with signal 11
95 Runtime error 91 ms 19628 KB Execution killed with signal 11
96 Runtime error 92 ms 19680 KB Execution killed with signal 11
97 Runtime error 92 ms 19584 KB Execution killed with signal 11
98 Runtime error 123 ms 19560 KB Execution killed with signal 11
99 Runtime error 92 ms 19680 KB Execution killed with signal 11
100 Runtime error 91 ms 19676 KB Execution killed with signal 11