|
|
вернуться в форумTime limit exceeded #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 Послано orzzzl 26 янв 2016 21:28 You should use long long instead of double Re: Time limit exceeded Probably gcc? Try to select MSVC compiler. Also you can try using printf/scanf instead of cin/cout. Re: Time limit exceeded 1) How? 2) Why? |
|
|