結果

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

ソースコード

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 < str.length() - 1; i++){
		if(str[i] == 'x' && str[i + 1] == 'o'){
			ans.push_back(i + 2);
		}
	}
	cout << ans.size() << endl;
	for(int i = 0; i < ans.size(); i++){
		cout << ans[i] << " ";
	}
	return 0;
}
0