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

Обсуждение задачи 1017. Лестницы

Very strange -- CE
Послано Tbilisi SU: Andrew Lutsenko 9 май 2006 12:44
here's part of my code:
int main(){
    long long a[501]={0};
    ......................
    cout<<a[n];
    return 0;
}

and this is reply on my e-mail:

You tried to solve problem 1017 The Staircases.
Your solution was compiled with the following errors:

bdaa8c64-fc2a-48e3-930d-26de8f4f79d6
bdaa8c64-fc2a-48e3-930d-26de8f4f79d6(15): error: more than one operator "<<" matches these operands:
            function "ostream::operator<<(char)"
            function "ostream::operator<<(unsigned char)"
            function "ostream::operator<<(signed char)"
            function "ostream::operator<<(short)"
            function "ostream::operator<<(unsigned short)"
            function "ostream::operator<<(int)"
            function "ostream::operator<<(unsigned int)"
            function "ostream::operator<<(long)"
            function "ostream::operator<<(unsigned long)"
            function "ostream::operator<<(float)"
            function "ostream::operator<<(double)"
            function "ostream::operator<<(long double)"
            operand types are: ostream_withassign << __int64
      cout<<a[n];
          ^

compilation aborted for bdaa8c64-fc2a-48e3-930d-26de8f4f79d6 (code 2)

Now can somebody explain THIS??!!?!
I read the FAQ and theres definitly said that u may use
cin and cout for Long Long

P.S. the same solution in Pascal got AC :/

P.P.S and even more!
 this fake solution:
#include <iostream.h>

int main()
{
    long long n;
    cin>>n;
    cout<<n;
    return 0;
}

gets compilation errors on cin>>n and cout<<n also!!!!

Edited by author 09.05.2006 12:51
Re: Very strange -- CE
Послано Vladimir Yakovlev (USU) 9 май 2006 15:31
Such code works

#include <iostream>
using namespace std;

int main()
{
    long long n;
    cin>>n;
    cout<<n;
    return 0;
}

Sorry, FAQ needs to be updated.