본문 바로가기

반응형

전체 글

(168)
전화번호 목록 12345678910111213141516171819202122232425262728#include #include #include #include using namespace std; bool solution(vector phone_book) { if(phone_book.size() == 1) return true; int size = phone_book.size(); for(int i = 0; i
2 x n 타일링 12345678910111213141516#include #include using namespace std; int solution(int n) { int i, tale[60000]; tale[0] = 0; tale[1] = 1; tale[2] = 2; for(i = 3; i
프린터 12345678910111213141516171819202122232425262728293031#include #include using namespace std; int solution(vector priorities, int location) { int answer = 0; int size = priorities.size(); vector temp; for(int i = 0; i
H-Index 1234567891011121314151617181920212223242526#include #include #include using namespace std; int solution(vector citations) { int size = citations.size(); int zeroCount = 0; for(int i = 0; i = 0; i--) { int inclu = 0; for(int j = 0; j
쇠막대기 12345678910111213141516171819202122232425#include #include using namespace std; long solution(string arrangement) { long answer = 0; long lineCount = 0; for(int i = 0; i Int { let letters = arrangement.map() {String($0)} let length = letters.count var lineCount: Int = 0 var answer: Int = 0 for i in 0..
Hackerrank - Taum and B'day 1234567891011long taumBday(long b, long w, long bc, long wc, long z) { long result; if(bc + z
기능개발 123456789101112131415161718192021222324252627282930#include #include using namespace std; vector solution(vector progresses, vector speeds) { vector answer; vector temp; for(int i = 0; i
모의고사 1234567891011121314151617181920212223242526272829303132333435#include #include using namespace std; int sA[] = {1,2,3,4,5};int sB[] = {2,1,2,3,2,4,2,5};int sC[] = {3,3,1,1,2,2,4,4,5,5}; vector solution(vector answers) { vector answer; int nAnswers[3] = {0,}; for(int i = 0; i