You are viewing a single comment's thread. Return to all comments →
what is wrong with this??
using namespace std; int main() { int n,i,m,l,k,j,p,x,sum=0; cin>>n>>m>>p; int a[n];
for(i=1;i<=n;i++) { cin>>a[i]; } for(i=1;i<=m;i++) { cin>>j>>k>>l; if(j==1) { a[k]=a[k]^l;
} if(j==2) { for(x=k;x<=l;x++) { if(x+p-2<n) { a[x]=a[x]^a[x+1]; sum+=a[x]; } else a[x]=0; } }
}
cout<
Seems like cookies are disabled on this browser, please enable them to open this website
Xorry Queries
You are viewing a single comment's thread. Return to all comments →
what is wrong with this??
include
using namespace std; int main() { int n,i,m,l,k,j,p,x,sum=0; cin>>n>>m>>p; int a[n];
for(i=1;i<=n;i++) { cin>>a[i]; } for(i=1;i<=m;i++) { cin>>j>>k>>l; if(j==1) { a[k]=a[k]^l;
}
cout<
}