| Problem | fractions |
|---|---|
| User | sussygoose |
| Submission Time | 2026-11-02 14:23:22 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
fractions.cpp: In function ‘int main()’:
fractions.cpp:15:24: error: conversion from ‘double’ to ‘long unsigned int’ in a converted constant expression
15 | pair<int, int> arr[n];
| ^
fractions.cpp:15:24: error: could not convert ‘n’ from ‘double’ to ‘long unsigned int’
fractions.cpp:15:24: error: size of array ‘arr’ has non-integral type ‘double’
fractions.cpp:18:14: error: invalid types ‘std::pair<double, double> [1][double]’ for array subscript
18 | arr[i] = make_pair(a, b);
| ^
fractions.cpp:20:18: error: invalid operands of types ‘std::pair<double, double> [1]’ and ‘double’ to binary ‘operator+’
20 | sort(arr, arr+n, cmp);
| ~~~^~
| | |
| | double
| std::pair<double, double> [1]
fractions.cpp:22:22: error: invalid types ‘std::pair<double, double> [1][do