Problem sum2
User berrymochi
Submission Time 2026-06-25 10:06:18
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sum2.cpp: In function ‘int main()’:
sum2.cpp:8:2: error: ‘cin’ was not declared in this scope
8 | cin >>N;
| ^~~
sum2.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;
sum2.cpp:17:2: error: ‘cout’ was not declared in this scope
17 | cout<< A[N-1]+A[N-2];
| ^~~~
sum2.cpp:17:2: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?