Home > Back-end >  Urgent urgent,
Urgent urgent,

Time:05-01

Given a from {1, 2,... , n} to its own function f, to judge whether there is a hyperbola function f? C language programming help

CodePudding user response:

There are x!=y, but f (x)=f (y), there is no inverse function, otherwise the inverse function

About this code, no verification, meaning the,

Const int N=100;
Int main () {
Int [N] CNT={0};
Bool Yes=True;
for(int x=0; xCNT [f (x)] + +;
}
for(int x=0; X & lt; N & amp; & Yes; X++) {
Yes=CNT [x] <2;
}
//Yes to True is inverse function, otherwise there is no
return 0;
}

CodePudding user response:

reference mark 1 floor response:
there are x!=y, but f (x)=f (y), there is no inverse function, otherwise the inverse function

About this code, no verification, meaning the,

Const int N=100;
Int main () {
Int [N] CNT={0};
Bool Yes=True;
for(int x=0; xCNT [f (x)] + +;
}
for(int x=0; X & lt; N & amp; & Yes; X++) {
Yes=CNT [x] <2;
}
//Yes to True is inverse function, otherwise there is no
return 0;
}

Thank you for your brother