Submission #758343

#TimeUsernameProblemLanguageResultExecution timeMemory
758343ihcekerGame (eJOI20_game)C++14
0 / 100
1 ms212 KiB
#include<bits/stdc++.h> #define int long long #define MOD 1000000007 #define all(x) x.begin(),x.end() #define ff first #define ss second #define pb push_back #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); using namespace std; int32_t main(){ int n,m; cin>>n>>m; int a[n+1][m],b[n][m+1]; for(int i=0;i<=n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<=m;j++){ cin>>b[i][j]; } } int cnt=0; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ int x=a[i][j]+a[i+1][j]+b[i][j]+b[i][j+1]; cnt+=(x==2); } } cout<<-cnt<<endl; }
#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...