单选题:The Online Hiring Algorithm ( hire only once ) is described as t
The Online Hiring Algorithm ( hire only once ) is described as the following:
```
int OnlineHiring ( EventType C[ ], int N, int k )
{
int Best = N;
int BestQ = -INFINITY ;
for ( i=1; i<=k; i++ ) {
Qi = interview( i );
if ( Qi > BestQ ) BestQ = Qi;
}
for ( i=k+1; i<=N; i++ ) {
Qi = interview( i );
if ( Qi > BestQ ) {
Best = i;
break;
}
}
return Best;
}
```
Assume that the quality input C[ ] is uniformly random.
When $$N$$ = 271 and $$k$$ = 90, the probability of hiring the $$N$$th candidate is__. @[C](3)
A. 1/$$e$$
B. 1/$$N$$
C. 1/3
D. 1/$$k$$
A.1/$$e$$
B.1/$$N$$
C.1/3
D.1/$$k$$
答案:C
```
int OnlineHiring ( EventType C[ ], int N, int k )
{
int Best = N;
int BestQ = -INFINITY ;
for ( i=1; i<=k; i++ ) {
Qi = interview( i );
if ( Qi > BestQ ) BestQ = Qi;
}
for ( i=k+1; i<=N; i++ ) {
Qi = interview( i );
if ( Qi > BestQ ) {
Best = i;
break;
}
}
return Best;
}
```
Assume that the quality input C[ ] is uniformly random.
When $$N$$ = 271 and $$k$$ = 90, the probability of hiring the $$N$$th candidate is__. @[C](3)
A. 1/$$e$$
B. 1/$$N$$
C. 1/3
D. 1/$$k$$
A.1/$$e$$
B.1/$$N$$
C.1/3
D.1/$$k$$
答案:C