結果

問題 No.342 一番ワロタww
ユーザー femtofemto
提出日時 2016-08-20 16:02:54
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 791 bytes
コンパイル時間 772 ms
コンパイル使用メモリ 75,860 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-25 10:52:44
合計ジャッジ時間 1,182 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
			}
		}
	}
}
0