fork download
  1. #include <iostream>
  2. #include<math.h>
  3. #include<vector>
  4. #include <climits>
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9. // your code goes here
  10. int z=INT_MAX;
  11. vector<int> l(32,3);
  12. int i=0;
  13. while(z){
  14. l[i++]=z%2;
  15. z=z/2;
  16. }
  17. for(int i=0;i<l.size();i++){
  18. cout<<l[i]<<" ";
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5304KB
stdin
Standard input is empty
stdout
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3