結果
問題 |
No.1005 BOT対策
|
ユーザー |
![]() |
提出日時 | 2020-03-07 03:24:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 1,532 ms |
コンパイル使用メモリ | 166,096 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-14 11:07:33 |
合計ジャッジ時間 | 5,134 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 TLE * 1 -- * 17 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; if (T.size() == 1 && (int)S.find(T) != -1) return cout << -1 << "\n", 0; int ans = 0, t = T.size(); while ((int)S.find(T) > -1) S.insert(S.find(T) + (t / 2 + 1), "."), ans++; cout << ans << "\n"; }