테스트 케이스는 통과하는데 채점에서는 시간초과 오류가 발생한다. dfs를 먼저 떠올렸는데 여기서 사용하기에는 적당한 방법이 아닌가보다. #include #include #include using namespace std; int visit[100000]; vector v; vector v3; vector v2; string temp=""; bool Standard(string A, string B) { if (A + B > B + A) return true; return false; } void dfs(vector n ,int count){ if(n.size() == count){ // 벡터 사이즈만큼 temp에 순열을 붙인 문자열을 만들게 됐을때 for(int i=0;i