fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int tab[1000000000];
  7. int n;
  8. int q;
  9.  
  10. cin>>q;
  11. while(cin>>tab[n]){;
  12. cout<<tab[q-1]<<" ";}
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5264KB
stdin
2
1 20 30 1 2 
stdout
0 0 0 0 0