#include using namespace std; int a[131072]; int l,r,k; int n,q,br; int main() { #ifdef ONLINE_JUDGE freopen("pokemons.in", "r", stdin); freopen("pokemons.out", "w", stdout); #endif // ONLINE_JUDGE cin>>n; for(int i=0; i>a[i]; cin>>q; while(q--) { cin>>l>>r>>k; br=0; r++; while(l