Skip to content

Instantly share code, notes, and snippets.

@DongguemYoo
Created April 30, 2020 04:29
Show Gist options
  • Save DongguemYoo/fa29ff3ddb878dd9c4ff03275f8cba05 to your computer and use it in GitHub Desktop.
Save DongguemYoo/fa29ff3ddb878dd9c4ff03275f8cba05 to your computer and use it in GitHub Desktop.
코딩테스트 같은 숫자는 싫어
#include <vector>
#include <iostream>
using namespace std;
vector<int> solution(vector<int> arr)
{
vector<int> answer;
// [실행] 버튼을 누르면 출력 값을 볼 수 있습니다.
cout << "Hello Cpp" << endl;
for(int i =0;i<arr.size();i++)
{
if(arr[i]!=arr[i+1])
{
answer.push_back(arr[i]);
}
}
// 리얼 10초만에 풀엇다..
return answer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment