문자열3 AtCoder ABC 276 풀이 https://atcoder.jp/contests/abc276 AtCoder Beginner Contest 276 - AtCoder AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online. atcoder.jp D, F가 재밌었던 셋입니다. A. 알파벳 \(a\)가 등장하는 마지막 인덱스를 찾아주면 됩니다. #include using namespace std; int main() { ios::sync_with_stdio(0), cin.tie(0); string s; cin >> s; int ans = -1; for (int i = 0; i < s.si.. 2023. 3. 25. AtCoder ABC 244 풀이 https://atcoder.jp/contests/abc244/tasks Tasks - AtCoder Beginner Contest 244 AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online. atcoder.jp A. 마지막 글자를 출력해줍시다. #include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(0), cin.tie(0); int n; string s; cin >> n >> s; cout n; string s; cin >> s; int x = .. 2022. 9. 25. 백준 23878 / C++ https://www.acmicpc.net/problem/23878 23878번: Lonely Photo Farmer John has recently acquired $N$ new cows $(3 \le N \le 5 \times 10^5)$, each of whose breed is either Guernsey or Holstein. The cows are currently standing in a line, and Farmer John wants take a photo of every sequence of three or more consecutive c www.acmicpc.net [ 풀이 ] 아이디어는 쉽습니다. 연속된 G끼리, H끼리 묶어서 개수를 구해줍니다. 우선 연속된 G를 기준으로 세봅시다.. 2022. 8. 23. 이전 1 다음