C++競プロ学習日記(仮)

( 学習記録であり解説Blogではないです )

2016-05-26から1日間の記事一覧

stackクラス

#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) using namespace std; int main (){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; stack<int> st; int a; REP(i,n){ cin >> a; st.push(a);//</int></bits/stdc++.h>…