###### tags: `(Zero Judge)` # b523. 先別管這個了,你聽過安麗嗎? ### 原cin40% ```clike= #include<bits/stdc++.h> using namespace std; int main() { int b,i; vector<string> word; string a; while(cin>>a) { b=0; word.push_back(a); for(i=0;i<word.size()-1;i++) { if(a==word.at(i)) { b=1; } } if(b==0) cout<<"NO"<<endl; else cout<<"YES"<<endl; } } ``` ### getline(x,y) 100% ```clike= #include<bits/stdc++.h> using namespace std; int main() { int b,i; vector<string> word; string a; while(getline(cin,a)) { b=0; word.push_back(a); for(i=0;i<word.size()-1;i++) { if(a==word.at(i)) { b=1; } } if(b==0) cout<<"NO"<<endl; else cout<<"YES"<<endl; } } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up