분류 전체보기98 [6603번] 로또 6603번: 로또 www.acmicpc.net /*6603번 로또*/ #include using namespace std; int N, input, Arr[13], visit[13]; void Comb(int n,int s) { if (n > 5) { for (int i = 0; i Arr[i]; Comb(0,0); cout 2019. 3. 22. [5430번] AC 5430번: AC www.acmicpc.net #include #include #include using namespace std; vectorv; int T, n, input_num, front_p , end_p, dir_flag, error_flag; // dir = 0 : -> , 1 : > T; for (int t = 0; t > command; cin >> n; cin >> input_number_arr; dir_flag = 0; error_flag = 0; front_p = end_p = -1; //입력 if (n > 0) { //문자열 number의 처음은 고정으로 '[' 이기 때문에 범위에서 제외하고 시작, 마지막 ]는 숫자를 저장하기 위한 트리거로 남겨놓음 .. 2019. 3. 21. [1966번] 프린터 큐 1966번: 프린터 큐 www.acmicpc.net /*1966번 프린터 큐*/ #include #include using namespace std; struct info { bool target; int priority; }temp; vectorQ; int T, N, M, cnt = 1, break_flag; int main() { ios::sync_with_stdio(0), cin.tie(0); cin >> T; for (int t = 0; t > N >> M; for (int i = 0; i > input; if (i == M) { temp.target = 1; temp.priority = input; Q.push_ba.. 2019. 3. 19. [1158번] 조세퍼스 문제 1158번: 조세퍼스 문제 www.acmicpc.net /*1158번 조세퍼스 문제*/ #include #include using namespace std; vectorV; int N, M; int main() { ios::sync_with_stdio(0), cin.tie(0); cin >> N >> M; for (int i = 1; i 2019. 3. 15. 이전 1 ··· 10 11 12 13 14 15 16 ··· 25 다음