結果
問題 |
No.1313 N言っちゃダメゲーム (4)
|
ユーザー |
![]() |
提出日時 | 2020-12-10 00:22:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 230 bytes |
コンパイル時間 | 2,204 ms |
コンパイル使用メモリ | 193,268 KB |
最終ジャッジ日時 | 2025-01-16 21:02:24 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 8 WA * 27 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int N,K; cin>>N>>K; string S; cin>>S; int last=N; S="0"+S; for(int i=N-1;i>=0;i--){ if(last-i>K&&S[i]=='o') last=i; } cout<<last<<endl; }