Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Q1
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int n;cin >> n;int arr[1000][2];
- for (int i = 0; i < n; i++)
- for (int j = 0; j < 2; j++)
- cin >> arr[i][j];
- for (int i = 0; i < n; i++)
- {
- cout << (abs(arr[i][0]) + abs(arr[i][1])) << endl;
- }
- }
- */
- /*
- * Q2
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main()
- {
- int arr[1000][3];
- int n; cin >> n;
- for (int i = 0; i < n; i++)
- for (int j = 0; j < 3; j++)
- cin >> arr[i][j];
- for (int i = 0; i < n; i++)
- cout << max(arr[i][0],max(arr[i][1], arr[i][2])) << endl;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement