...
본문 바로가기

분류 전체보기

(127)
백준 1699 - 제곱수의 합 - swift https://www.acmicpc.net/problem/1699 1699번: 제곱수의 합 어떤 자연수 N은 그보다 작거나 같은 제곱수들의 합으로 나타낼 수 있다. 예를 들어 11=32+12+12(3개 항)이다. 이런 표현방법은 여러 가지가 될 수 있는데, 11의 경우 11=22+22+12+12+12(5개 항)도 가능하다 www.acmicpc.net dp문제이다. dp [ i ] = i값을 만들기위한 최소한의 항의개수라고 정의한다. 그래서 1부터 N까지 하나씩 탐색하면서, 1부터 N까지중에서 제곱수로 dp를 갱신해나간다. 처음에는 각각 10만*10만 시간복잡도인줄 알아서 고민했는데, 알고보니, 제곱수까지만 확인하면된다. 즉 N이 10000까지라면, 제곱수는 1부터 100까지만 확인하면 된다. 10만이라면..
WWDC 18 - Behind the Scenes of the Xcode Build Process 세션보면서 정리한 내용입니다. 해석이 잘못된 경우가 있을수있으니 발견하시면 댓글로 남겨주시면 감사하겠습니다🙏🏻 https://developer.apple.com/videos/play/wwdc2018/415/ Behind the Scenes of the Xcode Build Process - WWDC18 - Videos - Apple Developer Ever wonder what happens when you build your project in Xcode? Learn how Xcode automates the steps required to build an application, and... developer.apple.com 관련내용 Xcode가 어떻게 빌드하는 과정을 자동화하는지 , 어떻게 나누어..
WWDC 15 - Optimizing Swift Performance 세션보면서 정리한 내용입니다. 해석이 잘못된 경우가 있을수있으니 발견하시면 댓글로 남겨주시면 감사하겠습니다🙏🏻 https://developer.apple.com/videos/play/wwdc2015/409/ Optimizing Swift Performance - WWDC15 - Videos - Apple Developer Hear from the experts about how you can write faster Swift code and use Instruments to identify performance bottlenecks. Dive deep into... developer.apple.com 관련내용 더효과적인코드를 작성할수있도록 도와주는 기술들을 발견하라~ 👍요약 swift는 컴파일러를통해 최..
WWDC 13 - What’s new with Multitasking 세션보면서 정리한 내용입니다. 해석이 잘못된 경우가 있을수있으니 발견하시면 댓글로 남겨주시면 감사하겠습니다🙏🏻 https://developer.apple.com/videos/play/wwdc2013/204/ What's New with Multitasking - WWDC13 - Videos - Apple Developer It's critical to keep people's content as up to date as possible. Learn how new APIs in iOS 7 will let your applications fetch new data... developer.apple.com 관련내용 멀티테스킹, 백그라운드 테스킹 👍요약 백그라운드에서 멀티테스킹하는 방법은 크게 3가지로, bac..
WWDC 16 - What's New in UICollectionView in iOS 10 세션보면서 정리한 내용입니다. 해석이 잘못된 경우가 있을수있으니 발견하시면 댓글로 남겨주시면 감사하겠습니다🙏🏻 https://developer.apple.com/wwdc16/219 What's New in UICollectionView in iOS 10 - WWDC16 - Videos - Apple Developer UICollectionView is a powerful class allowing your app to manage and customize the layout of views. iOS 10 brings enhancements for better... developer.apple.com 요약 스무스한 스크롤이되려면 초당 60프레임이 나와야한다. UICollectionView cell은 pr..
백준 1039 - 교환 - swift https://www.acmicpc.net/problem/1039 1039번: 교환 첫째 줄에 정수 N과 K가 주어진다. N은 1,000,000보다 작거나 같은 자연수이고, K는 10보다 작거나 같은 자연수이다. www.acmicpc.net 완전탐색이 필요한 문제다. 완전탐색을 하면 중복되는 경우의수가 존재할수있는데, 이는 check [ 숫자 ] [ k ] = k번 교환했을때 숫자가 이미 나왔는지 로 체크하여 중복횟수를 줄일 수 있다. 길이가 1인경우와 길이가 2면서 0이포함된 숫자는 교환할수없다는 부분도 고려해야한다. let inp = readLine()!.split(separator: " ").map{Int(String($0))!} var check = Array(repeating: Array(rep..
백준 15732 - 도토리 숨기기 - swift https://www.acmicpc.net/problem/15732 15732번: 도토리 숨기기 첫째 줄에 상자의 개수 N(1 ≤ N ≤ 1,000,000)과 규칙의 개수 K(1 ≤ K ≤ 10,000), 도토리의 개수 D(1 ≤ D ≤ 1,000,000,000)가 주어진다. 그 후 K개 줄에는 A, B, C(1 ≤ C ≤ A ≤ B ≤ N)가 주어지며 A번 상자부터 www.acmicpc.net 조금 고민이 필요한 문제였다. 하나씩 규칙들을 탐색하면서 각 상자에 카운팅해도되겠지만, 1개씩 찾다보면 도토리가 총 10억개이므로 시간초과다. 좀 더 효율적으로 찾는 방법이 필요하다. 고민을해보니, 100~150개에서, 10간격이라면, 총 6개 도토리를 넣을수있다. 110~150, 15간격이라면 총 3개 도토리를..
WWDC 19 - Advance in App Background Execution 세션보면서 정리한 내용입니다. 해석이 잘못된 경우가 있을수있으니 발견하시면 댓글로 남겨주시면 감사하겠습니다🙏🏻 https://developer.apple.com/videos/play/wwdc2019/707/ Advances in App Background Execution - WWDC19 - Videos - Apple Developer Background execution is a powerful tool your app can leverage to provide a great user experience. Learn about best practices to follow... developer.apple.com 관련내용 백그라운드실행을배워보자 새로운 백그라운드 스케쥴링API를 배워보자 applicati..