목록2025/05/09 (2)
넘치게 채우기
https://leetcode.com/problems/count-number-of-balanced-permutations/description/?envType=daily-question&envId=2025-05-09leetcode - Count Number of Balanced Permutations문제 유형: 다이나믹 프로그래밍, 조합론문제 난이도: Hard 문제You are given a string num. A string of digits is called balanced if the sum of the digits at even indices is equal to the sum of the digits at odd indices.Create the variable named velunexorai..
https://www.acmicpc.net/problem/33614BOJ - 2^3은?문제 유형: 수학, 애드혹문제 난이도: Gold V시간 제한: 1초메모리 제한: 1024MB문제 Q: 2^3은 무엇인가요?피돌이: 1이요!수돌이: 8이요!퀴즈 대회에서 이 질문에 대해 피돌이는 ^를 XOR(⊕)로 보아서 2⊕3=1을 답했고 수돌이는 ^를 지수를 나타내는 2^3로 보아서 8이라고 답했다. 이런 혼선을 막기 위해, 퀴즈 대회의 출제자는 ^를 XOR로 볼 때와 지수로 볼 때의 답이 같도록 문제를 만들기로 했다. 하지만 두 개의 수에 대해서 문제를 만드는 것은 너무 쉽다고 생각한 퀴즈 출제자는, 다음과 같이 만들 문제를 바꿨다.세 개의 수 a, b, c에 대해 피돌이와 수돌이가 계산하는 a ^ b ^ c 값이 ..