분류 전체보기 (602) 썸네일형 리스트형 #23. double vs decimal double이 decimal에 비하면 훨씬 큰 범위를 가진다. But ! 소수점 표현에 있어서는 decimal이 double 보다 훨씬 더 정밀하다. (double 은 소수점 14자리, decimal은 소수점 28자리까지 표현) #15. params 키워드 파라미터에서 foo(int a, params Object[] args ...) 이런 식으로 params 키워드를 쓰면 여러 개의 파라미터를 개수 제한 없이 보낼 수 있다. #10. %ERRORLEVEL% Main() 함수의 리턴값은 C# 프로그램을 호출한 프로그램이나 배치 파일에서 "%ERRORLEVEL%" 환경 변수를 통해 알 수 있다. #9. Main() MSDN에서는 Main()을 public으로 선언하는 걸 추천하지 않는다. public은 다른 class에서 호출할 수 있고, 이는 프로그램 시작 시 오직 한 번만 호출되기로 의도된 Main()의 목적에 맞지 않기 때문이다. #Intro 이 폴더는 https://csharp.2000things.com/ 을 읽고 난 후 개인적으로 알게 된 것들을 남기는 공간입니다. JOSEPHUS #include #include using namespace std; int n = 0, k = 0; void josephus(list &survivors); int main() { int caseNum = 0; cin >> caseNum; for (int cIter = 0; cIter > n >> k; // Initalize list survivors; for (int i = 1; i KLIS 1. LIS 의 Length 구하기 2. LIS 의 Count 구하기 3. K 번쨰 LIS 구하기 Dynamic Programming Technics 로 들어오니 넘 어렵다... #include #include #include using namespace std; const int MAX_N = 500; const int MAX_K = 2000000000 + 100; int N = 0, K = 0; vector nums, kLis; int cacheLen[MAX_N + 1]; int cacheCnt[MAX_N + 1]; int lisLength(int start); int lisCount(int start); void reconstruct(int start, int skip); int main() { i.. LUNCHBOX #include #include #include using namespace std; vector m, e; vector lunchSet; int minLunchTime(); int main() { int caseNum = 0; cin >> caseNum; int n, mInput = 0, eInput = 0; for (int cIter = 0; cIter > n; for (int i = 0; i > mInput; m.push_back(mInput); } for (int i = 0; i < n; i++) { cin .. 이전 1 ··· 69 70 71 72 73 74 75 76 다음