結果
問題 |
No.342 一番ワロタww
|
ユーザー |
|
提出日時 | 2017-12-12 16:15:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 690 bytes |
コンパイル時間 | 1,675 ms |
コンパイル使用メモリ | 163,836 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-14 05:04:36 |
合計ジャッジ時間 | 2,426 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; vector<string> G[101]; int main(void) { string s; cin >> s; int sz = s.size(); int l = 0, r = 0; while (l < sz && s.substr(l, 3) == "w") l += 3, r += 3; while (l < sz) { string t = ""; while (l < sz && s.substr(l, 3) != "w") t += s.substr(l, 3), l += 3, r += 3; while (r < sz && s.substr(r, 3) == "w") r += 3; G[(r - l) / 3].push_back(t); l = r; } bool flag = true; for (int i = 100; i >= 0; i--) { if (!G[i].size()) continue; for (int j = 0; j < G[i].size(); j++) { cout << G[i][j] << endl; } flag = false; break; } if (flag) cout << "" << endl; return 0; }