fork(1) download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <vector>
  4.  
  5. using namespace std;
  6.  
  7. void piano(vector<int> notes, int n) {
  8. int sol = 0;
  9. cout << sol << endl;
  10.  
  11. vector<int> belegung(n,0);
  12. for(int i=0;i<n;i++) {
  13. cout << belegung[i]+1;
  14. if(i<n-1) cout << " ";
  15. else cout << endl;
  16. }
  17.  
  18. }
  19.  
  20. int main() {
  21. int n;
  22. cin >> n;
  23. vector<int> notes(n,0);
  24. for(int i=0; i<n; i++) {
  25. cin >> notes[i];
  26. }
  27. piano(notes,n);
  28. }
Success #stdin #stdout 0s 3436KB
stdin
13
7 5 5 6 4 4 3 4 5 6 7 7 7
stdout
0
1 1 1 1 1 1 1 1 1 1 1 1 1