Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠄⠒⠌⠔⣱⣒⣀⣄⡀⠀⠀⠒⠁⠛⠑⠆⠀⠊⠀⠠⠢⢰⠀⠀⠀⣀⡤⢖⣽⣾⣾⣿⣿⡿⣿⣿
- ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠨⠤⢴⣾⣴⣾⣿⣿⢿⣿⣿⣿⣿⡿⠟
- ⠀⠀⠀⠀⠀⠀⠀⠀⢀⠈⠄⠀⢀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠠⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⣿⣷⣿⣻⣿⣿⡿⠛⠁⡀⠄
- ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⡈⠁⣀⠡⠀⡁⠄⢤⡆⠀⡤⠀⡠⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠺⢿⣿⡿⠟⠋⠁⢀⠀⢂⠀⠄
- ⠀⠀⠀⠀⠀⠀⠀⠰⣒⠊⠁⠠⢀⠢⢁⠐⢆⡰⢯⡊⣆⠄⣀⣀⢀⡕⢀⠔⠀⢰⠂⠀⢀⠀⠀⠀⠀⠀⠀⢖⠋⠀⠠⠐⠈⡀⠐⡀⠄⠂
- ⠀⠀⠀⠀⠀⠀⠀⢀⣤⣛⠠⣑⡏⣰⡿⢺⢟⡭⠉⠙⡿⠐⢥⠀⠀⠀⠀⠀⠀⠈⢂⠐⠈⠀⠀⠀⠀⠀⠀⢢⡉⠠⠁⠐⠠⠐⠀⠄⠐⡀
- ⠀⠀⠀⠀⠀⠀⠀⣀⠔⠁⠠⢔⠣⢌⠢⡍⠈⠀⠀⠀⢠⠀⠀⠀⠀⠀⠄⠐⡄⠀⠀⠆⠀⠀⠀⠀⢀⢀⠠⡤⠽⠂⢀⠡⠐⠀⠡⠐⢀⠀
- ⠀⠀⠀⠀⠀⠀⠀⠉⠉⡹⠀⣤⠣⢌⢢⡁⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠆⠀⢲⡀⠀⢠⠀⠂⠀⢔⣥⡛⢤⣶⣤⣐⠀⡀⠂⢁⠐⠀⠂⡀
- ⠀⠀⠀⠀⠀⠀⠀⠀⠴⠕⡇⢎⡗⣈⡲⠁⠀⠀⢀⡇⢸⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⢼⠀⠀⢀⡞⣥⣸⣜⣿⣳⠿⣮⣥⣶⣤⣂⠁⠐⠀
- ⠀⠀⠀⠀⠀⠀⠀⠀⢠⢴⣃⢸⣏⢍⣛⢣⡀⠀⠈⠳⢈⠀⠀⠀⠀⣀⠼⡤⠄⠈⠀⠀⠀⣾⢫⣟⣖⢸⣿⣿⣿⣻⡵⢯⣿⣿⣆⠉⠳⣶
- ⠴⢻⡒⢦⣠⣀⠤⢔⠈⢀⡀⢿⠽⡜⠟⠻⠿⠓⢤⣄⠘⢱⣤⡶⣛⣁⣤⣇⣠⡤⠀⠀⠀⡧⣾⣟⡿⢸⢛⢿⣿⣷⣻⢻⡾⣍⢏⠳⣄⠈
- ⠀⠀⠙⠃⠢⢈⠧⡀⢳⡀⢱⡀⢶⢣⡣⢍⢩⡘⠯⢽⠀⠘⠁⠒⠈⠉⠉⢛⠉⠀⠀⠀⠀⣧⡞⣯⣼⡯⢌⠎⣿⣷⢯⣟⡽⣿⢘⣿⣿⣷
- ⠀⠀⠀⠀⠀⠉⠰⠌⡆⣷⠈⡆⠉⢰⣷⣊⠴⠡⠎⡽⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⢾⢻⣿⢹⠀⠈⢎⣿⣿⣻⢮⣟⣧⣿⣿⣿⢿
- ⡼⡳⡄⢀⡶⡀⠨⡁⠓⡄⡒⣏⣾⢻⣽⣷⡊⡕⢣⠹⢤⡤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⢟⣸⢿⢸⢀⠀⠘⣿⣿⣽⣻⢾⣽⡏⡕⣯⠞
- ⣙⠻⣧⢸⣗⣣⠀⢸⣴⣷⡟⣯⠷⠛⣼⡿⣿⡜⢤⠓⣼⠤⠄⠀⠠⠀⡀⠀⠀⠀⣠⠔⡱⣪⠞⠘⠈⠁⠀⠀⣿⣿⡷⣯⣟⣾⣗⢷⢸⡹
- ⠈⣽⡟⠈⠷⠏⢠⣟⣿⠗⠋⠁⠀⣼⡿⣽⣳⣿⣦⡙⣌⢒⠲⠲⠤⠀⠀⢀⡤⡚⡔⣊⡱⠋⡂⠀⠀⠀⠀⠀⣽⣿⣟⣷⣻⣞⣿⣸⠀⣹
- ⣴⡿⠗⣦⡀⠀⢠⡟⠁⠀⠀⠀⣼⡿⣽⣳⣿⣿⣿⣧⣜⢢⡆⣀⣀⡴⠞⣍⠲⡱⢘⡤⠁⡜⠀⠀⠀⡄⠀⠀⣾⣿⣿⣳⣟⣾⣻⣏⠀⢰
- ⡟⡴⢂⠈⢧⠜⣫⣾⣶⣄⠀⣸⣿⣽⣳⣯⣿⣿⣿⣿⣿⣏⠹⣹⣶⣉⠞⣠⢣⡕⠉⢀⣼⠃⠀⠀⠀⣻⡄⠀⣻⣿⣿⣿⣞⣷⣻⢿⣿⣦
- ⣇⠐⠠⡱⢢⣾⣿⣽⣟⣾⣷⣿⣳⢯⣷⡿⢸⣿⣿⣿⣿⣇⢣⠧⡈⠅⠉⠉⠁⠀⢀⣜⠆⠀⠀⠀⠀⢹⡜⣄⣻⣿⣿⣿⣞⡷⣯⣿⣿⣻
- ⢳⣭⠟⡠⣹⣿⣿⣟⣾⣿⣟⣷⣻⣯⣿⠋⢸⣿⣿⣿⣿⡷⢮⠥⢹⣆⠀⠀⠀⣔⣣⠾⠔⠒⠒⠚⠉⠉⠁⢀⣿⣿⣿⣿⣿⡽⣷⢯⣿⣿
- ⠀⣿⣸⣴⣿⣿⣳⣿⣿⣳⡿⣾⣽⣯⢻⠀⢸⣿⣿⣿⣿⣇⠻⠀⠀⠈⠁⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣻⣟⣷⣿
- ⣾⣿⣿⣿⣿⣽⣿⣟⣾⢿⣽⠟⣹⠁⢸⠀⢸⣿⣿⣿⣿⡇⣏⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣄⡄⣿⣿⣿⣿⣿⣿⣿⣷⢿⣻⣾
- ⣿⣿⣿⣿⡿⣯⣷⡿⣯⡿⠋⠀⠀⠀⣸⠀⠰⣿⣿⣿⣿⣏⠼⠀⠀⠀⢰⠀⠀⠀⠀⠀⠀⠀⠀⢀⡄⠀⢠⣿⣿⣿⣿⣿⣿⠇⠻⣟⣯⣿
- ⣿⣿⣿⢯⣿⡿⣽⡿⠟⡃⠀⡀⠀⠀⡆⠀⠀⣿⣿⣿⣿⡧⢫⡅⠀⠀⠈⡄⠀⠀⠀⠀⠀⠀⠸⠃⠂⠀⣾⣿⣿⣿⣿⣿⡟⠀⡠⢹⢻⣿
- ⣿⣿⣽⣿⣿⠝⠁⠀⠀⢧⠀⡆⠀⠀⠀⠀⠀⣿⣿⣿⣿⣗⢣⢞⣄⠀⠀⢟⣆⠀⠀⠀⢠⠜⠁⠀⠀⣸⣿⣿⣿⣿⣿⡿⠁⠀⢇⢸⠀⠙
- */
- // IAM Batman
- // Vengeance
- // Maybe im the problem
- #include <bits/stdc++.h>
- #define ll long long
- #define Time cerr << "Time Taken: " << (float)clock() / CLOCKS_PER_SEC << " Secs" \<< "\n";
- #define ln cout << endl;
- #define c(n) cout << n;
- #define fix cout << fixed << setprecision(6);
- #define sz(x) int(x.size())
- #define loop(n) for (int i = 0; i < n; i++)
- #define loop1(n) for (int i = 1; i <= n; i++)
- #define vi vector<int>
- #define vll vector<long long>
- #define all(s) s.begin(), s.end()
- #define srt(arr, n) sort(arr, arr + n);
- #define prefixsum(arr, n) \
- for (int i = 1; i <= n; i++) \
- { \
- arr[i] += arr[i - 1]; \
- }
- #define upper(s) transform(all(s), s.begin(), ::toupper);
- #define lower(s) transform(all(s), s.begin(), ::tolower);
- #define pi 3.141592653
- #define pb push_back
- #define vc vector<char>
- using namespace std;
- void Bassel()
- {
- ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- void solve()
- {
- queue<int> q;
- int t;
- cin >> t;
- while (t--)
- {
- int a, b;
- cin >> a >> b;
- if (a == 1)
- q.push(b);
- else if (a == 2)
- {
- if (b == q.front())
- cout << "YES\n";
- }
- else
- cout << "NO\n";
- q.pop();
- }
- }
- int main()
- {
- Bassel();
- queue<int> q;
- int t;
- cin >> t;
- for(int i=0; i<t; i++)
- {
- int a, b;
- cin >> a >> b;
- if (a == 1)q.push(b);
- else if (a == 2)
- {
- if (b == q.front())
- cout << "YES\n";
- }
- else
- cout << "NO\n";
- q.pop();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement