Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~370 People Reached
Favorite Forums
Favorite Tags
Member Avatar for jayram.chandan

# Help me in solving this puzzle people # Interviewstreet Challenge • Challenges /Manipulative Numbers • Rank: 103 Score: 717.63 Suppose that A is a list of n numbers ( A1, A2, A3, ... , An) and B ( B1, B2, B3, .. ,Bn ) is a permutation of these …

Member Avatar for WaltP
0
136
Member Avatar for jayram.chandan

#include <stdio.h> #include <stdlib.h> long i,j,k,*ni,qi,a,*arr,n,q,p,no,c=0,m,max=0; int main() { ni = malloc(sizeof(long) * 100000); arr=malloc(sizeof(long)*10000); scanf("%ld",&no); for(i=1;i<=no;i++) { scanf("%ld %ld",&n,&qi); for(j=1;j<=n;j++) { scanf("%ld",&ni[j]); } for(k=1;k<=qi;k++) { scanf("%ld %ld %ld",&a,&p,&q); while(p<=q) { arr[++c]=ni[p++]^a; } for(m=1;m<=c;m++) { if(arr[m]>max) { max=arr[m]; } } printf("\n%ld",max); max=0; c=0; } } return 0; } Bold Text …

Member Avatar for jayram.chandan
-1
234