Problem retrenchment
User berrymochi
Submission Time 2026-06-25 09:43:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

retrenchment.cpp: In function ‘int main()’:
retrenchment.cpp:8:12: error: ‘cin’ was not declared in this scope
8 | int N, x; cin >> N >> x;
| ^~~
retrenchment.cpp:4:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
3 | #include<queue>
+++ |+#include <iostream>
4 | using namespace std;
retrenchment.cpp:21:2: error: ‘cout’ was not declared in this scope
21 | cout << y;
| ^~~~
retrenchment.cpp:21:2: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?