ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.
გაგზავნის თარიღი: 08.04.2021 13:04:13
ამოცანა: პასიანსი
მომხმარებელი: LukaLabadze
ვერდიქტი: ამოუხსნელი
შეფასება: 0 ქულა
#include <bits/stdc++.h> using namespace std; int a,b,c; stack <pair<int,int>> st; pair <int,int> p; int main(){ cin>>a; for (int i=0; i<a; i++) cin>>p.first>>p.second; if (st.empty() || p.first!=st.top().first || p.second!=st.top().second){ st.push(p); } else st.pop(); } cout<<st.size(); }
PROB_cpp_UID2131PID171_cf014c/main.cpp:15:1: error: 'cout' does not name a type cout<<st.size(); ^~~~ PROB_cpp_UID2131PID171_cf014c/main.cpp:16:1: error: expected declaration before '}' token } ^