denis_andrei10

includeresiexclu

Feb 20th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int a[1005][1005];
  4. int main()
  5. {
  6. int i, j, i1, j1, i2, j2, k, n, m, l;
  7. cin>>n>>m>>k;
  8. for(l=1; l<=k; l++)
  9. {
  10. cin>>i1>>j1>>i2>>j2;
  11. for(i=i1; i<=i2; i++)
  12. {
  13. for(j=1; j<=j2; j++)
  14. {
  15. a[i][j]++;
  16. }
  17. }
  18. }
  19. for(i=1; i<=n; i++)
  20. {
  21. for(j=1; j<=m; j++)
  22. {
  23. cout<<a[i][j]<<' ';
  24. }
  25. cout<<endl;
  26. }
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment