結果

問題 No.2773 Wake up Record 1
ユーザー forest3
提出日時 2024-07-04 14:02:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 1,694 ms
コンパイル使用メモリ 170,500 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-04 14:03:02
合計ジャッジ時間 2,868 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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