Problem | arrayfind |
---|---|
User | thelusidian |
Submission Time | 2024-03-06 16:32:10 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
arrayfind.cpp: In function ‘int binary_search(const std::vector<int>&, int)’:
arrayfind.cpp:28:21: error: cannot convert ‘std::pair<int, int>’ to ‘int’ in return
28 | return make_pair(less, greater);
| ~~~~~~~~~^~~~~~~~~~~~~~~
| |
| std::pair<int, int>
arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:44:46: error: conversion from ‘int’ to non-scalar type ‘std::pair<int, int>’ requested
44 | pair<int, int> result = binary_search(arr, x);
| ~~~~~~~~~~~~~^~~~~~~~