Submission #15159213


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <class T>
inline bool chmin(T &a, T b)
{
    if (a > b)
    {
        a = b;
        return true;
    }
    return false;
}
template <class T>
inline bool chmax(T &a, T b)
{
    if (a < b)
    {
        a = b;
        return true;
    }
    return false;
}
using ll = long long;
const ll MOD = 1e9 + 7;
const long long INF = 1LL << 60;

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

    vector<int> f(100000, 0);

    for (int x = 1; x <= 100; x++)
    {
        for (int y = 1; y <= 100; y++)
        {
            for (int z = 1; z <= 100; z++)
            {

                f.at(x * x + y * y + z * z + x * y + y * z + z * x) += 1;
            }
        }
    }

    for (int i = 1; i <= n; i++)
    {
        cout << f.at(i) << endl;
    }
}

Submission Info

Submission Time
Task C - XYZ Triplets
User inaty
Language C++ (GCC 9.2.1)
Score 300
Code Size 897 Byte
Status AC
Exec Time 33 ms
Memory 3776 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 1
AC × 3
Set Name Test Cases
Sample sample_01.txt
All hand_01.txt, hand_02.txt, sample_01.txt
Case Name Status Exec Time Memory
hand_01.txt AC 33 ms 3464 KiB
hand_02.txt AC 14 ms 3692 KiB
sample_01.txt AC 11 ms 3776 KiB