Submission #717790

# Submission time Handle Problem Language Result Execution time Memory
717790 2023-04-02T14:21:08 Z skyvn97 Hexagonal Territory (APIO21_hexagon) C++14
0 / 100
1 ms 212 KB
#include "hexagon.h"

#include <bits/stdc++.h>
using namespace std;

long long a[22][7]; // memory limit exceeded

int draw_territory(int N, int A, int B,
                   std::vector<int> D, std::vector<int> L) {
	for (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) a[i][j] = i ^ j;
  	return a[0][0] + 220797;
}

Compilation message

hexagon.cpp: In function 'int draw_territory(int, int, int, std::vector<int>, std::vector<int>)':
hexagon.cpp:10:70: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations]
   10 |  for (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) a[i][j] = i ^ j;
      |                                                              ~~~~~~~~^~~~~~~
hexagon.cpp:10:50: note: within this loop
   10 |  for (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) a[i][j] = i ^ j;
      |                                                ~~^~~~~
hexagon.cpp:10:70: warning: iteration 22 invokes undefined behavior [-Waggressive-loop-optimizations]
   10 |  for (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) a[i][j] = i ^ j;
      |                                                              ~~~~~~~~^~~~~~~
hexagon.cpp:10:20: note: within this loop
   10 |  for (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) a[i][j] = i ^ j;
      |                  ~~^~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -