結果
問題 |
No.1643 Not Substring
|
ユーザー |
![]() |
提出日時 | 2021-08-13 21:29:43 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 480 bytes |
コンパイル時間 | 3,595 ms |
コンパイル使用メモリ | 251,532 KB |
最終ジャッジ日時 | 2025-01-23 18:15:52 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 WA * 17 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) int main(){ string s; cin>>s; string temp=""; rep(i,s.size()+2){ //cout<<i<<" "<<temp<<endl; temp+="a"; int flag=1; rep(j,s.size()-i){ if(s.substr(j,i+1)==temp){ flag=0; break; } } if(flag){ cout<<temp<<endl; return 0; } } return 0; }