I am getting RE test case skipped error. It is working properly with the
test case mention in problem. My code is:
#include<iostream>
using namespace std;
int main(){
int T,i;
long long int N,j,k,cnt,prev,h;
cin>>T;
for(i=1;i<=T;i++){
cin>>N;
long long int *arr = new long long int(N+1);
h = 1;
cout<<"Case #"<<i<<": ";
for(j=1;j<=N;j++){
cin>>arr[j];
cnt=0;
for(k=1;k<=j;k++){
if(arr[k]>=h){
cnt++;
}
}
if(cnt==h){
cout<<h<<" ";
h++;
prev=cnt;
}
else{
cout<<prev<<" ";
}
}
cout<<endl;
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/35d4f626-1694-48cf-b653-acead2177775%40googlegroups.com.