Files
contests/atcoder/beginner_contests/250/a.cpp

36 lines
416 B
C++

#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int h, w, r, c;
cin >> h >> w >> r >> c;
int result = 0;
if(h > 1){
result++;
}
if(w > 1){
result++;
}
if(r != 1 && r != h){
result++;
}
if(c != 1 && c != w){
result++;
}
cout << result;
cout << flush;
return 0;
}