Language: C++

#pragma GCC target("avx2")
#include <bits/stdc++.h>
#define FOR(i,k,n) for(int i=(k);i<(int)(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) begin(x),end(x)

using namespace std;

int main() {
  int n;
  cin>>n;
  vector<int> a(n), b(n);
  REP(i,n) cin>>a[i];
  REP(i,n) cin>>b[i];
  __m256i reg0 = _mm256_setzero_si256();
  __m256i reg1 = _mm256_setzero_si256();
  __m256i reg2 = _mm256_setzero_si256();
  __m256i reg3 = _mm256_setzero_si256();
  __m256i reg4 = _mm256_setzero_si256();
  __m256i reg5 = _mm256_setzero_si256();
  int resall = 0;
  constexpr int bi = 128;
  constexpr int bj = 48;
  for (int i = 0; i < n; i += bi) {
    for (int j = 0; j < n; j += bj) {
      if (n - i < bi || n - j < bj) {
        for (int i2 = 0; i2 < min(n - i, bi); ++i2) {
          for (int j2 = 0; j2 < min(n - j, bj); ++j2) {
            resall ^= a[i+i2] + b[j+j2];
          }
        }
      } else {
        __m256i breg0 = _mm256_loadu_si256((__m256i*)(b.data() + j +  0));
        __m256i breg1 = _mm256_loadu_si256((__m256i*)(b.data() + j +  4));
        __m256i breg2 = _mm256_loadu_si256((__m256i*)(b.data() + j +  8));
        __m256i breg3 = _mm256_loadu_si256((__m256i*)(b.data() + j + 12));
        __m256i breg4 = _mm256_loadu_si256((__m256i*)(b.data() + j + 16));
        __m256i breg5 = _mm256_loadu_si256((__m256i*)(b.data() + j + 20));
        for (int i2 = 0; i2 < bi; ++i2) {
          __m256i areg = _mm256_set1_epi32(a[i+i2]);
          reg0 ^= _mm256_add_epi32(areg, breg0);
          reg1 ^= _mm256_add_epi32(areg, breg1);
          reg2 ^= _mm256_add_epi32(areg, breg2);
          reg3 ^= _mm256_add_epi32(areg, breg3);
          reg4 ^= _mm256_add_epi32(areg, breg4);
          reg5 ^= _mm256_add_epi32(areg, breg5);
        }
      }
    }
  }
  __m256i xorvec = reg0 ^ reg1 ^ reg2 ^ reg3 ^ reg4 ^ reg5;
  int xorary[8];
  _mm256_storeu_si256(&xorary[0], xorvec);
  REP(i,8) resall ^= xorary[i];
  cout << resall << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: '__m256i' was not declared in this scope
   15 |   __m256i reg0 = _mm256_setzero_si256();
      |   ^~~~~~~
a.cc:16:10: error: expected ';' before 'reg1'
   16 |   __m256i reg1 = _mm256_setzero_si256();
      |          ^~~~~
      |          ;
a.cc:17:10: error: expected ';' before 'reg2'
   17 |   __m256i reg2 = _mm256_setzero_si256();
      |          ^~~~~
      |          ;
a.cc:18:10: error: expected ';' before 'reg3'
   18 |   __m256i reg3 = _mm256_setzero_si256();
      |          ^~~~~
      |          ;
a.cc:19:10: error: expected ';' before 'reg4'
   19 |   __m256i reg4 = _mm256_setzero_si256();
      |          ^~~~~
      |          ;
a.cc:20:10: error: expected ';' before 'reg5'
   20 |   __m256i reg5 = _mm256_setzero_si256();
      |          ^~~~~
      |          ;
a.cc:33:16: error: expected ';' before 'breg0'
   33 |         __m256i breg0 = _mm256_loadu_si256((__m256i*)(b.data() + j +  0));
      |                ^~~~~~
      |                ;
a.cc:34:16: error: expected ';' before 'breg1'
   34 |         __m256i breg1 = _mm256_loadu_si256((__m256i*)(b.data() + j +  4));
      |                ^~~~~~
      |                ;
a.cc:35:16: error: expected ';' before 'breg2'
   35 |         __m256i breg2 = _mm256_loadu_si256((__m256i*)(b.data() + j +  8));
      |                ^~~~~~
      |                ;
a.cc:36:16: error: expected ';' before 'breg3'
   36 |         __m256i breg3 = _mm256_loadu_si256((__m256i*)(b.data() + j + 12));
      |                ^~~~~~
      |                ;
a.cc:37:16: error: expected ';' before 'breg4'
   37 |         __m256i breg4 = _mm256_loadu_si256((__m256i*)(b.data() + j + 16));
      |                ^~~~~~
      |                ;
a.cc:38:16: error: expected ';' before 'breg5'
   38 |         __m256i breg5 = _mm256_loadu_si256((__m256i*)(b.data() + j + 20));
      |                ^~~~~~
      |                ;
a.cc:40:18: error: expected ';' before 'areg'
   40 |           __m256i areg = _mm256_set1_epi32(a[i+i2]);
      |                  ^~~~~
      |                  ;
a.cc:41:11: error: 'reg0' was not declared in this scope
   41 |           reg0 ^= _mm256_add_epi32(areg, breg0);
      |           ^~~~
a.cc:41:36: error: 'areg' was not declared in this scope
   41 |           reg0 ^= _mm256_add_epi32(areg, breg0);
      |                                    ^~~~
a.cc:41:42: error: 'breg0' was not declared in this scope
   41 |           reg0 ^= _mm256_add_epi32(areg, breg0);
      |                                          ^~~~~
a.cc:41:19: error: '_mm256_add_epi32' was not declared in this scope; did you mean '_mm_add_epi32'?
   41 |           reg0 ^= _mm256_add_epi32(areg, breg0);
      |                   ^~~~~~~~~~~~~~~~
      |                   _mm_add_epi32
a.cc:42:11: error: 'reg1' was not declared in this scope
   42 |           reg1 ^= _mm256_add_epi32(areg, breg1);
      |           ^~~~
a.cc:42:42: error: 'breg1' was not declared in this scope
   42 |           reg1 ^= _mm256_add_epi32(areg, breg1);
      |                                          ^~~~~
a.cc:43:11: error: 'reg2' was not declared in this scope
   43 |           reg2 ^= _mm256_add_epi32(areg, breg2);
      |           ^~~~
a.cc:43:42: error: 'breg2' was not declared in this scope
   43 |           reg2 ^= _mm256_add_epi32(areg, breg2);
      |                                          ^~~~~
a.cc:44:11: error: 'reg3' was not declared in this scope
   44 |           reg3 ^= _mm256_add_epi32(areg, breg3);
      |           ^~~~
a.cc:44:42: error: 'breg3' was not declared in this scope
   44 |           reg3 ^= _mm256_add_epi32(areg, breg3);
      |                                          ^~~~~
a.cc:45:11: error: 'reg4' was not declared in this scope
   45 |           reg4 ^= _mm256_add_epi32(areg, breg4);
      |           ^~~~
a.cc:45:42: error: 'breg4' was not declared in this scope
   45 |           reg4 ^= _mm256_add_epi32(areg, breg4);
      |                                          ^~~~~
a.cc:46:11: error: 'reg5' was not declared in this scope
   46 |           reg5 ^= _mm256_add_epi32(areg, breg5);
      |           ^~~~
a.cc:46:42: error: 'breg5' was not declared in this scope
   46 |           reg5 ^= _mm256_add_epi32(areg, breg5);
      |                                          ^~~~~
a.cc:51:10: error: expected ';' before 'xorvec'
   51 |   __m256i xorvec = reg0 ^ reg1 ^ reg2 ^ reg3 ^ reg4 ^ reg5;
      |          ^~~~~~~
      |          ;
a.cc:53:35: error: 'xorvec' was not declared in this scope
   53 |   _mm256_storeu_si256(&xorary[0], xorvec);
      |                                   ^~~~~~
a.cc:53:3: error: '_mm256_storeu_si256' was not declared in this scope; did you mean '_mm_storeu_si16'?
   53 |   _mm256_storeu_si256(&xorary[0], xorvec);
      |   ^~~~~~~~~~~~~~~~~~~
      |   _mm_storeu_si16