General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
128114995 Practice:
Sparkle_Twilight
1511G - 11 C++17 (GCC 7-32) Accepted 4102 ms 4448 KB 2021-09-07 13:25:55 2021-09-07 13:25:56
→ Source
#pragma GCC optimize("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")
 #include<bits/stdc++.h>
using namespace std;
 const int N=2e5+1e3+7;
 int n;
 int a[N];
 int m,q;
 int main()
{
 scanf("%d%d",&n,&m);
 for(int i=1;i<=n;i++)
  scanf("%d",&a[i-1]);
 sort(a,a+n);
 scanf("%d",&q);
 int i,l,r,x,y,ans;
 while(q--)
 {
  scanf("%d%d",&l,&r);
  x=upper_bound(a,a+n,l)-a;
  y=upper_bound(a,a+n,r)-a;
  ans=0;
  for(i=x;i<y;i++)
   ans^=a[i]-l;
  putchar("BA"[bool(ans)]);
 }
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details