結果

問題 No.2773 Wake up Record 1
ユーザー baohuy11baohuy11
提出日時 2024-06-07 22:12:54
言語 C++23(gcc13)
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 4,974 ms
コンパイル使用メモリ 274,956 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-07 22:13:00
合計ジャッジ時間 3,783 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 5 ms
6,940 KB
testcase_08 WA -
testcase_09 AC 3 ms
6,944 KB
testcase_10 AC 3 ms
6,940 KB
testcase_11 AC 5 ms
6,944 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 5 ms
6,940 KB
testcase_17 WA -
testcase_18 AC 3 ms
6,940 KB
testcase_19 AC 5 ms
6,944 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 5 ms
6,944 KB
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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