結果
問題 |
No.1005 BOT対策
|
ユーザー |
![]() |
提出日時 | 2020-03-07 03:28:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 9 ms / 2,000 ms |
コード長 | 291 bytes |
コンパイル時間 | 1,606 ms |
コンパイル使用メモリ | 160,040 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-06-20 00:49:54 |
合計ジャッジ時間 | 2,016 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#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 - 1, "."), ans++; cout << ans << "\n"; }