일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Linux
- 실습
- 의미와 무의미의 경계에서
- C++
- hackerank
- 트랜잭션 관리
- 1967번
- 백준 1253번
- 셰그먼트트리
- UnrealMP
- 데이터베이스 배움터
- 비재귀셰그먼트
- SQL
- OS
- Unreal
- 5639
- command not found
- objtofbx
- 1759번
- FBX
- 백준
- UActor
- 언리얼 플러그인
- Security
- 2단계로킹
- 언리얼 커스텀 플러그인
- 오손데이터읽기
- 1253번
- 민겸수
- oracle
- Today
- Total
목록코딩 인터뷰 (74)
fatalite
#include using namespace std;int solution(int n){ int ans = 0; while(n != 0) { if(n % 2 == 0) { n /= 2; continue; } else { n -= 1; ans++; } } return ans;}
순열 구현 방법 순간 헷갈려서 애먹은그래도 천천히 생각하니깐 됐다#include #include #include #include #include using namespace std;vector> dupPermutations;pair Simulate( vector> users, vector emoticons, vector discountPercents){ int emoticonPlus = 0; int emoticonMoney = 0; for(vector user : users) { int userSum = 0; for(int j = 0; j = user[1]) { emoticonPlus +=..
vector.size()의 리턴 값은 unsigned다.....segmentation fault나서 헤매었다#include #include #include using namespace std;vector GetIce(int first){ int k = first; vector IceArr; while(k != 1) { IceArr.push_back(k); if(k % 2 == 0) { k = k / 2; } else { k = k * 3 + 1; } } IceArr.push_back(1); return IceArr;}vector solutio..
다익스트라#include #include #include #include #include using namespace std;int MAX_NUM = 100000000;vector> GraphEdges;vector Dijkstra(int start){ vector Dist; for(int i = 0 ; i q; q.push(start); while(!q.empty()) { int cur = q.front(); q.pop(); for(int i = 0 ; i words) { // Make Edges words.push_back(begin); GraphEdges = vector>(words.size()); for..
관련 개념n진법, 구현 이거 이렇게 풀어도 되는건가;; #include #include #include #include #include using namespace std;vector Get10ToN(int n, int number){ vector answer; if(number == 0) { answer.push_back(0); } while(number > 0) { answer.push_back(number % n); number /= n; } std::reverse(answer.begin(), answer.end()); return answer;}string solution(int n, int t, int m, i..
주어진 내용을 그대로 구현하면 된다.내가 구현하려고 했으면 시간이 오래 걸렸을 듯 하다. 관련된 내용은- 스택(그러나, 나는 올바른 괄호 구하는데 스택을 사용하지 않았다.)- 재귀(스택과 재귀!)- string을 잘 다룰 수 있는가?#include #include #include #include using namespace std;bool isRight(string s){ int cnt = 0; for(char c : s) { if(c == '(') { cnt++; } else { if(cnt == 0) { return false; ..
#include #include #include using namespace std;vector solution(int n) { int now = 1; vector> snale = vector>(); // 2차원 배열 for(int i = 1 ; i line = vector(); for(int j = 1; j answer; for(vector line : snale) { for(int a : line) { answer.push_back(a); } } return answer;}
문제 문제 난이도 : 실버 2 문제 분류 : DP 문제 리뷰 DP 문제당.. 문제 소스 코드 #include #include #include #include #include #include #include #include using namespace std; int DP[1001]; int Arr[1001]; void Init() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } int main() { Init(); //Input int n; cin >> n; for (int i = 1; i > Arr[i]; DP[i] = Arr[i]; } for (int i = 2; i
문제 문제 난이도 : 프로그래머스 2단계 문제 정답률 : 42% 문제 분류: BFS, DFS, 다익스트라(내 풀이) 문제 리뷰 복잡복잡하다. 다익스트라 살짝 응용된 버전 PQ에 comp랑 Point struct 빠르게 구현할 수 있어야겠다. 내일 넥토리얼 코딩테스트를 본다. 못 풀겠는건 포기하고 최대한 풀 수 있도록 해야겠다. 문제 소스코드 #include #include #include #include using namespace std; struct Point{ int x; int y; Point(int a, int b){ x = a; y = b; } }; struct comp{ bool operator()(pair& a, pair& b){ return a.first > b.first; } }; in..