D. Olympiadtime limit per test1 secondmemory limit per test256 megabyt dịch - D. Olympiadtime limit per test1 secondmemory limit per test256 megabyt Việt làm thế nào để nói

D. Olympiadtime limit per test1 sec

D. Olympiad
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
A boy named Vasya has taken part in an Olympiad. His teacher knows that in total Vasya got at least x points for both tours of the Olympiad. The teacher has the results of the first and the second tour of the Olympiad but the problem is, the results have only points, no names. The teacher has to know Vasya's chances.

Help Vasya's teacher, find two numbers — the best and the worst place Vasya could have won. Note that the total results' table sorts the participants by the sum of points for both tours (the first place has the participant who has got the most points). If two or more participants have got the same number of points, it's up to the jury to assign places to them according to their choice. It is guaranteed that each participant of the Olympiad participated in both tours of the Olympiad.

Input
The first line contains two space-separated integers n, x (1 ≤ n ≤ 105; 0 ≤ x ≤ 2·105) — the number of Olympiad participants and the minimum number of points Vasya earned.

The second line contains n space-separated integers: a1, a2, ..., an (0 ≤ ai ≤ 105) — the participants' points in the first tour.

The third line contains n space-separated integers: b1, b2, ..., bn (0 ≤ bi ≤ 105) — the participants' points in the second tour.

The participants' points are given in the arbitrary order. It is guaranteed that Vasya was present in the Olympiad — there are two integers i, j (1 ≤ i, j ≤ n) such, that ai + bj ≥ x.

Output
Print two space-separated integers — the best and the worst place Vasya could have got on the Olympiad.
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
D. Olympiadtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA boy named Vasya has taken part in an Olympiad. His teacher knows that in total Vasya got at least x points for both tours of the Olympiad. The teacher has the results of the first and the second tour of the Olympiad but the problem is, the results have only points, no names. The teacher has to know Vasya's chances.Help Vasya's teacher, find two numbers — the best and the worst place Vasya could have won. Note that the total results' table sorts the participants by the sum of points for both tours (the first place has the participant who has got the most points). If two or more participants have got the same number of points, it's up to the jury to assign places to them according to their choice. It is guaranteed that each participant of the Olympiad participated in both tours of the Olympiad.InputThe first line contains two space-separated integers n, x (1 ≤ n ≤ 105; 0 ≤ x ≤ 2·105) — the number of Olympiad participants and the minimum number of points Vasya earned.The second line contains n space-separated integers: a1, a2, ..., an (0 ≤ ai ≤ 105) — the participants' points in the first tour.The third line contains n space-separated integers: b1, b2, ..., bn (0 ≤ bi ≤ 105) — the participants' points in the second tour.The participants' points are given in the arbitrary order. It is guaranteed that Vasya was present in the Olympiad — there are two integers i, j (1 ≤ i, j ≤ n) such, that ai + bj ≥ x.
Output
Print two space-separated integers — the best and the worst place Vasya could have got on the Olympiad.
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
D. Olympiad
thời gian giới hạn cho mỗi test1 thứ hai
giới hạn bộ nhớ cho mỗi megabyte test256
inputstandard đầu vào
outputstandard đầu ra
Một cậu bé tên Vasya đã tham gia vào một Olympiad. Giáo viên của mình biết rằng trong tổng Vasya có ít nhất x điểm cho cả các tour du lịch trong Olympic. Các giáo viên có kết quả đầu tiên và các tour du lịch thứ hai của Olympic nhưng vấn đề là, kết quả chỉ có điểm, không có tên. Các giáo viên phải biết cơ hội của Vasya. Giúp giáo viên Vasya của, tìm thấy hai con số - tốt nhất và nơi tồi tệ nhất Vasya có thể giành chiến thắng. Lưu ý rằng bảng tổng kết quả 'sắp xếp những người tham gia bằng tổng điểm cho cả tour du lịch (nơi đầu tiên có người tham gia đã có được nhiều điểm nhất). Nếu hai hoặc nhiều người tham gia đã có cùng số điểm, đó là vào ban giám khảo chỉ định nơi để họ theo sự lựa chọn của họ. Nó được đảm bảo rằng mỗi người tham gia trong Olympic tham gia trong cả hai tour du lịch của Olympiad. Input Dòng đầu tiên chứa hai số nguyên cách tách n, x (1 ≤ n ≤ 105; 0 ≤ x ≤ 2 · 105) - số Olympiad . người tham gia và số lượng tối thiểu của các điểm thu Vasya Dòng thứ hai chứa n-số nguyên: a1, a2, ..., an (0 ≤ ai ≤ 105) - điểm của người tham gia trong tour diễn đầu tiên. Dòng thứ ba chứa n cách để phân tách các số nguyên: - '. điểm trong tour diễn thứ hai b1, b2, ..., bn (0 ≤ bi ≤ 105) những người tham gia Những người tham gia' điểm được cung cấp theo thứ tự tùy ý. Nó được đảm bảo rằng Vasya đã có mặt ở Olympic - có hai số nguyên i, j (1 ≤ i, j ≤ n) như vậy, mà ai + bj ≥ x. Output In hai số nguyên không gian tách - tốt nhất và những nơi tồi tệ nhất Vasya có thể có được trên Olympiad.













đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: