結果
| 問題 | No.2773 Wake up Record 1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-08 14:29:00 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 387 bytes |
| 記録 | |
| コンパイル時間 | 1,177 ms |
| コンパイル使用メモリ | 182,356 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-02 09:07:39 |
| 合計ジャッジ時間 | 2,976 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int N;
cin >> N;
string S;
cin >> S;
vector<int> ans;
rep(i, N-1) {
int k = i+1;
if (S[k-1] == 'x' && S[k] == 'o')
ans.push_back(k+1);
}
cout << ans.size() << endl;
rep(i, ans.size())
cout << ans[i] << " ";
cout << endl;
return 0;
}