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

Time limit exceeded
Posted by Kumar Shashwat 12 Jun 2015 07:23
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;

int main()
{
    cout.setf(cout.fixed);
    cout.setf(cout.showpoint);
    cout.precision(4);
    vector <double> a;
    double c;
    while(cin>>c)
    {
        a.push_back(sqrt(c));
    }
    for(int i = a.size()-1;i>=0;i--)
        cout << a[i] << endl;
}
Re: Time limit exceeded
Posted by orzzzl 26 Jan 2016 21:28
You should use long long instead of double
Re: Time limit exceeded
Posted by ToadMonster 27 Jan 2016 16:35
Probably gcc?
Try to select MSVC compiler. Also you can try using printf/scanf instead of cin/cout.
Re: Time limit exceeded
Posted by ToadMonster 27 Jan 2016 17:23
1) How?
2) Why?