코딩테스트54 [Javascript(NodeJS)/Softeer] Lv2. 비밀 메뉴 (21년 재직자 대회 예선) https://softeer.ai/practice/6269 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 소프티어 레벨2 문제.그냥 암호가 유저 입력문 내에 존재하는지 확인하는 문제이다.처음에 문자열 split하지 않고 indexOf로 체크했더니테케는 다 맞는데 제출해보니 빵점 ㅎ.ㅎ꼼수 부리지 말기 .... const fs = require('fs');const input = fs.readFileSync(0,'utf-8').trim().split('\n');let [m,n,k] = input[0].split(' ').map(Number);let secret = input[1].split(' ').map(Number);let user = input[2].split(' ').map.. 2025. 2. 4. [Javascript(NodeJS)/Softeer] Lv2. 나무 공격 https://softeer.ai/app/assessment/index.html?xid=360381&xsrfToken=QV4cxFzvvgvVE8CD4lBjnaTFrjK27ULG&testType=practice Candidate | Softeer Assessment UI softeer.ai js 코테 준비중문자열 처리 같은게 낯설어서 손에 안 익히긴 하는데, 막상 써보면 또 간편한 것 같기도 하다.코테 메인언어 JS로 하는 사람들 존경ㅠㅠ 소프티어 레벨2 문제인데, 특수 알고리즘 필요 없고문자열 처리 이외에는 쉬웠음정답률도 높은 문제! const fs = require('fs');const input = fs.readFileSync(0, 'utf-8').trim().split('\n');// console.. 2025. 2. 4. [C++/PGS] Lv.0 : 등수 매기기 https://school.programmers.co.kr/learn/courses/30/lessons/120882# 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 프로그래머스 - 등수 매기기 문제 평균 연산 과정에서 나눗셈이 들어가는데소숫점까지 보고 순위를 구해야 해서int 대신 double로 평균을 구해야 한다!!! 나의 풀이#include #include #include #include #include using namespace std;vector solution(vector> score) { vector answer; vector avg; vector sorted_avg;.. 2025. 1. 13. [C++/BOJ] 2164 : 카드2 (Queue) https://www.acmicpc.net/problem/2164 백준 실버4큐로 풀어야 한다놓치기 쉬운 조건 -> 1을 입력할 때, 0이 아닌 1이 나와야 함. (큐에 최소 1개는 남아야 한다) 나의 풀이#include#include#includeusing namespace std;int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n = 0; int answer = 0; queue q; cin >> n; for (int i = 1; i 2024. 11. 17. [C++/BOJ] 2493 : 탑 (Stack) https://www.acmicpc.net/problem/2493 백준 골드5쉽다고 생각하면서 2중반복문으로 썼는데.. 시간초과 ㅋㅋ스택을 사용해서 낮은 건 pop하고, 수신 탑만 남겨두어야 한다 나의 풀이#include#include#include using namespace std;int main() // 이중반복문 쓰면 시간초과남{ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; int height; stack> st; // 인덱스, 높이 cin >> n; for (int i = 1; i > height; while(!st.empty()){ if(st.top().second 2024. 11. 17. [C++/BOJ] 11660 : 구간 합 구하기 5 (DP) https://www.acmicpc.net/problem/11660 백준 실버1그냥 풀었다가 시간초과나길래 뭐지 싶었는데.. dp 문제였다 ㅜㅜindex 0부터 시작하면 이것저것 귀찮기 때문에 index 1부터 입력을 받으면 편하다 나의 풀이#include#includeusing namespace std;int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; int m; int num; int dp[1025][1025] = {0,}; int x1; int x2; int y1; int y2; cin >> n >> m; for (int i = 1; i > num; dp[i][j] = dp[i - 1][j] + dp[i.. 2024. 11. 17. 이전 1 ··· 3 4 5 6 7 8 9 다음 728x90 반응형