yuneg11 / programmers-solutions Goto Github PK
View Code? Open in Web Editor NEWProgrammers 문제 풀이
Home Page: https://programmers.co.kr/learn/challenges
Programmers 문제 풀이
Home Page: https://programmers.co.kr/learn/challenges
다익스트라 알고리즘에서 초기값 설정해주고 본격적으로 MST거리 갱신하는 과정에서
for k, i, j in product(range(n), repeat=3):
여기서 k, i, j를
for i, j, k in product(range(n), repeat=3):
이렇게 바꾸면 답이 틀리는 경우가 생기더라구요.
문맥상으로 D[i][j] 를 갱신시키는 코드이니 (i, j)를 박아놓고 경유하는 노드를 바꿔가뭐 최솟값을 갱신하는게 맞다고 생각해지만 그게 틀리더라고요...; 혹시 왜 순서를 바꾸면 답이 틀려지는지 반례라던가 설명좀 부탁드려도될까요?
안녕하세요!
매번 프로그래머스 위클리문제를 풀 때마다 숏코딩으로 엄청 짧은 코드로 코테를 통과하셔서
보다가 숏코딩에 대한 풀이 법이 궁금해서 이슈 남깁니다!
3주차와 4주차 문제와 해설이 궁금해요!
또 어떻게 그렇게 짧은 코드로 풀이가 가능한건지, 알고 싶습니다!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.