結果
| 問題 |
No.1592 Tenkei 90
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-09 21:57:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 2,572 bytes |
| コンパイル時間 | 1,154 ms |
| コンパイル使用メモリ | 110,720 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-01 16:13:47 |
| 合計ジャッジ時間 | 1,937 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
#include <iostream>
#include <stdio.h>
#include <vector>
#include <map>
#include <stack>
#include <cstring>
#include <set>
#include <utility>
#include <iostream>
#include <iomanip>
#include <list>
#include <queue>
#include <algorithm>
#include <cmath>
#include <bitset>
#include <cassert>
#include <numeric>
#include <complex>
#define FOR(i,a,b) for (ll i=(a);i<(ll)(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define SUM(v) accumulate(ALL(v),0ll)
using ll = long long;
const ll INF=1e18;
const ll eps=1;
const double pi=3.14159265359;
const ll mod=1e9+1;
using namespace std;
struct UnionFind {
vector<int> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2
UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
for(int i = 0; i < N; i++) par[i] = i;
}
int root(int x) { // データxが属する木の根を再帰で得る:root(x) = {xの木の根}
if (par[x] == x) return x;
return par[x] = root(par[x]);
}
void unite(int x, int y) { // xとyの木を併合
int rx = root(x); //xの根をrx
int ry = root(y); //yの根をry
if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時:xの根rxをyの根ryにつける
}
bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
int rx = root(x);
int ry = root(y);
return rx == ry;
}
};
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
//------------------------------------------------------------------------
string eight_to_ten(string a)
{
ll ans;
string ten;
ll cnt=1;
ll tmp=1;
REP(i,a.size())
{
tmp+=tmp*8+(a[i]-'0');
}
ten=to_string(tmp);
reverse(ten.begin(),ten.end());
return ten;
}
string ten_to_nine(string a)
{
string ans;
ll cnt=stoll(a);
while(cnt>0)
{
ll tmp=cnt%9;
ans=to_string(tmp%9)+ans;
cnt/=9;
}
reverse(ans.begin(),ans.end());
return ans;
}
int main()
{
string s;
cin>>s;
map<char,int> mp;
mp['k']++;
mp['y']++;
mp['o']++;
mp['p']++;
mp['r']++;
mp['o']++;
mp['t']++;
mp['e']++;
mp['n']++;
mp['k']++;
mp['e']++;
mp['i']++;
mp['9']++;
mp['0']++;
int len=s.size();
bool ok=true;
REP(i,len)
{
if(mp[s[i]]<=0)
{
ok=false;
}
mp[s[i]]--;
}
if(ok==true)
{
cout<<"Yes"<<endl;
}
else cout<<"No"<<endl;
return 0;
}