Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- #include <vector>
- #include "algorithm"
- int gcd (int a, int b) {
- return b ? gcd (b, a % b) : a;
- }
- bool f(const int mas[3], const int mas1[3]){
- return mas[0] < mas1[0];
- }
- int main() {
- int t; cin >> t;
- int mas[1000][3], mas2[1000][3];
- for (int i = 0; i < t; i++)
- {
- int n; cin >> n;
- int summ1 = 0;
- int summ2 = 0;
- int summ3 = 0;
- int maxx = 0;
- for (int j = 0; j < n; i++){
- cin >> mas[j][0] >> mas[j][1];
- }
- sort(mas, mas+n, f);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement