Problem | moneychanger |
---|---|
User | AJigglypuffCoder |
Submission Time | 2025-01-13 18:03:02 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
moneychanger.cpp: In function ‘int main()’:
moneychanger.cpp:35:36: error: conversion from ‘__normal_iterator<long unsigned int*,vector<long unsigned int>>’ to non-scalar type ‘__normal_iterator<int*,vector<int>>’ requested
35 | vector<int>::iterator it = unique(A.begin(), A.end());
| ~~~~~~^~~~~~~~~~~~~~~~~~~~
moneychanger.cpp:36:34: error: no matching function for call to ‘distance(std::vector<long unsigned int>::iterator, std::vector<int>::iterator&)’
36 | A.resize(distance(A.begin(), it));
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from moneychanger.cpp:1:
/usr/include/c++/9/bits/stl_iterator_ba