This program goes through every combination of 4 numbers from 1 - 400 and sees how many unique numbers can be made from the product.
I believe the `unordered_set` used to hold the already checked numbers is getting too large and thus it quits; task manager tells me it's at 1.5 GB. 

Is there any way I can make this code run? I think maybe splitting up the set or somehow finding a more efficient formula.

Note: based on the comments, I would like to say again I am not storing all 25 billion numbers. I'm only storing ~100,000,000 numbers. The question has a `RANGE` of 400, but I'm looking for a comprehensive solution that can handle 500, or even 1000 without the memory problem.

```
#include <iostream>
#include <unordered_set>
using namespace std;

const int RANGE = 400;

int main(){

    unordered_set<long long> nums;

    for(long long a=1; a<=RANGE; a++)
    {
        for(long long b=a; b<=RANGE; b++)
        {
            for(long long c=b; c<=RANGE; c++)
            {
                for(long long d=c; d<=RANGE; d++)
                {
                    unordered_set<long long>::const_iterator got = nums.find(a*b*c*d);
                    if (got == nums.end())
                    {
                        nums.insert(a*b*c*d);
                    }
                }
            }
        }
        cout << a << endl;
    }

    cout << nums.size() << endl;

    return 0;
}

```