Skip to content

Commit

Permalink
이슈 #329에서 솔루션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 19, 2024
1 parent d0bd690 commit c7de207
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Programmers/삼각형의_완성조건_1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int solution(vector<int> sides) {
sort(sides.begin(), sides.end());

return sides[0] + sides[1] > sides[2] ? 1 : 2;
}

0 comments on commit c7de207

Please sign in to comment.