Problem swords
User pearl333
Submission Time 2023-12-24 18:46:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:13:58: error: conversion from ‘_Rb_tree_iterator<pair<const int,int>>’ to non-scalar type ‘_Rb_tree_iterator<pair<const long int,long int>>’ requested
13 | std::map<long, long>::iterator found = myMap.find(a);
| ~~~~~~~~~~^~~
swords.cpp:14:19: error: no match for ‘operator==’ (operand types are ‘std::map<long int, long int>::iterator’ {aka ‘std::_Rb_tree_iterator<std::pair<const long int, long int> >’} and ‘std::map<int, int>::iterator’ {aka ‘std::_Rb_tree_iterator<std::pair<const int, int> >’})
14 | if (found == myMap.end() || (found->second) <= b) {
| ~~~~~ ^~ ~~~~~~~~~~~
| | |
| | _Rb_tree_iterator<pair<const int,int>>
| _Rb_tree_iterator<pair<