Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <math.h>
- #include<string>
- #define pi acos(-1.0)
- #define ll long long int
- #define sc scanf
- #define pf printf
- #define fastread() (ios_base:: sync_with_stdio(false),cin.tie(NULL));
- using namespace std;
- int main() {
- while(1) {
- ll t;
- cin >> t;
- if(t==-1) break;
- string s1, s2;
- cin >> s1 >> s2;
- int l2=s2.size();
- for(int i=0; i<l2; i++) {
- int f=0;
- for(int j=i+1; j<l2; j++) {
- if(s2[i]==s2[j]) f=1;
- }
- if(f==1) s2[i]='0';
- }
- int l1=s1.size(), c=0, s=0;
- for(int i=0; i<l2; i++) {
- int g=0;
- if(s2[i]!='0') {
- for(int j=0; j<l1; j++) {
- if(s2[i]==s1[j]) {
- s++;
- g=1;
- }
- }
- if(g==0) c++;
- if(c>=7) break;
- }
- }
- cout << "Round " << t << "\n";
- if(c>=7 && s!=l1) cout << "You lose.\n";
- else if(s==l1) cout << "You win.\n";
- else cout << "You chickened out.\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement