結果

問題 No.2773 Wake up Record 1
ユーザー Makuro_rinn
提出日時 2024-06-13 12:09:07
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 395 bytes
コンパイル時間 1,886 ms
コンパイル使用メモリ 174,036 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-13 12:09:11
合計ジャッジ時間 3,706 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 1 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;


int main() {
    int N;
    int k=0;
    cin >> N;
    vector<char> s(N+100);
    s.at(0)='x';
    set<int> t;
    for(int i=1; i<N+1; i++){
      cin >> s.at(i);
      if(s.at(i-1)=='x' && s.at(i)=='o'){
        k++;
        t.insert(i);
      }
    }
    cout << k << endl;
    for(auto p: t){
      cout << p << " ";
      cout << endl;
    }
}
0