TPK algorithm: Difference between revisions

Content deleted Content added
C++: Peer review, sorry.
Line 97:
<source lang="cpp">
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
}
 
double f(double x) {
return sqrt(fabsabs(x)) + 5*x*x*x;
}
 
int main() {
const int N = int vs[11];
for (auto& v : vs) cin >> v;
vector<int> vals(N);
for (int i = 010; i <>= N0; ++--i) {
double auto x = f(valsvs[i]);
cin >> vals[i];
(x > 400 ? cout << "TOO LARGE" : cout << x) << endl;
for(int i = N - 1; i >= 0; --i) {
}
double x = f(vals[i]);
(x > 400 ? cout << "TOO LARGE" : cout << x) << endl;
}
}
</source>