Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <algorithm>
- #include <vector>
- using namespace std;
- int main()
- {
- int k;
- cin >> k;
- vector <int> matrix;
- vector <int> area;
- int d, s, s1, s2;
- string l;
- for (int i = 0; i < k; ++i) {
- for (int j = 0; j < 4; ++j) {
- cin >> d;
- matrix.push_back(d);
- }
- }
- for (int i = 0; i < k; ++i) {
- for (int j = 0; j < 1; ++j) {
- if (matrix[2] == 0 && matrix[3] == 0) {
- s = (matrix[0] - 1) * matrix[1];
- area.push_back(s);
- break;
- }
- if (matrix[2] == matrix[0] && matrix[3] == 0) {
- s = (matrix[0] - 1) * matrix[1];
- area.push_back(s);
- break;
- }
- if (matrix[2] == 0 && matrix[3] == matrix[1]) {
- s = (matrix[1] - 1) * matrix[0];
- area.push_back(s);
- break;
- }
- if (matrix[2] == matrix[0] && matrix[3] == matrix[1]) {
- s = (matrix[1] - 1) * matrix[0];
- area.push_back(s);
- break;
- }
- s1 = matrix[0] - matrix[2] * mat;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement