ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Подcкажите (Help me, please)
Posted by Alexandr 1 Jun 2014 00:18
Что не так с моей прогой?
На третьем тесте дает не правильный ответ.
(What is wrong with my program?
It is wrong on the 3rd test.)

#include <iostream>
#include <math.h>
#include <string>
#include <vector>

using namespace std;
int main(void)
{
    vector<long double> b;
    vector<long double>::iterator it;
    long double tmp;
    while(!cin.eof()) {
            cin >> tmp;
            b.insert(b.end(), tmp);
    }

    int ololo;
    cout.setf(ios::fixed);
    for (ololo = b.size()-2; ololo >= 0; ololo--)
     cout  << sqrt(b[ololo]) << endl;

    system("PAUSE");
    return 0;
}

Edited by author 01.06.2014 00:19