結果
問題 |
No.8061 uxs hxixtya pyuyn ixc hyixa kxuyn
|
ユーザー |
|
提出日時 | 2020-04-01 22:50:27 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 805 bytes |
コンパイル時間 | 1,816 ms |
コンパイル使用メモリ | 157,956 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-27 12:10:22 |
合計ジャッジ時間 | 2,608 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 2 |
other | AC * 9 WA * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:28:8: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 28 | fgets(s, 105, stdin); | ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h> #include <string> #define ft first #define sc second #define pt(sth) cout << sth << "\n" #define chmax(a, b) (a)=max(a, b) #define chmin(a, b) (a)=min(a, b) #define moC(a, s, b) (a)=((a)s(b)+MOD)%MOD using namespace std; typedef long long ll; typedef pair<ll, ll> pll; static const ll INF=1e18; static const ll MAX=101010; static const ll MOD=1e9+7; /* for(i=0; i<N; i++) cin >> a[i]; */ int main(void) { ll i, j, k; char s[111]; fgets(s, 105, stdin); ll e[26]={}; ll N=strlen(s); for(i=1; i<N; i+=2) { e[s[i]-'a']=1; } ll f[111]; memset(f, 1, sizeof(f)); for(i=0; i<N; i++) { if(e[s[i]-'a']) f[i]=0; if(s[i]==' ') f[i]=0; } ll cnt=0; for(i=0; i<N; i++) cnt+=f[i]; if(cnt>=2) pt("Yes"); else pt("No"); }