denis_andrei10

Untitled

Feb 26th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4. ifstream fin("elicop.in");
  5. ofstream fout("elicop.out");
  6. int a[105][105];
  7. int main()
  8. {
  9. int i, j, m, n, k, l, l1, l2, c1, c2, p, nr0, nr1, x=0, raz;
  10. cin>>n>>m;
  11. for(i=1; i<=n; i++)
  12. {
  13. for(j=1; j<=m; j++)
  14. {
  15. cin>>a[i][j];
  16. }
  17. }
  18. cin>>k;
  19. for(l=1; l<=k; l++)
  20. {
  21. nr0=0;
  22. nr1=1;
  23. x=0;
  24. cin>>l1>>c1>>l2>>c2>>p;
  25. if(p=-1)
  26. {
  27. for(i=l1; i<=l2; i++)
  28. {
  29. for(j=c1; j<=x+c1; j++)
  30. {
  31. a[i][j]=5;
  32. }
  33. x++;
  34. }
  35.  
  36. }
  37. }
  38. for(i=1; i<=n; i++)
  39. {
  40. for(j=1; j<=m; j++)
  41. {
  42. cout<<a[i][j]<<' ';
  43. }
  44. cout<<endl;
  45. }
  46. return 0;
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment