본문 바로가기

CPP7

[VSC] C,C++ task.json 설정방법 (무한 running task), 컴파일 실행 동시에 하기 빠르게 하겠습니다. c, c++ task.json 인터넷대로 했더니, 실행창이 계속 돌기만 하고 실행이 안되는 경우가 있습니다. 이걸 제거하겠습니다. 아주 짜증이 납니다. 그냥 복붙만 다 했는지 하나도 안돼서 결국 직접 했습니다. ​ task.json (복붙 가능) { "version": "2.0.0", "runner": "terminal", "type": "shell", "echoCommand": true, "presentation": { "reveal": "always" }, "tasks": [ //C++ 컴파일 { "label": "C++ compile & execute", "command": "g++", "args": [ "-g", "${file}", "-o", "${fileDirname}/${f.. 2021. 8. 2.
[SWEA] 11285. 다트 게임 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AXZuaLsqz9wDFAST&categoryId=AXZuaLsqz9wDFAST&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include #include #include typedef long l.. 2021. 2. 5.
[SWEA] 11315. 오목 판정 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AXaSUPYqPYMDFASQ&categoryId=AXaSUPYqPYMDFASQ&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=1 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include #include typedef long long ll; u.. 2021. 2. 4.
[SWEA] 1859. 백만 장자 프로젝트 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5LrsUaDxcDFAXc SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include #include typedef long long ll; using namespace std; int main(void) { int size; int len; vector v; ll quan,buy,sell,num; int max,index; scanf("%d",&size); for(int i = 0; i < size; i++) { ma.. 2021. 2. 3.
[SWEA] 1954. 달팽이 숫자 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5PobmqAPoDFAUq&categoryId=AV5PobmqAPoDFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=2&pageSize=10&pageIndex=2 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include #include #include typedef long long ll; using name.. 2021. 2. 2.
[C++] STL 기초 (range_based for문) vector 안녕하세용!! STL Vector에서 for(int i = 0; i < v.size() ; i++) v[i] 이런것에 너무 익숙해져서 남들도 다 쓰는 자동반복을 연습해보도록 하겠습니다. #include #include #include #include typedef long long ll; using namespace std; int main() { int size; int num; int temp; vector v; scanf("%d",&size); for(int i = 0; i < size; i++) { scanf("%d",&num); for(int k = 0; k < num; k++) { scanf("%d",&temp); v.push_back(temp); } sort(v.begin(),v.end()).. 2021. 1. 30.
[SWEA] 2056 연월일달력(야비한수법) #include using namespace std; int main() { int size,y,m,d; int month[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; scanf("%d",&size); for(int i = 0; i = 1 && m = 1 && d 2021. 1. 22.
728x90