結果
問題 |
No.342 一番ワロタww
|
ユーザー |
![]() |
提出日時 | 2016-08-20 15:44:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 791 bytes |
コンパイル時間 | 1,146 ms |
コンパイル使用メモリ | 84,000 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-07 21:34:48 |
合計ジャッジ時間 | 1,849 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 3 WA * 11 |
ソースコード
#include <iostream> #include <fstream> #include <vector> #include <cstring> #include <string> #include <algorithm> #include <iomanip> using namespace std; typedef pair<int, string> P; int main() { cin.tie(0); ios::sync_with_stdio(false); vector<P> v; string s; cin >> s; int n = s.size(), p = 0; while(p < n && s[p] == -126 && s[p + 1] == -105) p += 2; int m = 0; while(p < n) { string t; while(p < n && !(s[p] == -126 && s[p + 1] == -105)) { t += s[p]; t += s[p + 1]; p += 2; } int wc = 0; while(p < n && s[p] == -126 && s[p + 1] == -105) { wc++; p += 2; } m = max(m, wc); v.emplace_back(wc, t); } if(v.size() == 0 || m == 0) { cout << endl; } else { for(P val : v) { if(m == val.first) { cout << val.second << endl; } } } }