第33期:IT培训-领先公司的当前问题和挑战

你好!谁有什么隔离日?副力Coronavarius-他杀死了所有其他消息。如您所知,所有其他新闻都是坏消息,所以这是个好消息。


总的来说,我们本周进行了协商并决定对...病毒这一主题提出一些困惑。冷静,您不会因他们的决定而受到感染)

洗手,呆在家里,不要触摸脸部,正好在一周后等待问题的答案。

PS对上一期问题的解答已经发布

问题


1. 疾病和检查
迪诺担心他可能得了罕见病。他决定进行自我测试,并假设该疾病的测试方法在99%的时间内都是正确的(换句话说,如果他患有这种疾病,则表明他有99%的可能性这样做,而如果他没有患有这种疾病,这表明他没有以99%的概率患病)。假设这种疾病实际上非常罕见,在每10,000人中只有一个随机发生在普通人群中。
如果他的测试结果恢复阳性,那么他实际患上这种疾病的机会是多少?

A. 0.99
B. 0 0.90
C. 0.10
D. 0.01

传递
, . , 99 ( , , , 99- , , , 99- ). , , 10 000 .
, , ?

2. 严格的药丸时间表问题
您采用严格的医疗方案,每天需要服用两种类型的药。您必须同时服用一粒A丸和一粒B丸。这些药非常昂贵,而且您不想浪费任何药。因此,您打开了A药瓶,然后将其轻拍到手中。然后,您打开一瓶B药丸,然后做同样的事情-但是您犯了一个错误,两个B药丸与A药丸一起出现在您的手中。但是这些药都是完全一样的。除了B药之外,没有其他方法可以告诉A药。是否有可能满足您的疗程,并且在不浪费任何药丸的情况下,准确地同时服用每种药丸之一?


传递
, . A B . , . , A . – , B . . A B. , ?

任务


1. 细菌菌落中的病毒问题
一种病毒进入由N种细菌组成的菌落。在第一分钟,它会破坏一种细菌,然后分成两种新病毒。同时,每个剩余的细菌也被分为两个新细菌。第二分钟,产生的两种病毒消灭了两种细菌,然后病毒和所有剩余的细菌又再次分裂,依此类推。

在这种情况下,这个殖民地会无限期地生活,还是最终死亡?

2. 排序方式!
A new deadly virus has infected large population of a planet. A brilliant scientist has discovered a new strain of virus which can cure this disease. Vaccine produced from this virus has various strength depending on midichlorians count. A person is cured only if midichlorians count in vaccine batch is more than midichlorians count of person. A doctor receives a new set of report which contains midichlorians count of each infected patient, Practo stores all vaccine doctor has and their midichlorians count. You need to determine if doctor can save all patients with the vaccines he has. The number of vaccines and patients are equal.

Input Format:
First line No of test cases t followed by contains the number of vaccines — N. Second line contains N integers, which are strength of vaccines. Third line contains N integers, which are midichlorians count of patients.

Output Format:
Print a single line containing ′1′ for Yes or '0' for No.

Constraints:
1<=T<=150
1<=N<=10

Strength of vaccines and midichlorians count of patients fit in integer.

Sample Input:
2
5
123 146 454 542 456
100 328 248 689 200
8
87 93 50 22 63 28 91 60
64 27 41 27 73 37 12 69


Sample Output:
0

. , . , , . , , . , , Practo , , . , , . .

:
t, — N. N , . N , .

:
, «1» «0» .

:
1<=T<=150
1<=N<=10

.

:
2
5
123 146 454 542 456
100 328 248 689 200
8
87 93 50 22 63 28 91 60
64 27 41 27 73 37 12 69


:
0


1
D — , , 1 .

:
() , . , ? , , ?

, A B, P (A|B) B A, P (B|A) A B:
P(A|B) = P(A)P(B|A) / P(B) => P(B) = P(A)P(B|A)/P(A/B)
  • — , , — , .
  • , P(B|not A) — “ ”: , . P (B|A)=0.99, P (A)=0.0001, P (B) , A :
    P(B)=P(B|A)P(A)+P(B|not A)P(not A) 0.99*0.0001+0.01*0.9999.
    , , , 1 .

, , , , , . , , 1 . 100 , 99 . 999 900 , 9999 ( , - ). , , , , 99/(99+9999), , 0.0098 1 !

2
:
1: .

2: , , .

3: , .

4: . , ( ).

1
: .

. , :


, t = N .

2
#include<iostream>
using namespace std;
int main()
 {
	int t;
	cin>>t;
	while(t--)
	{
	    int n,p=1;
	    cin>>n;
	    int a[n],b[n];
	    for(int i=0;i<n;i++)
	    cin>>a[i];
	    for(int i=0;i<n;i++)
	    cin>>b[i];
	    sort(a,a+n);
	    sort(b,b+n);
	    for(int i=0;i<n&&p;i++)
	    if(a[i]<b[i])
	    p=0;
	    cout<<p<<"\n";
	}
	//code
	return 0;
}

All Articles