We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Can someone please look at my code and tell me where i am i going wrong and i think the last test case should give the answer 2 instead of 1 because minimum of 2 and 3 is 2 which means that a car can pass through.My code is as follows:-
include
using namespace std;
int main()
{
int tsti[100],tstj[100],width[100],n,t;
int vcl[3]={0,1,2};
cout<<"enter n and t:"<>n>>t;
cout<>width[i];
}
cout<<"enter the test cases"<>tsti[i]>>tstj[j];
cout<<"\n";
}
for(int i=0,j=0;i
if((width[tsti[i]]width[tstj[j]]))
{
cout<
}
return 0;
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Service Lane
You are viewing a single comment's thread. Return to all comments →
Can someone please look at my code and tell me where i am i going wrong and i think the last test case should give the answer 2 instead of 1 because minimum of 2 and 3 is 2 which means that a car can pass through.My code is as follows:-
include
using namespace std; int main() { int tsti[100],tstj[100],width[100],n,t; int vcl[3]={0,1,2}; cout<<"enter n and t:"<>n>>t; cout<>width[i]; } cout<<"enter the test cases"<>tsti[i]>>tstj[j]; cout<<"\n"; } for(int i=0,j=0;i
if((width[tsti[i]]width[tstj[j]])) { cout<
} return 0; }