전체 글128 [프로그래머스] 42586번 기능개발 C++ 문제 링크 : https://school.programmers.co.kr/learn/courses/30/lessons/42586 맞힌 코드#include using namespace std;vector solution(vector progresses, vector speeds) { vector answer; queue days; // 각 작업을 완료하기까지 걸리는 일 수 for (int i=0; i 2025. 2. 9. [백준/BOJ] 16967번 배열 복원하기 C++ 문제 링크 : https://www.acmicpc.net/problem/16967 맞힌 코드#include using namespace std;int main(){ int h, w, x, y; cin >> h >> w >> x >> y; vector> a(h, vector(w)); vector> b(h+x, vector(w+y)); for (int i=0; i> b[i][j]; } } for (int i=0; i=x && j>=y){ a[i][j] = b[i][j] - a[i-x][j-y]; } else{ a[i][j] = b[i][j.. 2025. 2. 5. [논문 리뷰] InstructPix2Pix: Learning to Follow Image Editing Instructions InstructPix2PixAbstract∘ image와 instruction(ex. "Swap sunflowers with roses") 입력→ edited image∘ language model(GPT-3)과 text-to-image model(Stable Diffusion)로 생성한 image editing example dataset으로 학습∘ edit에 걸리는 시간이 짧음 - forward pass에서 edit 진행 - example마다 이루어지는 fine-tuning, inversion이 없음 1. Introduction ∘ 생성 모델이 사람이 작성한 image editing instruction을 따르도록 학습시키는 방법에 관한 연구∘ 서로 다른 modality를 가진 LLM(GPT-3).. 2025. 1. 28. [백준/BOJ] 14503번 로봇 청소기 C++ 문제 링크 : https://www.acmicpc.net/problem/14503 맞힌 코드#include using namespace std;int n, m;int r, c, d;vector> room;vector> visited;int dx[] = {-1, 0, 1, 0};int dy[] = {0, 1, 0, -1};int turnLeft(int d){ return (d+3) % 4;}int cleanUp(){ int cnt = 0; while(true){ if(!visited[r][c]){ visited[r][c] = true; cnt ++; } bool notCleaned = fals.. 2025. 1. 26. [백준/BOJ] 14888번 연산자 끼워넣기 C++ 문제 링크 : https://www.acmicpc.net/problem/14888 맞힌 코드#include using namespace std;int n;vector numbers;vector operators(4); int maxValue = -1000000000;int minValue = 1000000000;void dfs(int idx, int now){ int next; if(idx == n){ maxValue = max(maxValue, now); minValue = min(minValue, now); return; } for(int i=0; i0){ operators[i]--; .. 2025. 1. 26. [백준/BOJ] 25757번 임스와 함께하는 미니게임 C++ 문제 링크 : https://www.acmicpc.net/problem/25757 메모- 각 게임의 참여 인원 수를 문제에서 제시해줬는데, 내 마음대로 이 수보다 인원 수가 적으면 게임에 참여할 수 있다고 생각했음. 그래서 모든 사람들이 게임에 참여할 수 있도록, 즉 나머지가 생기지 않도록 게임을 많이 시행해야 한다고 생각하고 코드를 짰음.- vector에 이름들 다 입력 받고 중복되는 거 없애려 했는데 아예 unordered_set으로 둬서 중복 없는 배열? 만드는 방법이 있었음. 어떤 게 나은지는. 코테 강의 자료에 나와있는 코드는 다음과 같음.auto it = unique(v.begin(), v.end()); cout 이렇게 되는데 우리가 예상하는 중복이 제거된 배열을 얻기 위해서는 sort 함수를.. 2025. 1. 23. [백준/BOJ] 2164번 카드2 C++ 문제 링크 : https://www.acmicpc.net/problem/2164 맞힌 코드#include using namespace std;int n;int main(void){ cin >> n; queue q; for (int i=0; i 2024. 11. 20. [프로그래머스] 42842번 카펫 C++ 문제 링크 : https://school.programmers.co.kr/learn/courses/30/lessons/42842?language=cpp 메모- sqrt() https://blockdmask.tistory.com/307 [C언어/C++] pow, sqrt 함수에 대해서(루트함수, 제곱, 제곱근)안녕하세요. BlockDMask 입니다 오늘은 (저는) 자주 쓰지는 않지만 꼭 알아둬야하는 함수를 두개 묶어서 가지고왔습니다. 바로 pow, sqrt 함수인데요. 중학교때 제곱과 제곱근(루트) 배우셨죠? 그걸이blockdmask.tistory.com 풀이- yellow의 세로 길이를 i로 하는 for문. yellow를 i로 나누어 떨어지는 경우 i와 yellow/i가 노란색 부분의 세로, 가로 길이.. 2024. 11. 13. 이전 1 2 3 4 ··· 16 다음