diff --git a/homework/Yurkov/01/matr1 b/homework/Yurkov/01/matr1 new file mode 100644 index 0000000..654e08e Binary files /dev/null and b/homework/Yurkov/01/matr1 differ diff --git a/homework/Yurkov/01/matr1.cpp b/homework/Yurkov/01/matr1.cpp new file mode 100644 index 0000000..e663b57 --- /dev/null +++ b/homework/Yurkov/01/matr1.cpp @@ -0,0 +1,43 @@ +#include +#include +//по столбцам +class Timer +{ + using clock_t = std::chrono::high_resolution_clock; + using microseconds = std::chrono::microseconds; +public: + Timer() + : start_(clock_t::now()) + { + } + + ~Timer() + { + const auto finish = clock_t::now(); + const auto us = + std::chrono::duration_cast + (finish - start_).count(); + std::cout << us << " us" << std::endl; + } + +private: + const clock_t::time_point start_; +}; + +int main(){ + const int n = 1000; + int mas[n][n]; + + for(int i=0;i +#include +//по строкам +class Timer +{ + using clock_t = std::chrono::high_resolution_clock; + using microseconds = std::chrono::microseconds; +public: + Timer() + : start_(clock_t::now()) + { + } + + ~Timer() + { + const auto finish = clock_t::now(); + const auto us = + std::chrono::duration_cast + (finish - start_).count(); + std::cout << us << " us" << std::endl; + } + +private: + const clock_t::time_point start_; +}; + +int main(){ + const int n = 1000; + int mas[n][n]; + + for(int i=0;i