General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
112901544 Practice:
sh1194
1511G - 8 C++17 (GCC 9-64) Accepted 4648 ms 804 KB 2021-04-13 10:33:36 2021-04-13 10:33:36
→ Source
#pragma GCC optimize("O3")
#pragma GCC target("avx2")
#include <bits/stdc++.h>
using namespace std;
int main() {ios::sync_with_stdio(false);cin.tie(nullptr);int N, M;cin >> N >> M;vector<int> a(N);for (int i = 0; i < N; i++)cin >> a[i];
	sort(a.begin(), a.end());int Q;cin >> Q;while (Q--) {int l, r;cin >> l >> r;int L = lower_bound(a.begin(), a.end(), l) - a.begin();
		int R = upper_bound(a.begin(), a.end(), r) - a.begin();int f = 0;for (int i = L; i < R; i++)f ^= a[i] - l;cout << "AB"[f == 0];}}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details