코딩테스트/백준
2024. 9. 7.
[백준] 11286번 : 절댓값 힙
🔗 문제 링크https://www.acmicpc.net/problem/11286👩💻 코드#include #include using namespace std;struct CustomCompare{ bool operator()(int a, int b){ int absA = abs(a); int absB = abs(b); if(absA == absB){ return a > b; }else{ return absA > absB; } }};int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ..