Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vector<double> x(n), xx(n);
- REP(i, n) {
- cin >> x[i];
- xx[i] = x[i];
- }
- sort(xx.begin(), xx.end());
- vector<double> rank_x(n);
- REP(i, n) {
- REP(j, n) {
- if (xx[i] == x[j]) {
- rank_x[j] = i + 1;
- break;
- }
- }
- }
Add Comment
Please, Sign In to add comment