Submission #433070

#TimeUsernameProblemLanguageResultExecution timeMemory
433070Valaki2Game (eJOI20_game)C++14
0 / 100
1 ms312 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...