Advertisement
RobertDeMilo

RB2.9 Итоги раздела Эффективное использование потоков ввода вывода

Apr 16th, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <fstream>
  4.  
  5. #include "log_duration.h"
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.     ios_base::sync_with_stdio(false);
  12.     cin.tie(nullptr);
  13.  
  14.     {
  15.         LOG_DURATION("endl");
  16.  
  17.         for (int i = 0; i < 100'000; ++i)
  18.        {
  19.            int x;
  20.            cin >> x;
  21.            cout << x << endl;
  22.        }
  23.    }
  24.  
  25.    {
  26.        LOG_DURATION("'\\n'");
  27.  
  28.        for (int i = 0; i < 100'000; ++i)
  29.         {
  30.             int x;
  31.             cin >> x;
  32.             cout << x << '\n';
  33.         }
  34.     }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement