結果

問題 No.2773 Wake up Record 1
ユーザー daiota
提出日時 2024-06-07 21:29:18
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 6 ms / 2,000 ms
コード長 512 bytes
コンパイル時間 1,906 ms
コンパイル使用メモリ 168,832 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-26 07:02:58
合計ジャッジ時間 3,028 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> P;
#define REP(i,n) for(int i=0;i<int(n);i++)





int main(){
	cin.tie(nullptr);  ios_base::sync_with_stdio(false);
    int i,j,k;


    int N;
    string S;
    cin >> N >> S;

    string T="x";
    T+=S;

    vector<int> v;
    for(i=1;i<=N;i++){
    	if(T[i-1]=='x' && T[i]=='o') v.push_back(i);
    }


    cout << (int)v.size() << endl;
    REP(i,v.size()) cout << v[i] << ' ';
    cout << endl;




	return 0;

}
0