2 条题解
-
0
^ | lllll
#define LL long long using namespace std; const int N = 510; int n,m; int a[N][N]; int main(){ cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; } } int ans=0; for(int i=1;i<=n-1;i++){ for(int j=1;j<=m-1;j++){ if(1LL*a[i][j]*a[i+1][j+1]==1LL*a[i][j+1]*a[i+1][j]){ ans++; } } } cout<<ans<<endl; return 0; } //:) //114514
信息
- ID
- 3300
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 5
- 标签
- 递交数
- 104
- 已通过
- 40
- 上传者