코딩테스트 공부 2025 Start/1주차 (구현)6 1159) 농구 경기 (문자열) 출처 https://www.acmicpc.net/problem/1159 내 풀이 더보기더보기#include#include#includeusing namespace std;int N;vector player(26, 0);string result = "";int main(){ cin >> N; for (int i = 0; i > name; player[name[0] - 'a']++; if(player[name[0]-'a'] == 5) { result += name[0]; } } sort(result.begin(), result.end()); if (result.empty()) cout 느낀점 스무스.. 2025. 3. 30. 10988) 팰린드롬인지 확인하기 (reverse, 투포인터) 출처 https://www.acmicpc.net/problem/10988 내 풀이 Reverse더보기#include #include using namespace std; string A, B = ""; int main() { cin >> B; A = B; reverse(B.begin(), B.end()); if (A == B) cout else cout }투포인터 더보기#include #include using namespace std; // 투포인터 방식 int main() { string str; cin >> str; int left = 0; int right = str.size() - 1; while(left { if (str[left] != str[right]) { cout return 0;.. 2025. 3. 30. 이전 1 2 다음