# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
433070 |
2021-06-18T19:55:34 Z |
Valaki2 |
Game (eJOI20_game) |
C++14 |
|
1 ms |
312 KB |
#include <bits/stdc++.h>
using namespace std;
void solve_subtask_1_questionmark() {
int n, m;
cin >> n >> m;
int cnt = 0;
bool edge = false;
for(int i = 0; i <= n; ++i) {
for(int j = 0; j < m; ++j) {
char ch;
cin >> ch;
if(ch == '0') {
++cnt;
if(i == 0) {
edge = true;
}
}
}
}
for(int i = 0; i <= m; ++i) {
for(int j = 0; j < n; ++j) {
char ch;
cin >> ch;
if(ch == '0') {
++cnt;
if(i == 0) {
edge = true;
}
}
}
}
if(edge) {
cnt += 2;
}
cout << -(cnt/2-1) << "\n";
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
solve_subtask_1_questionmark();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Incorrect |
1 ms |
312 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
308 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Incorrect |
1 ms |
312 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |