본문 바로가기

NOTE/Algorithm26

[프로그래머스] 폰켓몬 _ 해시 _ C++ https://school.programmers.co.kr/learn/courses/30/lessons/1845 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr map 사용#include ms 설명 링크 참고 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 29 30 #include #include #include using namespace std; int solution(vector nums) { int answer = 0; map m; sort(nums.begin(), .. 2024. 5. 10.
SW Expert _ 1024번 문제 https://www.swexpertacademy.com/main/learn/course/lectureProblemViewer.do #define _CRT_SECURE_NO_WARNINGS#include #include #include using namespace std; int main(){ int t; int result_cnt = 1; cin >> t; while (t--) { int row, col; int ten[10] = { 13, 25, 19, 61, 35, 49, 47, 59, 55, 11 }; // 암호해독 코드들 10진수 표현 int lastOne_row = 0; // 암호의 마지막 1로 CHECK int lastOne_col = 0; char arr[51][101] = { 0, }; .. 2018. 4. 1.
[알고리즘문제] acmicpc_벌집 https://www.acmicpc.net/problem/2292 몇일쉬다가... 다시 심심풀이 알고리즘문제풀기 시작.규칙찾는 문제담. 123456789101112131415161718192021222324#include #define SIZE 100000using namespace std; int main(){ int num; int maxSum = 1; int sixCount = 1; cin >> num; while (1) { if (maxSum >= num) { cout 2018. 4. 1.
[알고리즘문제] acmicpc_단어의개수 https://www.acmicpc.net/problem/1152집가기전 심심풀이 문제. C++ 14 버전으로 냈더니 자꾸 strtok부분에서 에러뜨길래걍 C++로 냈더니 되네.버전에 따라 strtok이 strtok_s로 쓰이는건 알고있는데,strtok_s로 해도 C++14에서 부분에러뜨던데strtok_s 때문에 헤더를 string.h랑 cstring 넣어도 에러가 떴었고 흠..이건 어떻게 뭐가 잘못된걸까 (-.-)? 결국 해결된 소스는 걍 C++ 버전의 원래 소스로 낸 아래것12345678910111213141516171819202122#include#include #define SIZE 1000001using namespace std; int main() { char arr[SIZE] = { 0, }.. 2018. 4. 1.