信奥赛例题——1132,1166,1167,1186

发布时间 2023-08-01 20:10:33作者: fushuxuan1
//   1132
//#include <iostream>
//using namespace std;
//int main(int argc, char** argv) {
//	int N;
//	cin>>N;
//	string S1,S2;
//	string x="Rock",y="Scissors",z="Paper";
//	for(int i=0;i<N;i++){
//		cin>>S1>>S2;
//		if(S1==S2){
//			cout<<"Tie"<<endl;
//		}else if(S1=="Rock" && S2=="Scissors"){
//			cout<<"Player1"<<endl;
//		}else if(S1==x && S2==z){
//			cout<<"Player2"<<endl;
//		}else if(S1==y && S2==z){
//			cout<<"Player1"<<endl;
//		}else if(S1==z && S2==x){
//			cout<<"Player1"<<endl;
//		}else if(S1==y && S2==x){
//			cout<<"Player2"<<endl;
//		}else if(S1==z && S2==y){
//			cout<<"Player2"<<endl;
//		}
//	}
//	return 0;
//}
//      1166
//#include <bits/stdc++.h>
//using namespace std;
//double a(double n,double x){
//	if(n==1){
//		return sqrt(n+x);
//	}
//	return sqrt(n+a(n-1,x));
//}
//int main(int argc, char** argv) {
//	double n,x;
//	cin>>n>>x;
//	cout<<fixed<<setprecision(2)<<a(x,n);
//	return 0;
//}
//    1167
//#include <bits/stdc++.h>
//using namespace std;
//double a(double n,double x){
//	if(n==1){
//		return x/(x+n);
//	}
//	return x/(n+a(n-1,x));
//}
//int main(int argc, char** argv) {
//	double n,x;
//	cin>>n>>x;
//	cout<<fixed<<setprecision(2)<<a(x,n);
//	return 0;
//}
//      1186
//#include <bits/stdc++.h>
//using namespace std;
//int main(int argc, char** argv) {
//	int n,a[105]={},k;
//	cin>>n;
//	for(int i=1;i<=n;i++){
//		cin>>k;
//		a[k+50]++;
//	}
//	for(int i=-50;i<=50;i++){
//		if(a[i+50]>n/2){
//			cout<<i;
//			return 0;
//		}
//	}
//	cout<<"no";
//	return 0;
//}