Guest User

Untitled

a guest
Jan 17th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. bool d[1001];
  4. int main(){
  5. int n;
  6. scanf("%d", &n);
  7. d[1] = true;
  8. d[2] = false;
  9. d[3] = true;
  10. d[4] = true;
  11. //하나라도 뒤에 애가 이기는 경우의 수 있으면 이기게 됨
  12. for (int i = 3; i <= 1000; i++){
  13. d[i] = false;
  14. if (d[i - 1] == false) d[i] = true;
  15. if (d[i - 3] == false) d[i] = true;
  16. if (d[i - 4] == false) d[i] = true;
  17. }
  18. if (d[n]) printf("SK\n");
  19. else printf("CY");
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment