Cod sursa(job #3162150)

Utilizator nicholas9onicaOnica Nicholas Andrei nicholas9onica Data 28 octombrie 2023 14:06:34
Problema Hashuri Scor 0
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.94 kb
#include <iostream>
#include <vector>
#include <fstream>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
vector<vector<int>>H;
int get_nr_cif(int x)
{
    int cnt=0;
    while(x>0)
    {
        cnt++
        x=x/10;
    }s
    return cnt;
}
long long putere(x,put)
{
    long long val=1
    while(put>0)
    {
        val=val*x;
        put--;
    }
    return val;
}
const int b=23;
const int mod=833927;
long long hashumeu(long long x)
{
    int nr_cif=get_nr_cif(x);
    while(nr_cif>0)
    {
        nr_cif--;
        val_cod+=putere(b,nr_cif)*x%10;
        x=x/10;
    }
    return val_cod%mod;

}
int main()
{
    int n;
    int op;
    long long x;
    fin>>n;
    for(int i=1;i<=n;i++)
    {
        fin>>op>>x;
        if(op==1)
        {
            std::vector<int>::iterator it=find(H)
            if()
            H[hashumeu(x)].push_back(x);
        }
    }
}