Codeforces Round #385 (Div. 2), problem: (E) Hongcow Buys a Deck of Cards Solution in C/C++
#include<bits/stdc++.h> using namespace std; const int maxn=16,INF=0x3f3f3f3f; char type; int R,B; char readchar() { for(;;) { char ch=getchar(); if(!isspace(ch)) { return ch; } } } int n; typedef pair<int,int> pii; typedef set<pii> Spii; Spii dp; …