묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)
5.동전분배하기 문제 밑에코드도 정답이될까요?
n = int(input()) c = [] for _ in range(n): b = int(input()) c.append(b) def DFS(L,first,second,third): global best a = max(first,second,third) - min(first,second,third) if a >= best: return if L == n: if a < best: best = a else: for i in range(n): if ch[i] == 0: ch[i] = 1 DFS(L+1,first+c[i],second,third) DFS(L+1,first,second+c[i],third) DFS(L+1,first,second,third+c[i]) ch[i] = 0 ch = [0] * n best = 10000000000000 DFS(0,0,0,0) print(best)
-
미해결2주만에 통과하는 알고리즘 코딩테스트 (2024년)
1090번 문제 질문
문제에 대한 정리가 필요해 질문 남깁니다.결국 문제는 1명, 2명, 3명 이렇게 차례대로 모였을 때1명 모이면 이동거리 최소 이동 거리 합 : n12명 모이면 이동거리 최소 이동 거리 합 : n2n명 모이면 이동거리 최소 이동 거리 합 : nn이런 최소값을 원하는 문제인거죠?그래서 1번 아이디어로 구현 했을 경우에는모든 좌표에 대해서 1명 모일 때 , 2명 모일 때 반복하면서모든 경우의 수를 찾아가는 가는 방법이고2번 아이디어의 경우는 모든 좌표를 볼 필요 없이 각각의 집 좌표만 보면 된다라는 생각을 해서각각의 집 좌표로 비교해서 경우의 수를 찾는 방법이고3번 아이디어는 각각의 집 좌표들을 모두 비교할 필요 없이 정렬 후 인원의 수 만큼 돌면서 작은 값이면 바꿔준다 방법이고이런 느낌으로 접근을 한게 맞는 걸까요?
-
해결됨(2025) MBTI 테스트 기반 수익형 웹사이트 만들기 - <코딩 배워 사업하자>
AWS 배포 후 사이트 접속이 원할하지 않은 문제
선생님! 안녕하세요!제가 AWS에 배포 후 도메인을 붙이고 접속했을 때 첫 페이지는 잘 나왔습니다.근데 테스트를 클릭하니 URL이 도메인 주소가 아닌 localhost로 바뀌면서 접속이 안됩니다. 어느 포인트를 수정해야할까요?ㅠ
-
미해결퀘이사(Quasar) 완벽 마스터: Vue 프론트 웹을 빠르게 만들고 싶다면! (Based Vue3)
<g-page class="q-pa-xl"> 했는데도 여백 안생김
여백이 선생님 만큼 안떨어지는데 왜 그럴까요? <template> <g-page class="q-pa-xl"> <section class="q-mb-xl"> <div class="text-h4">Headings</div> <q-separator class="q-my-md" /> <p class="text-h1">Headline 1</p> <p class="text-h2">Headline 2</p> <p class="text-h3">Headline 3</p> <p class="text-h4">Headline 4</p> <p class="text-h6">Headline 5</p> <p class="text-h6">Headline 6</p> <p class="text-subtitle1">Subtitle 1</p> <p class="text-subtitle2">Subtitle 2</p> <p class="text-body1"> Body 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur unde suscipit, quam beatae rerum inventore consectetur, neque doloribus, cupiditate numquam dignissimos laborum fugiat deleniti? Eum quasi quidem quibusdam. </p> <p class="text-body2"> Body 2. Lorem ipsum dolor sit amet consectetur adipisicing elit. Cupiditate aliquid ad quas sunt voluptatum officia dolorum cumque, possimus nihil molestias sapiente necessitatibus dolor saepe inventore, soluta id accusantium voluptas beatae. </p> <p class="text-caption">Caption text</p> <p class="text-overline">Overline</p> </section> <section> <div class="text-h4">FontWeight</div> <q-separator class="q-my-md" /> <p class="text-weight-thin"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> <p class="text-weight-light"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> <p class="text-weight-bold"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> </section> <section> <div class="text-h4">CSS Helper Classes</div> <q-separator class="q-my-md" /> <p class="text-weight-thin text-right"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> <p class="text-weight-light text-center"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> <p class="text-weight-bold text-strike"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p> </section> </g-page> </template> <script></script> <script setup></script> <style lang="scss" scoped></style>
-
미해결실습으로 손에 잡히는 SQLD의 정석(2과목)
세션 20부터 22
안녕하세요. 덕분에 sqld 공부를 이해가 쉽게 하고 있습니다 :) 궁금한게 있어서 질문 드립니다.세션 20~ 22는 sql에 필요한 설명인건 아는데 문제풀이가 없는데 자격증공부에는 포함이 안되는걸까요? 그리고 계층형쿼리에서 반복쿼리를 어떤경우에 쓰는지 궁금합니다.
-
미해결이득우의 언리얼 프로그래밍 Part3 - 네트웍 멀티플레이 프레임웍의 이해
CompressedFlags를 이용한 InputThrottle, InputSteering 전달 방법 질문
기본적으로 지원하는 단순 이동이 아니라 자동차처럼 Throttle와 Steering을 구현하려고 합니다.알려주신 방법을 응용해 다음과 같이 구현했습니다. USTRUCT(BlueprintType, Blueprintable) struct FDriveInput { GENERATED_BODY() UPROPERTY(VisibleAnywhere, BlueprintReadOnly) float Throttle = 0.0f; UPROPERTY(VisibleAnywhere, BlueprintReadOnly) float Steering = 0.0f; uint8 GetCompressedFlags() const { uint8 Compressed = 0; int32 ThrottleBits = FMath::Clamp(FMath::CeilToInt((Throttle + 1.0f) * 7.5f), 0, 15); int32 SteeringBits = FMath::Clamp(FMath::CeilToInt((Steering + 1.0f) * 7.5f), 0, 15); Compressed |= (ThrottleBits << 4); Compressed |= (SteeringBits & 0x0F); return Compressed; } void SetFromCompressedFlags(uint8 Flags) { int32 ThrottleBits = (Flags >> 4) & 0x0F; int32 SteeringBits = Flags & 0x0F; Throttle = (float(ThrottleBits) / 7.5f) - 1.0f; Steering = (float(SteeringBits) / 7.5f) - 1.0f; } }; FNetworkPredictionData_Client_TitanCharacter::FNetworkPredictionData_Client_TitanCharacter(const UCharacterMovementComponent& ClientMovement) : Super(ClientMovement) { } FSavedMovePtr FNetworkPredictionData_Client_TitanCharacter::AllocateNewMove() { return FSavedMovePtr(new FSavedMove_TitanCharacter); } void FSavedMove_TitanCharacter::Clear() { Super::Clear(); DriveInput.Steering = 0.0f; DriveInput.Throttle = 0.0f; } void FSavedMove_TitanCharacter::SetInitialPosition(ACharacter* Character) { Super::SetInitialPosition(Character); UTitanCharacterMovementComponent* Movement = Cast<UTitanCharacterMovementComponent>(Character->GetCharacterMovement()); if (Movement) { DriveInput = Movement->DriveInput; } } uint8 FSavedMove_TitanCharacter::GetCompressedFlags() const { uint8 Result = Super::GetCompressedFlags(); Result |= DriveInput.GetCompressedFlags(); return Result; } } void UTitanCharacterMovementComponent::OnMovementUpdated(float DeltaSeconds, const FVector& OldLocation, const FVector& OldVelocity) { UpdateWithDriveState(DeltaSeconds, DriveFlow.DriveState); } void UTitanCharacterMovementComponent::UpdateFromCompressedFlags(uint8 Flags) { Super::UpdateFromCompressedFlags(Flags); DriveInput.SetFromCompressedFlags(Flags); } UpdateWithDriveState 는 실제 캐릭터가 InputThrottle와 InputSteering을 가지고 움직이는 부분입니다.이렇게 하니까 다른 플래그와 겹쳐 아무런 입력을 하지 않았는데 점프를 한다거나, 손실압축의 특성때문에 입력을 하지 않아도 0이 아닌 다른 값이 전달되는 문제가 있었습니다.관련해서 도움을 받고 싶습니다. VehicleMovementComponent도 알아봤는데, CharacterMovementComponent를 확장해서 만들 수 있는 방법은 없는건가요?제가 찾아보면 좋을 법한 키워드 또는 해결방법을 알고 싶습니다.
-
미해결React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지
삭제기능 구현부분에 대해 질문있습니다.
안녕하세요 삭제기능 구현 강의를 보다가 조금 어려운 부분이 있어 질문을 드립니다. canvas.js 파일에서 getCanvases함수와 createCanvas함수는 canvases.get, canvases.post앞에 return이 붙었고 이건 다른 곳에서 사용할 수 있다라고 알고 있습니다. 그럼 deleteCanvas는 왜 똑같이 return을 사용하지 않고 async await을 사용했는지 궁금하고 왜 위에 두 함수는 return을 사용했는지도 궁금합니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
도표 강의 자료 열람 불가능
안녕하세요강의 잘 듣고 있습니다 도표강의자료 들어가면 파일을 찾지 못했다고 오류가 나옵니다
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
VS코드에러
VS코드에서 에러는 뜨는데 실행은 됩니다.강의VS코드에서는 에러 안뜨던데 왜 제꺼에서만 에러가 뜰까요?
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
<> </> 의미
여기서 에러떠서리턴문 안에<> </> 추가했더니 해결됬어요<> </> 의미가 뭐죠?
-
해결됨재고시스템으로 알아보는 동시성이슈 해결방법
왜 클래스 이름에 Facade 가 붙나요?
안녕하세요 좋은 강의 감사드립니다! service -> ropository 를 참조하니 Facade 인데 왜 NamedLockStockFacade , OptimisticLockStockFacade 에 클래스 이름에만 Facade 를 붙이나요?? 현업에서는 어떤 상황에 Facade 를 붙여서 사용하나요?
-
해결됨스프링부트로 직접 만들면서 배우는 대규모 시스템 설계 - 게시판
설정이 헷갈립니다.
영상에서 가정하는게 앱이 여러개이고 DB가 1개인 경우가 맞나요? 만약 앱이 2개이고 DB가 2개인 경우는 어떻게 작동하나요??
-
해결됨서류합격률 4%를 탈출하는 개발자 이력서 작성법(실습 포함)
이력서부분에 대해 질문있습니다.
안녕하세요 강의 너무 잘 보고 있습니다. 현재 이력서를 작성을 하면서 궁금한점이 제가 프론트엔드 개발자로 준비를 하고 있지만 나이가 30대 중후반이라 이 부분이 많이 걸리더라구요. 만약 이력서를 작성후 지원을 한다면 인사담당자가 나이만 보고 이력서를 바로 거르는지 궁금하고 만약 아니라면 저보다 나이가 어린분들과 경쟁을 하려면 이력서를 어떻게 좀 더 경쟁력있게 작성을 하면 좋을지 궁금합니다.
-
미해결김영한의 실전 자바 - 고급 1편, 멀티스레드와 동시성
멀티 코어에서의 CAS
안녕하세요 강사님 🙂 너무너무 잘 듣고 있습니다.좀 바보같은 질문일 수도 있는데, CPU 가 하드웨어적으로 다른 스레드의 접근을 막고 한 연산 안에서 "값 확인, 값 변경" 을 진행한다고 이해했습니다. 혹시 멀티코어에서 더라도 별다른 문제가 발생하진 않나요?가령 두 하드웨어가 연산을 따로따로 하며 서로를 인식하고 있지 않으니까, 동시에 "한 연산"을 수행해서, "값 확인 및 변경" 역시 정확히 동시에 진행된다면 충돌이 나지 않을까? 싶은 생각이 들었습니다. 제가 잘 못찾은건지 질문이 말도 안되는건진 모르겠지만 찾아봐도 잘 나오질 않아서, 질문을 드려보게 되었습니다 ㅠ
-
미해결Practical Testing: 실용적인 테스트 가이드
@DisplayName gradle / intellJ
안녕하세요 좋은 강의 감사합니다. 'DisplayName 을 섬세하게' 강의에서요! 설정 > Run tests using > gradle(-> intellJ) 로 변경하면 displayName 으로 뜬다고 하셨는데 기존의 gradle 로 하더라도 동일한 것 같은데 뭐가 다른가요? 감사합니다.
-
미해결코드로 배우는 React 19 with 스프링부트 API서버
tailwind css 오류
postcss.config.js는 설정할 필요 없나요?
-
미해결[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
작업형1 모의문제3 문제9
작업형1 모의문제3 문제9관련 질문입니다.해설을 보고 코드를 작성했는데, 결과값이 11이 아니라 np.int32(11)로 나옵니다.무엇이 잘못되었을까요?문제9구독(subscribed) 월별로 데이터 개수를 구한 뒤가장 작은 구독 수가 있는 월을 구하시오# your code import pandas as pd df = pd.read_csv("https://raw.githubusercontent.com/lovedlim/inf/main/p1/members.csv") df['subscribed']=pd.to_datetime(df['subscribed']) df['year']= df['subscribed'].dt.year df['month']= df['subscribed'].dt.month df['day'] =df['subscribed'].dt.day df= df.groupby('month').count() df.sort_values('subscribed').index[0]=>np.int32(11)
-
미해결코드로 배우는 React 19 with 스프링부트 API서버
tailwind css 오류
'tailwind'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는배치 파일이 아닙니다.떠서 수동으로 tailwind.config.js 파일 추가하고 index.css랑 기타 설정하고 실행했더니 ERROR in ./src/App.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/App.css)Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): Error: It looks like you're trying to use tailwindcss directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install @tailwindcss/postcss and update your PostCSS configuration. at Le (C:\react\react_springboot\node_modules\tailwindcss\dist\lib.js:36:1984) at LazyResult.runOnRoot (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:361:16) at LazyResult.runAsync (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:290:26) at LazyResult.async (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:192:30) at LazyResult.then (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:436:17)ERROR in ./src/index.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/index.css)Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): Error: It looks like you're trying to use tailwindcss directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install @tailwindcss/postcss and update your PostCSS configuration. at Le (C:\react\react_springboot\node_modules\tailwindcss\dist\lib.js:36:1984) at LazyResult.runOnRoot (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:361:16) at LazyResult.runAsync (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:290:26) at LazyResult.async (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:192:30) at LazyResult.then (C:\react\react_springboot\node_modules\postcss\lib\lazy-result.js:436:17)위 오류가 뜨네요 ㅜ
-
미해결React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지
캔버스 프로젝트에서 파일명에 대해 질문있습니다.
안녕하세요 현재 캔버스 프로젝트 부분을 공부중입니다. 공부를 하면서 파일에 대해 궁금한점이 생겼는데 컴포넌트에는 뒤에 .jsx를 작성했는데 api폴더에서 canvas와 http 파일에는 .js가 붙은 이유가 뭔지 궁금합니다.
-
미해결실무에 바로 적용하는 프런트엔드 테스트 - 1부. 테스트 기초: 단위・통합 테스트
vitest 설치했는데
이렇게 발견된 테스트가 없다면서 8:39 화면처럼 테스트확장에 리스트가 출력되지않습니다.. 브랜치받고 npm ci 까지 한 상태입니다.커서 ide 참고로 0.2.42 버전 없어서 제일낮은 0.3 버전사용해도 못찾습니다 .. Vitest v0.33.0 is not supported. Vitest v1.4.0 or newer is required. 이렇게 출려되는데 버전을 올릴까요 ?