본문 바로가기

전체 글

(426)
Visual Studio console closing problem after running main function 비주얼스튜디오 메인 실행 후 콘솔 꺼지는 문제 Visual Studio console closing after running main function 비주얼스튜디오 메인 실행 후 콘솔 꺼지는 문제 메인함수를 콘솔에서 확인하려고 실행시 (e.g. Hello world)동작이 끝난 후 아무키나 누르세요... 에서 멈추지 않고 바로 콘솔이 꺼지는 경우 When you wanna check main function on console (e.g. hello world)It's not stop after finishing function. Check after changing properties in each project 프로젝트마다 속성 설정을 바꿔주고 확인 Debug (menu) -> Properties (project) -> Linker -> Syste..
Aracade Intro #32 absoluteValuesSumMinimization. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #32 absoluteValuesSumMinimization. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given a sorted array of integers a, find an integer x from a such that the value of abs(a[0] - x) + abs(a[1] - x) + ... + abs(a[a.length - 1] - x) is the smallest possible (here abs denotes the absolute value).If there are several possible answers, output the..
Aracade Intro #31 depositProfit. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #31 depositProfit. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. You have deposited a specific amount of money into your bank account. Each year your balance increases at the same growth rate. With the assumption that you don't make any additional deposits, find out how long it would take for your balance to pass a specific threshold. Of ..
Aracade Intro #30 circleOfNumbers. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #30 circleOfNumbers. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Consider integer numbers from 0 to n - 1 written down along the circle in such a way that the distance between any two neighboring numbers is equal (note that 0 and n - 1 are neighboring, too). Given n and firstNumber, find the number which is written in the radially oppos..
How to initialize vector in C++ STL (Standard Template Library), STL 벡터 초기화 방법 How to initialize vector in C++ STL (Standard Template Library), STL 벡터 초기화 방법 제일 간단한 3가지만Simplest way to initialize vector in c++ 1 - 벡터를 만들면서 즉시 값을 넣어서 초기화 2 - 벡터를 만들어두고 넣고 싶은 값을 넣어서 초기화 3 - 넣을 배열이 있다면, 벡터를 만들며 배열을 옮겨 넣으며 초기화 // 1 - Initialize when you make vector 2 - Initialize after making vector 3 - Initialize when you make vector using array you made before it int main(int argc, char*(*arg..
C++ How to convert string to integer in C++, string 에서 int 변환하는 방법, Easiest way to convert string to int. C++ How to convert string to integer in C++, string 에서 int 변환하는 방법, Easiest way to convert string to int. 반대로 바꾸는 함수는 아래에 링크로 가보세요~ ~ integer to string function ( Here ) c++ string 자료형에서 integer 으로 string형 숫자를 integer 로 저장 문제풀이 연습하는 사이트 같은데서는 c++을 주로 쓰는데 만이 쓰지만 항상 까먹어서 적어둠 I use sometimes this method, especially in codefights or leetcode when i'm using c++.. always confusing. Code.. lemme see co..
C++ How to convert integer to string in C++, int 에서 string 변환하는 방법, Easiest way to convert int to string. C++ How to convert integer to string in C++, int 에서 string 변환하는 방법, Easiest way to convert int to string. c++ int 자료형에서 string 으로 숫자를 char형 숫자로 저장 반대로 바꾸는 함수는 아래에 링크로 가보세요~ ~string to integer ( Here ) 문제풀이 연습하는 사이트 같은데서는 c++을 주로 쓰는데 만이 쓰지만 항상 까먹어서 적어둠 I use sometimes this method, especially in codefights or leetcode when i'm using c++.. always confusing. example code below // input -> integer// ..
Aracade Intro #29 chessBoardCellColor. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Aracade Intro #29 chessBoardCellColor. Algorithm, 알고리즘, Codefights, CodeSignal, 코드파이트, 코드시그널, 예제, example, c++ java c# scalar Q. Given two cells on the standard chess board, determine whether they have the same color or not. 체스판에서 주어진 두개의 셀이, 같은 색깔인지 아닌지 확인하라. e.g. For cell1 = "A1" and cell2 = "C3", the output should bechessBoardCellColor(cell1, cell2) = true. For cell1 = "A1" and cell2 = "H3", ..