結果

問題 No.1643 Not Substring
ユーザー okkuukenken
提出日時 2022-07-19 12:53:54
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 444 bytes
コンパイル時間 1,423 ms
コンパイル使用メモリ 131,016 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-01 14:54:26
合計ジャッジ時間 2,518 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<iomanip>
#include<numeric>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<random>
using namespace std;
typedef long long ll;
const int mod=1e9+7;
int main(){
	string s;
	cin>>s;
	int ans=0,tmp=0;
	for(auto x:s){
		if(x=='a')
			tmp++;
		else
			tmp=0;
		ans=max(ans,tmp);
	}
	cout<<string(ans+1,'a')<<endl;
}
0