結果
| 問題 |
No.2773 Wake up Record 1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-07 22:01:27 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 416 bytes |
| コンパイル時間 | 2,824 ms |
| コンパイル使用メモリ | 251,100 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-26 08:03:00 |
| 合計ジャッジ時間 | 3,780 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 21 WA * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
int main(){
int n;
cin >> n;
string S;
cin >> S;
vector<int> a;
int count=0;
for(int i=1;i<n;i++){
if(S.at(i)=='o' and S.at(i-1)=='x'){
count++;
a.push_back(i+1);
}
}
cout << count << endl;
sort(a.begin(),a.end());
rep(i,a.size()){
if(i+1==a.size())cout << a[i] << endl;
else cout << a[i] << " ";
}
}