alexjercan/bugnet huggingface dataset:
Problem p02608 (C++) — buggy submission, verdict: Time Limit Exceeded

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

using ll = long long;

#define dump(x) cerr << #x << "=" << x << endl
#define dump2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define dump3(x, y, z)                                                         \\
  cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z     \\
       << endl
#define check(s) cerr << s << endl

#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define unique(v) v.erase(unique(v.begin(), v.end()), v.end());

vector<int> dx = {0, 1, 0, -1};
vector<int> dy = {1, 0, -1, 0};

const ll LINF = 2e18;
const int INF = 1e9;

ll f(ll n) {
  ll cnt = 0;
  for (int x = 1; x < n; x++) {
    if (x * x > n)
      break;
    for (int y = 1; y < n; y++) {
      if (x * x + y * y + x * y > n)
        break;
      ll d = -3 * x * x - 3 * y * y - 2 * x * y + 4 * n;
      if (d < 0)
        break;
      ll z = 0.5 * (-(x + y) + sqrt(d));
      if (z < 1)
        break;
      ll f = x * x + y * y + z * z + x * y + y * z + z * x;
      if (f == n)
        cnt++;
    }
  }
  return cnt;
}

void solve(ll N) {
  rep(i, N) { cout << f(i + 1) << endl; }
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  ll N;
  scanf("%lld", &N);
  solve(N);
  return 0;
}


Error: TLE

Fixed submission:

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

using ll = long long;

#define dump(x) cerr << #x << "=" << x << endl
#define dump2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define dump3(x, y, z)                                                         \\
  cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z     \\
       << endl
#define check(s) cerr << s << endl

#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define unique(v) v.erase(unique(v.begin(), v.end()), v.end());

vector<int> dx = {0, 1, 0, -1};
vector<int> dy = {1, 0, -1, 0};

const ll LINF = 2e18;
const int INF = 1e9;

ll f(ll n) {
  ll cnt = 0;
  for (int x = 1; x < n; x++) {
    for (int y = 1; y < n; y++) {
      for (int z = 1; z < n; z++) {
        ll f = x * x + y * y + z * z + x * y + y * z + z * x;
        if (f == n) {
          cnt++;
          break;
        }
        if (f > n)
          break;
      }
    }
  }
  return cnt;
}

void solve(ll N) {
  rep(i, N) { cout << f(i + 1) << endl; }
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  ll N;
  scanf("%lld", &N);
  solve(N);
  return 0;
}
Problem p02608 (C++) — buggy submission, verdict: Runtime Error

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

#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REP1(i, n) for (int i = 1, i##_len = (n); i < i##_len; ++i)
#define ll long long
static const int MAX = 10000;
static const ll INFTY = 1e12;

template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

const ll MRINF = 5000000000000000;

int main() {

  ll N;
  cin >> N;
  vector<ll> ans(100000000);
  REP1(x, 101) {
    REP1(y, 101) {
      REP1(z, 101) { ans[x * x + y * y + z * z + x * y + y * z + z * x]++; }
    }
  }
  REP(i, N) { cout << ans[i + 1] << endl; }
}
/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\\  =  /O
               ____/`---'\\____
             .'  \\\\|     |//  `.
            /  \\\\|||  :  |||//  \\
           /  _||||| -:- |||||-  \\
           |   | \\\\\\  -  /// |   |
           | \\_|  ''\\---/''  |   |
           \\  .-\\__  `-`  ___/-. /
         ___`. .'  /--.--\\  `. . __
      ."" '<  `.___\\_<|>_/___.'  >'"".
     | | :  `- \\`.;`\\ _ /`;.`/ - ` : | |
     \\  \\ `-.   \\_ __\\ /__ _/   .-` /  /
======`-.____`-.___\\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/

Error: -11

Fixed submission:

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

#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REP1(i, n) for (int i = 1, i##_len = (n); i < i##_len; ++i)
#define ll long long
static const int MAX = 10000;
static const ll INFTY = 1e12;

template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

const ll MRINF = 5000000000000000;

int main() {

  ll N;
  cin >> N;
  vector<ll> ans(N + 10);
  REP1(x, 101) {
    REP1(y, 101) {
      REP1(z, 101) { ans[x * x + y * y + z * z + x * y + y * z + z * x]++; }
    }
  }
  REP(i, N) { cout << ans[i + 1] << endl; }
}
/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\\  =  /O
               ____/`---'\\____
             .'  \\\\|     |//  `.
            /  \\\\|||  :  |||//  \\
           /  _||||| -:- |||||-  \\
           |   | \\\\\\  -  /// |   |
           | \\_|  ''\\---/''  |   |
           \\  .-\\__  `-`  ___/-. /
         ___`. .'  /--.--\\  `. . __
      ."" '<  `.___\\_<|>_/___.'  >'"".
     | | :  `- \\`.;`\\ _ /`;.`/ - ` : | |
     \\  \\ `-.   \\_ __\\ /__ _/   .-` /  /
======`-.____`-.___\\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/
Problem p02608 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

int main() {
  int n;
  cin >> n;
  vector<int> cnt(100000);
  for (int x = 1; x <= 100; x++) {
    for (int y = 1; y <= 100; y++) {
      for (int z = 1; z <= 100; z++) {
        ll tmp = x * x + y * y + z * z + x * y + y * z + z * x;
        cnt[tmp]++;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << cnt[i] << endl;
  }
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    ll ans = 0;
    for (int x = 1; x <= 60; x++) {
      for (int y = 1; y <= 60; y++) {
        for (int z = 1; z <= 60; z++) {
          ll tmp = x * x + y * y + z * z + x * y + y * z + z * x;
          if (tmp == i)
            ans++;
        }
      }
    }
    cout << ans << endl;
  }
}
Problem p02608 (C++) — buggy submission, verdict: Runtime Error

#include <cmath>
#include <iomanip>
#include <iostream>
#include <utility>
#include <vector>

using namespace std;

int main() {
  int N;
  cin >> N;

  int count[10001] = {};

  int temp = 0;
  for (int x = 1; x < 101; ++x) {
    for (int y = 1; y < 101; ++y) {
      for (int z = 1; z < 101; ++z) {
        temp = x * x + y * y + z * z + x * y + y * z + z * x;
        if (temp > N) {
          break;
        }
        count[temp] += 1;
      }
      if (y * y + 2 * y + 1 > N) {
        break;
      }
    }
    if (x * x + 2 * x + 1 > N) {
      break;
    }
  }

  for (int i = 1; i < N + 1; ++i) {
    cout << count[i] << endl;
  }
}


Error: 0

Fixed submission:

#include <cmath>
#include <iomanip>
#include <iostream>
#include <utility>
#include <vector>

using namespace std;

int main() {
  int N;
  cin >> N;

  int count[1001] = {};

  int temp = 0;
  for (int x = 1; x < 34; ++x) {
    for (int y = 1; y < 34; ++y) {
      for (int z = 1; z < 34; ++z) {
        temp = x * x + y * y + z * z + x * y + y * z + z * x;
        if (temp >= N) {
          break;
        }
        count[temp] += 1;
      }
      if (y * y + 2 * y + 1 >= N) {
        break;
      }
    }
    if (x * x + 2 * x + 1 >= N) {
      break;
    }
  }

  for (int i = 1; i < N + 1; ++i) {
    cout << count[i] << endl;
  }
}
Problem p02608 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main() {
  int n;
  cin >> n;

  int f[10001];
  for (int i = 1; i <= n; i++)
    f[i] = 0;

  for (int i = 0; i < 5; i++) {
    cout << 0 << endl;
    if (i + 1 >= n)
      break;
  }
  for (int i = 6; i <= n; i++) {
    for (int x = 1; x * x < i; x++) {
      for (int y = 1; y * y <= i - x * x; y++) {
        double z =
            (-1 * (x + y) + sqrt(-3 * x * x - 3 * y * y - 2 * x * y + 4 * i)) /
            2;
        if (floor(z) == z && z > 0)
          f[i]++;
      }
    }
    cout << f[i] << endl;
  }
}

Error: TLE

Fixed submission:

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

int main() {
  int n;
  cin >> n;

  int f[10001];
  for (int i = 1; i <= n; i++)
    f[i] = 0;

  for (int i = 0; i < 5; i++) {
    cout << 0 << endl;
    if (i + 1 >= n)
      break;
  }
  for (int i = 6; i <= n; i++) {
    for (int x = 1; x * x <= i; x++) {
      for (int y = 1; y * y <= i; y++) {
        for (int z = 1; z * z <= i; z++) {
          if (x * x + y * y + z * z + x * y + y * z + z * x == i)
            f[i]++;
        }
      }
    }
    cout << f[i] << endl;
  }
}
Problem p02608 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main(void) {
  int N;

  cin >> N;

  for (int i = 1; i <= N; ++i) {
    int ans = 0;
    for (int x = 1; x * x <= N; ++x) {
      for (int y = 1; x * x + y * y <= N && y <= x; ++y) {
        for (int z = 1; x * x + y * y + z * z <= N && z <= y; ++z) {
          if (x * x + y * y + z * z + x * y + y * z + z * x == i) {
            if (x == y && x == z)
              ++ans;
            else if (x == y || y == z || z == x)
              ans += 3;
            else
              ans += 6;
          }
        }
      }
    }
    cout << ans << endl;
  }

  return 0;
}


Error: TLE

Fixed submission:

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

int main(void) {
  int N;

  cin >> N;

  int sn = sqrt(N);

  for (int i = 1; i <= N; ++i) {
    int ans = 0;
    for (int x = 1; x <= sn; ++x) {
      for (int y = 1; y <= x; ++y) {
        for (int z = 1; z <= y; ++z) {
          if (x * x + y * y + z * z + x * y + y * z + z * x == i) {
            if (x == y && x == z)
              ++ans;
            else if (x == y || y == z || z == x)
              ans += 3;
            else
              ans += 6;
          }
        }
      }
    }
    cout << ans << endl;
  }

  return 0;
}
Problem p02608 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  vector<int> ans(10004, 0);
  cin >> n;
  for (int i = 1; i * i <= n; ++i) {
    for (int j = 1; j * j <= n; ++j) {
      for (int k = 1; k * k <= n; ++k) {
        int sum = i * i + j * j + k * k + i * j + j * k + k * i;
        if (sum <= 10000)
          ans[sum]++;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << '\\n';
  }

  return 0;
}

Error: 0

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  vector<int> ans(10004, 0);
  cin >> n;
  for (int i = 1; i * i <= n; ++i) {
    for (int j = 1; j * j <= n; ++j) {
      for (int k = 1; k * k <= n; ++k) {
        int sum = i * i + j * j + k * k + i * j + j * k + k * i;
        ans[sum]++;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << '\\n';
  }

  return 0;
}
Problem p02608 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
using namespace std;
long long f(int N) {
  long long ans = 0;
  for (int i = 1; i <= sqrt(N); i++) {
    for (int j = 1; j <= i; j++) {
      for (int k = 1; k <= j; k++) {
        if (i * i + j * j + k * k + i * j + j * k + k * i == N) {
          if (i == j && j == k)
            ans++;
          else if (i != j && j != k && k != i)
            ans += 6;
          else
            ans += 3;
        }
      }
    }
  }
  return ans;
}
int main(void) {
  int N;
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cout << f(i) << endl;
  }
  return 0;
}


Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
long long f(int N) {
  long long ans = 0;
  for (int i = 1; i <= sqrt(N); i++) {
    for (int j = 1; j <= sqrt(N); j++) {
      for (int k = 1; k <= sqrt(N); k++) {
        if (i * i + j * j + k * k + i * j + j * k + k * i == N) {
          ans++;
        }
      }
    }
  }
  return ans;
}
int main(void) {
  int N;
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cout << f(i) << endl;
  }
  return 0;
}
Problem p02608 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  for (int n = 1; n <= N; n++) {
    int ans = 0;
    for (int x = 1; x <= n && x * x <= n; x++) {
      for (int y = 1; y <= n && x * x + y * y <= n; y++) {
        const int c = n - x * x - y * y - x * y;
        for (int z = 1; z <= n; z++) {
          const int tmp = z * z + (y + x) * z;
          if (tmp > c)
            break;
          if (tmp == c) {
            ans++;
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}


Error: TLE

Fixed submission:

#include <iostream>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  for (int n = 1; n <= N; n++) {
    int ans = 0;
    for (int x = 1; x <= 100 && x * x <= n; x++) {
      for (int y = 1; y <= 100 && x * x + y * y <= n; y++) {
        const int c = n - x * x - y * y - x * y;
        for (int z = 1; z <= 100; z++) {
          const int tmp = z * z + (y + x) * z;
          if (tmp == c) {
            ans++;
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
Problem p02608 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, n) for (int i = 1; i <= (n); i++)
typedef pair<int, int> P;
typedef long long ll;
typedef unsigned long long ull;

int ptn(int x, int y, int z) {
  if ((x == y) && (y == z))
    return 1;
  if ((x == y) || (y == z) || (z == x))
    return 3;
  return 6;
}

int main() {
  int N;
  cin >> N;

  int total;

  rep2(i, N) {
    int sum = 0;
    rep2(x, sqrt(i) + 1) rep2(y, x) rep2(z, y) {
      total = pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x;
      // cout << x << " " << y << " " << z << endl;
      if (total == i) {
        sum += ptn(x, y, z);
      }
    }
    cout << sum << endl;
  }
}


Error: TLE

Fixed submission:

#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, n) for (int i = 1; i <= (n); i++)
typedef pair<int, int> P;
typedef long long ll;
typedef unsigned long long ull;

int main() {
  int N;
  cin >> N;

  int total;

  rep2(i, N) {
    int sum = 0;
    rep2(x, sqrt(i) + 1) {
      if (pow(x, 2) + pow(1, 2) + pow(1, 2) + x * 1 + 1 * 1 + 1 * x > i)
        break;
      rep2(y, sqrt(i) + 1) {
        if (pow(x, 2) + pow(y, 2) + pow(1, 2) + x * y + y * 1 + 1 * x > i)
          break;
        rep2(z, sqrt(i) + 1) {
          total = pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x;
          // cout << x << " " << y << " " << z << endl;
          if (total == i)
            sum++;
        }
      }
    }
    cout << sum << endl;
  }
}
Problem p02608 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define sync                                                                   \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(NULL)
#define input(arr, n)                                                          \\
  for (ll i1 = 0; i1 < n; i1++)                                                \\
  cin >> arr[i1]
#define mod 1000000007
#define F first
#define S second
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
//recursions\\
#pragma comment(linker, "/stack:200000000")
//loops\\
#pragma GCC optimize("unroll-loops")
using namespace __gnu_pbds;
#define ordered_set                                                            \\
  tree<ll, null_type, less_equal<ll>, rb_tree_tag,                             \\
       tree_order_statistics_node_update> // s.order_of_key(val)
                                          // *s.find_by_order(ind)
using namespace std;
const int N = 1e6 + 5;
int main() {
  sync;
  ll ans[10005] = {0};
  for (ll i = 1; i <= 100; i++) {
    for (ll j = 1; j <= 100; j++) {
      for (ll k = 1; k <= 100; k++) {
        ll x = i, y = j, z = k;
        ll sum = x * x + y * y + z * z + x * y + y * z + z * x;
        if (sum <= 10000)
          ans[sum]++;
      }
    }
  }
  ll n;
  cin >> n;
  for (ll i = 1; i <= n; i++)
    cout << ans[i] << endl;
}

Error: 0

Fixed submission:

#include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define sync                                                                   \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(NULL)
#define input(arr, n)                                                          \\
  for (ll i1 = 0; i1 < n; i1++)                                                \\
  cin >> arr[i1]
#define mod 1000000007
#define F first
#define S second
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
//recursions\\
#pragma comment(linker, "/stack:200000000")
//loops\\
#pragma GCC optimize("unroll-loops")
using namespace __gnu_pbds;
#define ordered_set                                                            \\
  tree<ll, null_type, less_equal<ll>, rb_tree_tag,                             \\
       tree_order_statistics_node_update> // s.order_of_key(val)
                                          // *s.find_by_order(ind)
using namespace std;
const int N = 1e6 + 5;
int main() {
  sync;
  ll ans[1005] = {0};
  for (ll i = 1; i <= 100; i++) {
    for (ll j = 1; j <= 100; j++) {
      for (ll k = 1; k <= 100; k++) {
        ll x = i, y = j, z = k;
        ll sum = x * x + y * y + z * z + x * y + y * z + z * x;
        if (sum <= 1000)
          ans[sum]++;
      }
    }
  }
  ll n;
  cin >> n;
  for (ll i = 1; i <= n; i++)
    cout << ans[i] << endl;
}
Problem p02608 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main(void) {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    ll ans = 0;
    for (int x = 1; x * x < i; x++) {
      for (int y = 1; y * y < i; y++) {
        int d = 4 * i - 3 * x * x - 3 * y * y - 2 * x * y;
        if (d < 0)
          continue;
        int z = (-1 * (x + y) + sqrt(d));
        if (z < 1)
          continue;
        else {
          z /= 2;
          if (x * x + y * y + z * z + x * y + y * z + z * x == i) {
            ans++;
            // cout << x << ", " << y << ", " << z << endl;
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}

Error: TLE

Fixed submission:

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

int main(void) {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    ll ans = 0;
    for (int x = 1; x * x < i; x++) {
      for (int y = 1; y * y < i; y++) {
        int d = 4 * i - 3 * x * x - 3 * y * y - 2 * x * y;
        for (int j = 0; j * j <= d; j++) {
          if (j * j == d) {
            int z = (-1 * (x + y) + j);
            if (z < 1)
              continue;
            if (z % 2 == 1)
              continue;
            else {
              z /= 2;
              if (x * x + y * y + z * z + x * y + y * z + z * x == i) {
                ans++;
                // cout << x << ", " << y << ", " << z << endl;
              }
            }
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
Problem p02608 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define repi(i, x)                                                             \\
  for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define solve(a) ((a) ? "Yes" : "No")
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int, int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long, long long> P;
typedef vector<P> VP;
template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INFLL = 1LL << 60;
const int INF = 1 << 30;
const double PI = acos(-1);
int main() {
  int n;
  cin >> n;
  Vi ans(n + 2, 0);
  for (int x = 1; x <= sqrt(n); x++) {
    for (int y = 1; y <= sqrt(n); y++) {
      for (int z = 1; z <= sqrt(n); z++) {
        if (x * x + y * y + z * z + z * y + y * x + z * x > n) {
          continue;
        }
        ans[x * x + y * y + z * z + z * y + y * x + z * x]++;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << endl;
  }
  // cout << ans << endl;
}

Error: 0

Fixed submission:

#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define repi(i, x)                                                             \\
  for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define solve(a) ((a) ? "Yes" : "No")
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int, int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long, long long> P;
typedef vector<P> VP;
template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INFLL = 1LL << 60;
const int INF = 1 << 30;
const double PI = acos(-1);
int main() {
  int n;
  cin >> n;
  Vi ans(n + 2, 0);
  for (int x = 1; x <= sqrt(n); x++) {
    for (int y = 1; y <= sqrt(n); y++) {
      for (int z = 1; z <= sqrt(n); z++) {
        ans[x * x + y * y + z * z + z * y + y * x + z * x]++;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << endl;
  }
  // cout << ans << endl;
}