ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1100. Таблица результатов

Arrays called M[]
Послано Nickolay Todorov 9 мар 2002 18:10
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
Послано Andrey Popyk (popyk@ief.tup.km.ua) 11 мар 2002 13:28
> 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[]
Послано liufeng 23 янв 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;
> }