結果
問題 | No.558 575検出するやつ |
ユーザー |
![]() |
提出日時 | 2017-08-25 23:02:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,259 bytes |
コンパイル時間 | 1,609 ms |
コンパイル使用メモリ | 166,796 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 16:08:42 |
合計ジャッジ時間 | 2,264 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 15 |
ソースコード
#include<bits/stdc++.h>#define rep(i,a,b) for(int i=a;i<b;i++)#define rrep(i,a,b) for(int i=a;i>=b;i--)#define fore(i,a) for(auto &i:a)#pragma GCC optimize ("-O3")using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }//---------------------------------------------------------------------------------------------------/*---------------------------------------------------------------------------------------------------∧_∧∧_∧ (´<_` ) Welcome to My Coding Space!( ´_ゝ`) / ⌒i/ \ | |/ / ̄ ̄ ̄ ̄/ |__(__ニつ/ _/ .| .|____\/____/ (u ⊃---------------------------------------------------------------------------------------------------*/string S;string solve() {int N = S.length();rep(i, 0, N - 2) {string s = S.substr(i, 3);if (s == "575") return "YES";}return "NO";}//---------------------------------------------------------------------------------------------------void _main() {cin >> S;cout << solve() << endl;}