結果

問題 No.2773 Wake up Record 1
ユーザー baohuy11
提出日時 2024-06-08 07:10:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 2,200 ms
コンパイル使用メモリ 168,588 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-27 05:02:47
合計ジャッジ時間 3,006 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
	int s; cin >> s;
	string str; cin >> str;
	vector<int> ans;
	for(int i = 0; i < s - 1; i++){
		if(str[i] == 'x' && str[i + 1] == 'o') ans.push_back(i + 2);
	}
	cout << ans.size() << endl;
	for(auto x : ans) cout << x << " ";
	cout << endl;
	return 0;
}
0