Problem fractions
User ilikeeggs
Submission Time 2025-03-10 13:02:45
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fractions.cpp: In function ‘int32_t main()’:
fractions.cpp:8:40: error: template argument 1 is invalid
8 | vector<pair<double, pair<int,int>> f;
| ^
fractions.cpp:8:40: error: template argument 2 is invalid
fractions.cpp:11:9: error: ‘f’ was not declared in this scope
11 | f.push_back(make_pair((double)a/b, make_pair(a,b));
| ^
fractions.cpp:11:59: error: expected ‘)’ before ‘;’ token
11 | f.push_back(make_pair((double)a/b, make_pair(a,b));
| ~ ^
| )
fractions.cpp:13:10: error: ‘f’ was not declared in this scope
13 | sort(f.begin(), f.end());
| ^