Problem link
Plz, help I can’t understand which test case my program didn’t pass.
#include
using namespace std;
int main() {
int t;
cin>>t;
while(t–){
int n=0,r=0;
cin>>r>>n;
for(int i=1;i<=n;i++){
int temp=0;
cin>>temp;
if(temp>=r){
cout<<i<<endl;
break;
}
}
}
return 0;
}
bro u should have taken the elements in an array first then u should have done the calculation. This is because u are not completing the input and breaking when ur condition is met so thats why u r getting WA
I need help for the last problem @tannatsri
please attach the editorial with the problem
1 Like
I got your point thanks brother.