Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int a[1005][1005];
- int main()
- {
- int i, j, i1, j1, i2, j2, k, n, m, l;
- cin>>n>>m>>k;
- for(l=1; l<=k; l++)
- {
- cin>>i1>>j1>>i2>>j2;
- for(i=i1; i<=i2; i++)
- {
- for(j=1; j<=j2; j++)
- {
- a[i][j]++;
- }
- }
- }
- for(i=1; i<=n; i++)
- {
- for(j=1; j<=m; j++)
- {
- cout<<a[i][j]<<' ';
- }
- cout<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment