結果
問題 |
No.2773 Wake up Record 1
|
ユーザー |
![]() |
提出日時 | 2024-06-07 22:01:58 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 841 bytes |
コンパイル時間 | 4,386 ms |
コンパイル使用メモリ | 276,936 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 08:03:47 |
合計ジャッジ時間 | 5,693 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 21 WA * 1 |
ソースコード
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #include <atcoder/dsu> #include <atcoder/segtree> using namespace atcoder; using namespace std; typedef long long ll; typedef pair<ll,ll> pi; #define ALL(x) x.begin(),x.end() #define rep(i,a,b) for(int i=a;i<b;i++) #define BS(A,x) binary_search(ALL(A),x) #define LB(A,x) (ll)(lower_bound(ALL(A),x)-A.begin()) #define UB(A,x) (ll)(upper_bound(ALL(A),x)-A.begin()) #define COU(A,x) (UB(A,x)-LB(A,x)) using vi = vector<int>; using vvi = vector<vi>; using li =vector<ll>; using lli=vector<li>; using si =vector<char>; using ssi =vector<si>; const long long INF = 1e18; const long long MOD=1e9+7; //for (auto [key, val] : mp) int main() { int n;string s;cin>>n>>s;vi ans; rep(i,1,n){ if(s[i-1]=='x'&&s[i]=='o')ans.push_back(i+1); }int m=ans.size(); cout<<m<<endl; rep(i,0,m)cout<<ans[i]<<" "; }