Cod sursa(job #3304388)

Utilizator unomMirel Costel unom Data 23 iulie 2025 10:41:33
Problema Puteri Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.66 kb
#include <fstream>
#include <map>

using namespace std;

struct el
{
    int a, b, c;
};

bool operator < (const el &x, const el &y)
{
    if(x.a == y.a)
    {
        if(x.b == y.b)
        {
            return x.c < y.c;
        }

        return x.b < y.b;
    }

    return x.a < y.a;
}

ifstream in("puteri.in");
ofstream out("puteri.out");
int n;
el v[100005];
map<el, int> mp[65];

int main()
{
    in>>n;

    for(int i = 1; i<=n; i++)
    {
        in>>v[i].a>>v[i].b>>v[i].c;


        for(int j = 2; j<=64; j++)
        {
            mp[j][{v[i].a % j, v[i].b % j, v[i].c % j}]++;
        }
    }



    return 0;
}