Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.97 KB | None | 0 0
  1. #include <iostream>  
  2. #include <string>
  3. #include <algorithm>
  4. #include <vector>
  5. using namespace std;
  6. int main()
  7. {
  8.     int k;
  9.     cin >> k;
  10.     vector <int> matrix;
  11.     vector <int> area;
  12.     int d, s, s1, s2;
  13.     string l;
  14.     for (int i = 0; i < k; ++i) {
  15.         for (int j = 0; j < 4; ++j) {
  16.             cin >> d;
  17.             matrix.push_back(d);
  18.         }
  19.     }
  20.  
  21.     for (int i = 0; i < k; ++i) {
  22.         for (int j = 0; j < 1; ++j) {
  23.             if (matrix[2] == 0 && matrix[3] == 0) {
  24.                 s = (matrix[0] - 1) * matrix[1];
  25.                 area.push_back(s);
  26.                 break;
  27.             }
  28.             if (matrix[2] == matrix[0] && matrix[3] == 0) {
  29.                 s = (matrix[0] - 1) * matrix[1];
  30.                 area.push_back(s);
  31.                 break;
  32.             }
  33.             if (matrix[2] == 0 && matrix[3] == matrix[1]) {
  34.                 s = (matrix[1] - 1) * matrix[0];
  35.                 area.push_back(s);
  36.                 break;
  37.             }
  38.             if (matrix[2] == matrix[0] && matrix[3] == matrix[1]) {
  39.                 s = (matrix[1] - 1) * matrix[0];
  40.                 area.push_back(s);
  41.                 break;
  42.             }
  43.            
  44.             s1 = matrix[0] - matrix[2] * mat;
  45.  
  46.  
  47.  
  48.         }
  49.     }
  50.     return 0;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement