दो फ़ाइलों को जोड़ें
दो फ़ाइलों में टेक्स्ट है। पहली फ़ाइल में सभी पंक्तियाँ क्रमांकित हैं, जैसा कि नीचे दिए उदाहरण में है:
1. Individuals and Interactions Over Processes and Tools
2. Working Software Over Comprehensive Documentation
3. Customer Collaboration Over Contract Negotiation
4. Responding to Change Over Following a Plan
दूसरी फ़ाइल में पंक्तियाँ एक के बाद एक हैं। आपको दूसरी फ़ाइल को पहली फ़ाइल में इस तरह जोड़ना है कि क्रमांकन जारी रहते हुए दूसरी फ़ाइल की पंक्तियाँ उसमें जुड़ जाएँ।
इनपुट में दो लाइनें हैं - पहली फ़ाइल का नाम और दूसरी फ़ाइल का नाम।
प्रोग्राम को फ़ाइलों को मर्ज करना चाहिए।
Input
doc.txt
second.txt
doc.txt
1. Individuals and Interactions Over Processes and Tools
2. Working Software Over Comprehensive Documentation
3. Customer Collaboration Over Contract Negotiation
4. Responding to Change Over Following a Plan
second.txt
Customer satisfaction through early and continuous software delivery
Accommodate changing requirements throughout the development process
Frequent delivery of working software
Collaboration between the business stakeholders and developers throughout the project
Support, trust, and motivate the people involved
Enable face-to-face interactions
Working software is the primary measure of progress
Agile processes to support a consistent development pace
Attention to technical detail and design enhances agility
Simplicity
Self-organizing teams encourage great architectures, requirements, and designs
Regular reflections on how to become more effective
Resulting doc.txt
1. Individuals and Interactions Over Processes and Tools
2. Working Software Over Comprehensive Documentation
3. Customer Collaboration Over Contract Negotiation
4. Responding to Change Over Following a Plan
5. Customer satisfaction through early and continuous software delivery
6. Accommodate changing requirements throughout the development process
7. Frequent delivery of working software
8. Collaboration between the business stakeholders and developers throughout the project
9. Support, trust, and motivate the people involved
10. Enable face-to-face interactions
11. Working software is the primary measure of progress
12. Agile processes to support a consistent development pace
13. Attention to technical detail and design enhances agility
14. Simplicity
15. Self-organizing teams encourage great architectures, requirements, and designs
16. Regular reflections on how to become more effective
ध्यान दें कि फ़ाइल के नाम इनपुट में प्रदान किए गए हैं और हमेशा
doc.txt
या second.txt
नहीं होंगे।Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB