4 solutions
-
-1
#include<bits/stdc++.h> using namespace std; int main(){ //freopen("image.in","r",stdin); //freopen("image.out","w",stdout); int h,w,a[1000][1000]; cin>>h>>w; for(int i=1;i<=h;i++){ for(int j=1;j<=w;j++){ cin>>a[i][j]; } } for(int i=1;i<=h;i+=2){ for(int j=1;j<=w;j+=2){ cout<<(a[i][j]+a[i][j+1]+a[i+1][j]+a[i+1][j+1])/4<<" "; } cout<<endl; } return 0; } ``` ```
Information
- ID
- 1028
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- # Submissions
- 72
- Accepted
- 14
- Uploaded By