https://algospot.com/judge/problem/read/LECTURE
<결과>
<코드>
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main(void) { int num_cases = 0; cin >> num_cases; for (int i = 0; i < num_cases; ++i) { vector<string> vec_string; string in_str, str_result; cin >> in_str; int half_size = in_str.length() / 2; for (int j = 0; j < half_size; ++j) { vec_string.push_back(in_str.substr(j * 2, 2)); } sort(vec_string.begin(), vec_string.end()); for (int j = 0; j < vec_string.size(); ++j) { str_result += vec_string[j]; } cout << str_result << endl; vec_string.clear(); } return 0; }
'Programming > Judge' 카테고리의 다른 글
Algospot : ENCRYPT (0) | 2014.12.15 |
---|---|
ACMICPC 1003 : 피보나치 함수 (0) | 2014.12.15 |
ACMICPC 1008 : A/B (0) | 2014.12.15 |
ACMICPC 1205 : 등수 구하기 (0) | 2014.12.13 |
ACMICPC 1002 : 터렛 (0) | 2014.12.12 |
ACMICPC 1000 : A+B (0) | 2014.12.12 |
Algospot : LECTURE (0) | 2014.12.12 |
Algospot : DRAWRECT (0) | 2014.12.11 |
Algospot : ENDIANS (0) | 2014.12.11 |
Algospot : MERCY (0) | 2014.12.11 |
Algospot : Hello World! (0) | 2014.12.11 |