結果
| 問題 |
No.8061 uxs hxixtya pyuyn ixc hyixa kxuyn
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-01 22:43:50 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 556 bytes |
| コンパイル時間 | 1,647 ms |
| コンパイル使用メモリ | 173,696 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-27 12:02:34 |
| 合計ジャッジ時間 | 2,450 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
int main(){
string s;getline(cin,s);
for(int l=0;l<s.size();l++){
for(int r=l+2;r<=s.size();r++){
set<char>del;
for(int i=0;i<l;i++)del.insert(s[i]);
for(int i=l+1;i<r;i+=2)del.insert(s[i]);
for(int i=r;i<s.size();i++)del.insert(s[i]);
del.erase(' ');
bool ok=true;
for(int i=l;i<r;i+=2){
if(s[i]==' '||del.count(s[i])){
ok=false;break;
}
}
if(ok){
puts("Yes");
return 0;
}
}
}
puts("NO");
}