結果
| 問題 | No.342 一番ワロタww |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-14 22:46:08 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 755 bytes |
| 記録 | |
| コンパイル時間 | 1,266 ms |
| コンパイル使用メモリ | 217,408 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-07 16:43:30 |
| 合計ジャッジ時間 | 2,240 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin>>s;
int n=s.size();
vector<string> ss;
vector<int> w;
int i=0;
while (s.substr(i,3)=="w") i+=3;
while (i<n) {
string t;
while (i<n&&s.substr(i,3)!="w") {
t+=s.substr(i,3);
i+=3;
}
ss.push_back(t);
int cnt=0;
while (i<n&&s.substr(i,3)=="w") {
cnt++;
i+=3;
}
w.push_back(cnt);
}
int mx=0;
for (int x:w) mx=max(mx,x);
if (mx==0) {
cout<<endl;
return 0;
}
for (int i=0;i<w.size();i++) {
if (w[i]==mx) {
cout<<ss[i]<<endl;
}
}
return 0;
}