标签:include names sine之舞 otc class cto == pre turn
#include<iostream>
#include<vector>
#include<string.h>
using namespace std;
int main(){
int n;
cin>>n;
vector<string> A(n+1,"");
for(int i=1; i<=n; i++){
string str="";
str.append(1, '0'+i);
for(int j=i; j>0; j--){
str="sin("+str+")";
if(j>1){
char c=char('0'+(j-1));
if(j%2==1)
str="+"+str;
else
str="-"+str;
str.insert(str.begin(), 1, c);
}
}
A[i]=str;
}
string ans="";
for(int i=n; i>0; i--){
char c='0'+i;
if(i==n){
ans=A[n+1-i]+"+";
ans.append(1, c);
}else{
ans="("+ans+")"+A[n+1-i]+"+";
ans.append(1, c);
}
}
cout<<ans<<endl;
return 0;
}
标签:include names sine之舞 otc class cto == pre turn
原文地址:https://www.cnblogs.com/A-Little-Nut/p/10350979.html