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

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

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

vector<pair<type, type>>の要素削除の仕方

#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(n); i++) using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int main() { int N; cin >> N; vector<pair<int, string>> P; REP( i, N ) { string S; cin >> S; P.emplace_back( i + 1, S );</pair<int,></bits/stdc++.h>…

No.24 数当てゲーム|yukicoder

No.24 数当てゲーム - yukicoder を解きました。 #include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(n); i++) using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int main() { int N; cin >> N; vector<int> res( 10, 1 ); REP( </int></bits/stdc++.h>…