結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-27 19:00:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 837 bytes |
| コンパイル時間 | 1,741 ms |
| コンパイル使用メモリ | 172,560 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 12:17:32 |
| 合計ジャッジ時間 | 2,464 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 3 WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
signed main(){
wstring_convert< codecvt_utf8_utf16< char16_t >, char16_t > converter;
string s; cin >> s;
u16string us = converter.from_bytes( s );
vector< int > st;
int wcnt = 0, curwcnt = 0, head = -1, ptr = 0;
for( auto ch : us ){
if( ch == u'w' ){
++curwcnt;
}
else{
if( curwcnt ){
if( wcnt < curwcnt )
wcnt = curwcnt,
st.clear(),
st.emplace_back( head );
else if( wcnt == curwcnt )
st.emplace_back( head );
curwcnt = 0;
head = ptr;
}
}
++ptr;
}
for( int i = 0; i < st.size(); ++i ){
int p = 0;
for( auto ch : us ){
if( ch == u'w' )
break;
if( p >= st[ i ] )
cout << ch;
++p;
}
cout << endl;
}
return 0;
}