1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| #include<string> #include<cstring> #include<iostream> using namespace std; string s,str; string s1[20]={"","WBWBWWBWBWBW","BWBWWBWBWBWW","WBWWBWBWBWWB","BWWBWBWBWWBW","WWBWBWBWWBWB","WBWBWBWWBWBW","BWBWBWWBWBWW","WBWBWWBWBWWB","BWBWWBWBWWBW","WBWWBWBWWBWB","BWWBWBWWBWBW","WWBWBWWBWBWB"}; string s2[20]={"","Do","#Do","Re","#Re","Mi","Fa","#Fa","So","#So","La","#La","Si"}; int main() { cin>>s; for(int i=0;i<=11;i++) { str+=s[i]; } for(int i=1;i<=12;i++) { if(str==s1[i]) { cout<<s2[i]<<endl; return 0; } } return 0; }
|