fork download
  1. #include <stdio.h>
  2. #include <iostream>
  3. #include <fstream>
  4. #include <vector>
  5.  
  6.  
  7. #define N 1000000
  8. using namespace std;
  9.  
  10. int main( void ) {
  11. std::vector<float> a(N);
  12.  
  13.  
  14.  
  15.  
  16. for (int i=0; i<N; i++)
  17. {
  18. a[i]=15;
  19.  
  20. }
  21. a[0]=-15;
  22.  
  23.  
  24.  
  25. ofstream outfile;
  26. outfile.open("xxx.dat");
  27.  
  28.  
  29.  
  30. for (int i=0; i<N; i++)
  31. {
  32. outfile << i*0.1 << " " << a[i] << endl;
  33. }
  34.  
  35. outfile.close();
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. int aaa;
  43. cin >> aaa;
  44. return 0;
  45. }
Success #stdin #stdout 0.14s 3020KB
stdin
Standard input is empty
stdout
Standard output is empty