|
|
back to boardPleas Help Why Compilation Erro on C? #include <stdio.h> const int MX=500001; int A[MX]; unsigned char P[MX][3]; int H[1001]; int n,o,i,q,w; char c; main() { scanf("%d",&n); scanf("%c",&c); o=0; while (n>0) { scanf("%c%c",&c,&c); if(c=='U') { scanf("SH %d %d",&q,&w); if (o+1>=MX) { for (i=0; i<o; i++) if (A[i]<0) break; } else { o++; i=o; } A[i]=w; P[i][0]=H[q] / (256*256); H[q]%=(256*256); P[i][1]=H[q] / (256); H[q]%=256; P[i][2]=H[q]; H[q]=i; scanf("%c",&c); } else { scanf("P %d",&q); printf("%ld\n",A[H[q]]); A[H[q]]=-1; H[q]=(int)P[H[q]][0]*256*256+(int)P[H[q]][1]*256+(int)P[H[q]][2]; scanf("%c",&c); } n--; } } Re: Pleas Help Why Compilation Erro on C? Hmm... Dev-C++ compile this code. You may use sending result on your mail, and you'll get report about your problem (see FAQ) |
|
|