|
|
back to boardArrays called M[] I highly recommend you not to use arrays called M[]. That's very wrong. I wanted to use it, so I get WA. I do not know how I get to the idea, but I changed to Y[] and it worked. ACC. Wish you luck This code written in C++ does not work: #include <stdio.h> int X[150000]; char M[150000]; int N; int main () { int i, j;
scanf ("%d", &N); for (i=0; i<N; ++i) scanf ("%d%d", &X[i], &M[i]); for (j=100; j>=0; --j) for (i=0; i<N; ++i) if ( M[i]==j) printf ("%d %d\n", X[i], M[i]); return 0; } OH MY GOD! IT IS TRUE!!!!!!! IT REALLY GETS WA WITH ARRAY M[] AND GET ACCEPTED WITH ARRAY Y[] INSTEAD. WITH ARRAYS A[] OR C[] IT GETS WA TOO. WHAT IS THIS VERY STRANGE BUG????????? PEOPLES CHECK THIS > I highly recommend you not to use arrays called M[]. That's very > wrong. I wanted to use it, so I get WA. I do not know how I get to > the idea, but I changed to Y[] and it worked. ACC. > Wish you luck > This code written in C++ does not work: > #include <stdio.h> > int X[150000]; > char M[150000]; > int N; > > int main () { > int i, j; > > scanf ("%d", &N); > > for (i=0; i<N; ++i) > scanf ("%d%d", &X[i], &M[i]); > > for (j=100; j>=0; --j) > for (i=0; i<N; ++i) > if ( M[i]==j) > printf ("%d %d\n", X[i], M[i]); > return 0; > } Re: Arrays called M[] Posted by liufeng 23 Jan 2003 18:22 a joke this program should run in C language i submit it in C++ language ,but got WA then in C language ,it's ACC > I highly recommend you not to use arrays called M[]. That's very > wrong. I wanted to use it, so I get WA. I do not know how I get to > the idea, but I changed to Y[] and it worked. ACC. > Wish you luck > This code written in C++ does not work: > #include <stdio.h> > int X[150000]; > char M[150000]; > int N; > > int main () { > int i, j; > > scanf ("%d", &N); > > for (i=0; i<N; ++i) > scanf ("%d%d", &X[i], &M[i]); > > for (j=100; j>=0; --j) > for (i=0; i<N; ++i) > if ( M[i]==j) > printf ("%d %d\n", X[i], M[i]); > return 0; > } |
|
|