You are viewing a single comment's thread. Return to all comments →
void countApplesAndOranges(int s, int t, int a, int b, vector apples, vector oranges) { int ac=0, int oc=0;
for(int apple : apples){ if(apple > 0 && (a+apple >= s && a+apple<= t)){ ac++; } } for(int orange: oranges){ if(orange < 0 && (b+orange >= s && b+orange <= t)){ oc++; } } cout<<ac<<endl<<oc;
}**
Seems like cookies are disabled on this browser, please enable them to open this website
Apple and Orange
You are viewing a single comment's thread. Return to all comments →
void countApplesAndOranges(int s, int t, int a, int b, vector apples, vector oranges) { int ac=0, int oc=0;
}**