백준 1062 가르침 혼내주기
비트마스크 dp인줄 알았는데 그냥 완전탐색으로 풀 수 있는 문제였다... 이번 문제도 corner case를 잡지 못해서 오래 헤맸다... 멘탈 바사삭... #include #define fastio ios::sync_with_stdio(0), cin.tie(0) using namespace std; string words[50]; bool check[26]; char must[5] = {'a', 'n', 't', 'c', 'i'}; int n, k, tot = 0, ans = 0; void input() { fastio; for(int i = 0; i > n >> k; for(int i = 0; i < n; ++i) { ci..
혼내주기
2021. 8. 1. 22:54