s += a[i][j];
   }
 }
 return s;
}
int main() {
 static int a[4000][4000] = {0};
 for (int i = 0; i < 100; ++i) {
   int x = rand() % 4000;
   int y = rand() % 4000;
   a[x][y] = rand() % 1000;
 }
auto start = std::chrono::high_resolution_clock::now();
 auto end = start;
 int s = 0;
if defined RUN_LOOP1
start = std::chrono::high_resolution_clock::now();
s = 0;
 for (int i = 0; i < 10; ++i) {
   s += loop1(a);
   s = s % 100;
 }
 end = std::chrono::high_resolution_clock::now();
std::cout << "s = " << s << std::endl;
 std::cout << "Time for loop1: "
   << std::chrono::duration(end - start).count()
   << "ms" << std::endl;
endif
if defined RUN_LOOP2
start = std::chrono::high_resolution_clock::now();
 s = 0;
 for (int i = 0; i < 10; ++i) {
   s += loop2(a);
   s = s % 100;
 }
 end = std::chrono::high_resolution_clock::now();
std::cout << "s = " << s << std::endl;
 std::cout << "Time for loop2: "
   << std::chrono::duration(end - start).count()