結果

問題 No.1367 文字列門松
ユーザー 👑 PCTprobabilityPCTprobability
提出日時 2021-01-29 21:26:06
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,356 bytes
コンパイル時間 2,113 ms
コンパイル使用メモリ 199,444 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-09 14:40:32
合計ジャッジ時間 2,918 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 1 ms
4,380 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 WA -
testcase_25 AC 1 ms
4,380 KB
testcase_26 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
using ll = long long;
using ld = long double;
#define all(s) (s).begin(),(s).end()
#define vcin(n) for(ll i=0;i<ll(n.size());i++) cin>>n[i]
#define rever(vec) reverse(vec.begin(), vec.end())
#define sor(vec) sort(vec.begin(), vec.end())
#define fi first
#define se second
#define SIZE(n) int(n.size())
#define P pair<ll,ll>
//const ll mod = 998244353;
const ll mod = 1000000007;
const ll inf = 2000000000000000000ll;
static const long double pi = 3.141592653589793;
template<class T,class U> void chmax(T& t,const U& u){if(t<u) t=u;}
template<class T,class U> void chmin(T& t,const U& u){if(t>u) t=u;}
ll modPow(ll a, ll n, ll modulo) { ll ret = 1; ll p = a % modulo; while (n) { if (n & 1) ret = ret * p % modulo; p = p * p % modulo; n >>= 1; } return ret; }
bool check(ll a,ll b,ll c){
  if((a-b)*(c-b)>0&&a!=c&&b!=c&&a!=b){
    return true;
  }
  return false;
}
int main() {
  /* mod は 1e9+7 */
  ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
  cout<< fixed << setprecision(10);
  string s="kadomatu";
  string a;
  cin>>a;
  ll t=0;
  for(int i=0;i<int(s.size());i++){
    if(s[i]==a[t]){
      t++;
    }
    if(t==int(a.size())){
      break;
    }
  }
  if(t==int(a.size())){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}
0