3 solutions
Information
- ID
- 2319
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 150
- Accepted
- 70
- Uploaded By
#include<bits/stdc++.h>
using namespace std;
int main()
{
int h,w;
cin>>h>>w;
int r,c;
cin>>r>>c;
int res=0;
if(r-1>=1) res++;
if(r+1<=h) res++;
if(c-1>=1) res++;
if(c+1<=w) res++;
cout<<res;
return 0;
}
搔福瑞没实力还发题解