Skip to content

ABC451 / cyanaqua#28

Open
CyanAqua12 wants to merge 3 commits intoPNU-PULSE:mainfrom
CyanAqua12:master
Open

ABC451 / cyanaqua#28
CyanAqua12 wants to merge 3 commits intoPNU-PULSE:mainfrom
CyanAqua12:master

Conversation

@CyanAqua12
Copy link
Copy Markdown
Contributor

A: strlen으로 문자열 길이 값을 얻은 후 len % 5 == 0? "Yes" : "No"의 결과값을 출력했습니다.

B: 배열 두 개를 만들어서, 입력을 받을 때마다 $A_i$employeesThisTerm, $B_i$employeesNextTerm의 인덱스로 설정해 각 배열의 해당 인덱스의 값을 갱신한 후, 1부터 M까지 employeesNextTerm[i] - employeesThisTerm[i] 값을 출력했습니다.

C (cpp): std::map이 자동 정렬되는 특성을 사용했습니다.
쿼리 1의 경우 treeList[h]을 1만큼 갱신하고 나무의 개수를 1만큼 증가시켰습니다.
쿼리 2의 경우 맵이 비거나 맵의 시작 키 (.begin()->first)가 $h$보다 커질 때까지 가장 앞의 원소의 값(.begin()->second)만큼 나무의 개수를 감소하고 해당 원소를 제거했습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant