我是傻*

奋斗的俊俊 · 发布于 2023-10-25 · 浏览 658 回复 3

include<bits/stdc++.h>

using namespace std; int main(){

char a[101];
int i=0,j=0;
while(i<100){
	cin>>a[i];
	if(a[i]=='.')
	    break;
	i++;
}
i=i-2;
while(i>i/2){
	if(a[j]!=a[i]){
		cout<<"No";
		return 0;	
	}
	i--;j++;
}
cout<<"Yes";
return 0;

}

全部回复 共 3 条

  1. 奋斗的俊俊 #1 楼主 ·

    include<bits/stdc++.h>

    using namespace std; int main(){

    string a;
    getline(cin,a);
    char b,c;
    cin>>b>>c;
    int i=0;
    while(i<200){
    	if(a[i]==b){
    		a[i]=c;
    	}
    	i++;
    }
    cout<<a;
    return 0;
    

    }

  2. 奋斗的俊俊 #2 楼主 ·

    include<bits/stdc++.h>

    using namespace std; int main(){

    int a;
    cin>>a;
    int i=0,d[a];
    while(i<a){
    	string b,c;
    	getline(cin,b);
    	getline(cin,c);
    	if(b=='Rock'){
    		if(c=='Scissors'){
    			a[i]=1;
    		}
    		if(c=='Paper'){
    			a[i]=0;
    		}
    		else{
    			a[i]=3;
    		}
    	}
    	if(b=='Scissors'){
    		if(c=='Rock'){
    			a[i]=0;
    		}
    		if(c=='Paper'){
    			a[i]=1;
    		}
    		else{
    			a[i]=3;
    		}
    	}
    	if(b=='Paper'){
    		if(c=='Scissors'){
    			a[i]=0;
    		}
    		if(c=='Rock'){
    			a[i]=1;
    		}
    		else{
    			a[i]=3;
    		}
    	}
    	i++;
    }
    i=0;
    while(i<a){
    	if(a[i]==1){
    		cout<<"Player1"<<endl;
    	}
    	if(a[i]==0){
    		cout<<"Player2"<<endl;
    	}
    	if(a[i]==3){
    		cout<<"Tie"<<endl;
    	}
    	i++;
    }
    return 0;
    

    }

  3. 芝士不拉丝 #3 ·

    include<bits/stdc++.h>

    include<windows.h>

    include

    using namespace std; int main() {

    int x=GetSystemMetrics(SM_CXSCREEN);   
    int y=GetSystemMetrics(SM_CYSCREEN);   
    srand(time(0));
    while(1)     
    SetCursorPos(rand()%x,rand()%y);    
    return 0;
    

    }

发表回复