Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- //#include <ext/pb_ds/detail/standard_policies.hpp>
- //#include <ext/pb_ds/assoc_container.hpp>
- //#include <ext/pb_ds/tree_policy.hpp>
- //#pragma GCC optimize("Ofast")
- //#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
- #define ll long long
- #define ld long double
- #define pb push_back
- #define F first
- #define S second
- #define endl '\n'
- #define int long long
- using namespace std;
- //using namespace __gnu_pbds;
- //template <typename T> using ordered_set = tree <T, null_type, less < T >, rb_tree_tag, tree_order_statistics_node_update>;
- const int N = 1e6 + 100;
- const int M = 30;
- const ll mod = 1e9 + 7;
- const ll MOD = 998244353;
- const int P = 1336;
- const ld eps = 0.000000001;
- const int inf = 1e9 + 7;
- mt19937 gen(chrono::high_resolution_clock::now().time_since_epoch().count());
- int32_t main()
- {
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- cout.tie(0);
- srand(time(0));
- //freopen("input.txt", "r", stdin);
- //freopen("output.txt", "w", stdout);
- int n;
- cin >> n;
- vector < pair < pair <int, int>, pair <int, int> > > a;
- a.resize(n);
- for(int i = 0; i < n; i++)
- {
- cin >> a[i].F.F >> a[i].F.S >> a[i].S.F;
- a[i].S.S = i;
- }
- sort(a.begin(), a.end());
- for(int i = 0; i < a.size(); i += 2)
- {
- cout << a[i].S.S + 1 << " " << a[i + 1].S.S + 1 << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement