Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <vector>
- #include <cmath>
- #include <algorithm>
- #include <string>
- #include <queue>
- #include <utility>
- #include <set>
- #include <iomanip>
- #include <ctime>
- using namespace std;
- #define ll long long
- #define pi 3.141592653589793
- #define pb push_back
- #define forto(l,a,b) for(long long l = a; l <= b; ++l)
- #define downto(l,a,b) for(long long l = a; l >= b; --l)
- #define Fred_Flinstone ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
- #define ln '\n'
- #define decimal cout<<fixed<<setprecision(15)
- bool cmp(long &a, long &b){
- string s;
- cout << "1 " << a << ' ' << b << ln;
- cout << flush;
- cin >> s;
- if (s[0] == 'Y') return 1;
- return 0;
- }
- int main()
- {
- Fred_Flinstone;
- long n;
- vector< long > v;
- cin >> n;
- forto(f, 1, n){
- v.pb(f);
- }
- sort(v.begin(), v.end(), cmp);
- cout << "0 ";
- forto(f, 0, n-1){
- cout << v[f] << ' ';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement