목록2024/07/06 (2)
파란색가운의 개발 블로그
https://www.acmicpc.net/problem/1138 문제N명의 사람들은 매일 아침 한 줄로 선다. 이 사람들은 자리를 마음대로 서지 못하고 오민식의 지시대로 선다.어느 날 사람들은 오민식이 사람들이 줄 서는 위치를 기록해 놓는다는 것을 알았다. 그리고 아침에 자기가 기록해 놓은 것과 사람들이 줄을 선 위치가 맞는지 확인한다.사람들은 자기보다 큰 사람이 왼쪽에 몇 명 있었는지만을 기억한다. N명의 사람이 있고, 사람들의 키는 1부터 N까지 모두 다르다.각 사람들이 기억하는 정보가 주어질 때, 줄을 어떻게 서야 하는지 출력하는 프로그램을 작성하시오.입력첫째 줄에 사람의 수 N이 주어진다. N은 10보다 작거나 같은 자연수이다. 둘째 줄에는 키가 1인 사람부터 차례대로 자기보다 키가 큰 사람이 ..
https://school.programmers.co.kr/learn/courses/30/lessons/299305 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr난이도 : 중 - 중상어렵다. select 쪽에 서브쿼리를 써보는게 처음이였어서 30분정도 고민하고 그냥 답지 봤다. SELECT ID,IFNULL((SELECT COUNT(*) FROM ECOLI_DATA GROUP BY PARENT_ID HAVING PARENT_ID = ID),0) AS CHILD_COUNTFROM ECOLI_DATAORDER BY ID ASC SELECT에 카운트를 쓰긴 써야하..