# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
433071 |
2021-06-18T19:56:42 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;
}
cout << -(cnt) << "\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 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
312 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
3 |
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 |
Incorrect |
1 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 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
312 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
7 |
Halted |
0 ms |
0 KB |
- |