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

Wrong Answer?
Posted by morm 24 Oct 2011 01:07
#include <iostream>
#include <cmath>
#include <vector>
#include <iterator>
#include <algorithm>

using std::cout;
using std::cin;
using std::endl;
using std::vector;

inline double my_sqrt(int val)
{
    return std::sqrt((double)val);
}

int main(int argc, char* argv[])
{
    vector<unsigned int> V;

    std::copy( std::istream_iterator<unsigned int>(cin), std::istream_iterator<unsigned int>(), std::back_inserter(V));

    cout.precision(4);
    cout.setf(std::ios::fixed);

    std::transform(V.rbegin(), V.rend(), std::ostream_iterator<double>(cout, "\n"), my_sqrt);

    return 0;
}
What is wrong???