結果
| 問題 | 
                            No.558 575検出するやつ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             かに
                         | 
                    
| 提出日時 | 2017-11-27 00:36:17 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 694 bytes | 
| コンパイル時間 | 1,884 ms | 
| コンパイル使用メモリ | 193,824 KB | 
| 最終ジャッジ日時 | 2025-01-05 04:29:13 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 14 WA * 1 | 
ソースコード
#include "bits/stdc++.h"
#define rep(a,b) for(int a = 0;a < b;a++)
#define REP(i, x, n) for(int i = x; i < n; i++)
#define P(a) cout << a << endl
#define MP(a,b) make_pair(a,b)
#define PB(a) push_back(a)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
int dx[] = { 1, -1 , 0 , 0 };
int dy[] = { 0,  0,  1, -1 };
ll MOD = 1000000007;
void solve() {
    string s;
    cin >> s;
    if(s.length() < 3){
        P("NO");
        return;
    }
    rep(i,s.length()-3){
        string sub = s.substr(i,3);
        if(sub == "575") {
            P("YES");
            return;
        }
    }
    P("NO");
}
int main() {
    solve();
    return 0;
}
            
            
            
        
            
かに