Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <vector>
- #include <fstream>
- #include <math.h>
- using namespace std;
- int main()
- {
- int n, a;
- cin >> n;
- vector<int> v;
- for(int i = 0; i < n; i++)
- {
- cin >> a;
- v.push_back(a);
- }
- for(int i = 0; i < n; i++)
- {
- v[i] %= 12;
- if(v[i] == 0)
- v[i] = 12;
- }
- vector<int> notas(13, 0);
- for(int i = 0; i < n; i++)
- {
- if(notas[v[i]] == 0)
- notas[v[i]]++;
- }
- if(notas[2] == 0 & notas[4] == 0 & notas[7] == 0 & notas[9] == 0 & notas[11] == 0)
- cout << "do" << endl;
- else if(notas[3] == 0 & notas[5] == 0 & notas[8] == 0 & notas[10] == 0 & notas[12] == 0)
- cout << "do#" << endl;
- else if(notas[4] == 0 & notas[6] == 0 & notas[9] == 0 & notas[11] == 0 & notas[1] == 0)
- cout << "re" << endl;
- else if(notas[5] == 0 & notas[7] == 0 & notas[10] == 0 & notas[12] == 0 & notas[2] == 0)
- cout << "re#" << endl;
- else if(notas[6] == 0 & notas[8] == 0 & notas[11] == 0 & notas[1] == 0 & notas[3] == 0)
- cout << "mi" << endl;
- else if(notas[7] == 0 & notas[9] == 0 & notas[12] == 0 & notas[2] == 0 & notas[4] == 0)
- cout << "fa" << endl;
- else if(notas[8] == 0 & notas[10] == 0 & notas[1] == 0 & notas[3] == 0 & notas[5] == 0)
- cout << "fa#" << endl;
- else if(notas[9] == 0 & notas[11] == 0 & notas[2] == 0 & notas[4] == 0 & notas[6] == 0)
- cout << "sol" << endl;
- else if(notas[10] == 0 & notas[12] == 0 & notas[3] == 0 & notas[5] == 0 & notas[7] == 0)
- cout << "sol#" << endl;
- else if(notas[11] == 0 & notas[1] == 0 & notas[4] == 0 & notas[6] == 0 & notas[8] == 0)
- cout << "la" << endl;
- else if(notas[12] == 0 & notas[2] == 0 & notas[5] == 0 & notas[7] == 0 & notas[9] == 0)
- cout << "la#" << endl;
- else if(notas[1] == 0 & notas[3] == 0 & notas[6] == 0 & notas[8] == 0 & notas[10] == 0)
- cout << "si" << endl;
- else
- cout << "desafinado" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement