| Problem | musicalchairs |
|---|---|
| User | Pan |
| Submission Time | 2026-02-02 14:51:39 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
musicalchairs.cpp: In function ‘ll solve()’:
musicalchairs.cpp:61:58: error: call of overloaded ‘abs(long long unsigned int)’ is ambiguous
61 | ans += abs((ll) sum2 - (ri.size() * (ri.size() + 1)/2));
| ^
In file included from /usr/include/c++/9/bits/std_abs.h:38,
from /usr/include/c++/9/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from musicalchairs.cpp:1:
/usr/include/stdlib.h:840:12: note: candidate: ‘int abs(int)’
840 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
In file included from /usr/include/c++/9/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from musicalchairs.cpp:1:
/usr/include/c++/9/bits/std_abs.h:103:3: note: candidate: ‘constexpr __float128 std::abs(__float128)’
103 | abs(__fl