結果

問題 No.2773 Wake up Record 1
ユーザー bugAboo
提出日時 2024-08-15 15:42:58
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 1,915 ms
コンパイル使用メモリ 196,236 KB
最終ジャッジ日時 2025-02-23 22:45:36
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
#define rep(i, n) for(int i = 0; i < n; i++)

int main() {
	int N;
	string s;
	cin >> N >> s;
	vector<int> ans;
	rep(i, N) {
		if(i == 0) continue;
		if(s[i - 1] == 'x' && s[i] == 'o') ans.push_back(i + 1);
	}
	int sz = ans.size();
	cout << sz << endl;
	rep(i, sz) cout << ans[i] << " ";
	cout << endl;
}

0