C++ Level1 - 나머지 문제들(?) 4
·
코딩/Programmers 알고리즘
1. [1차] 다트게임(2018 KAKAO BLIND RECRUITMENT) 알고리즘 순서 1. 숫자 10 구분 2. S/D/T 구분 3. * # 구분 #include #include #include using namespace std; int solution(string dart) { int idx = 0; int answer = 0; vector vc; while (idx < dart.size()) { if (dart[idx] == '1') { if (dart[idx + 1] == '0') { vc.push_back(10); idx++; } else vc.push_back(1); } else vc.push_back(dart[idx] - '0'); idx++; if (dart[idx] == 'S') v..