निम्नलिखित मापदंडों को देखते हुए, एक ASCII ग्रिड जो रम्बी से बना है, उत्पन्न करने के लिए बाइट काउंट द्वारा मापा गया सबसे छोटा कोड लिखें:
- m - एक पंक्ति में पूर्ण rhombi की संख्या
- n - पंक्तियों की संख्या
- s - सबसे छोटे रोम्बस का किनारा
- आर - नेस्टिंग का स्तर - "बेस वाले" के अंदर कितने आरओबी होते हैं (जो ग्रिड के चौराहों के बीच फंउड होते हैं)
उदाहरण
1. Input: 5 3 1 0
Output:
/\/\/\/\/\
\/\/\/\/\/
/\/\/\/\/\
\/\/\/\/\/
/\/\/\/\/\
\/\/\/\/\/
A 5x3 grid of rhombi with side 1, no nesting
2. Input: 3 2 2 0
Output:
/\ /\ /\
/ \/ \/ \
\ /\ /\ /
\/ \/ \/
/\ /\ /\
/ \/ \/ \
\ /\ /\ /
\/ \/ \/
A 3x2 grid of rhombi with side 2, no nesting
3. Input: 5 2 1 2
Output:
///\\\///\\\///\\\///\\\///\\\
///\\\///\\\///\\\///\\\///\\\
///\\\///\\\///\\\///\\\///\\\
\\\///\\\///\\\///\\\///\\\///
\\\///\\\///\\\///\\\///\\\///
\\\///\\\///\\\///\\\///\\\///
///\\\///\\\///\\\///\\\///\\\
///\\\///\\\///\\\///\\\///\\\
///\\\///\\\///\\\///\\\///\\\
\\\///\\\///\\\///\\\///\\\///
\\\///\\\///\\\///\\\///\\\///
\\\///\\\///\\\///\\\///\\\///
A 5x2 grid of rhombi with side 1 (the smallest rhombus), level of nesting is 2
4. Input: 4 2 2 1
Output:
//\\ //\\ //\\ //\\
///\\\///\\\///\\\///\\\
// \\// \\// \\// \\
\\ //\\ //\\ //\\ //
\\\///\\\///\\\///\\\///
\\// \\// \\// \\//
//\\ //\\ //\\ //\\
///\\\///\\\///\\\///\\\
// \\// \\// \\// \\
\\ //\\ //\\ //\\ //
\\\///\\\///\\\///\\\///
\\// \\// \\// \\//
A 4x2 grid of rhombi with side 2 with level of nesting 1
5. Input: 4 2 3 3
Output:
////\\\\ ////\\\\ ////\\\\ ////\\\\
/////\\\\\ /////\\\\\ /////\\\\\ /////\\\\\
//////\\\\\\//////\\\\\\//////\\\\\\//////\\\\\\
//////\\\\\\//////\\\\\\//////\\\\\\//////\\\\\\
///// \\\\\///// \\\\\///// \\\\\///// \\\\\
//// \\\\//// \\\\//// \\\\//// \\\\
\\\\ ////\\\\ ////\\\\ ////\\\\ ////
\\\\\ /////\\\\\ /////\\\\\ /////\\\\\ /////
\\\\\\//////\\\\\\//////\\\\\\//////\\\\\\//////
\\\\\\//////\\\\\\//////\\\\\\//////\\\\\\//////
\\\\\///// \\\\\///// \\\\\///// \\\\\/////
\\\\//// \\\\//// \\\\//// \\\\////
////\\\\ ////\\\\ ////\\\\ ////\\\\
/////\\\\\ /////\\\\\ /////\\\\\ /////\\\\\
//////\\\\\\//////\\\\\\//////\\\\\\//////\\\\\\
//////\\\\\\//////\\\\\\//////\\\\\\//////\\\\\\
///// \\\\\///// \\\\\///// \\\\\///// \\\\\
//// \\\\//// \\\\//// \\\\//// \\\\
\\\\ ////\\\\ ////\\\\ ////\\\\ ////
\\\\\ /////\\\\\ /////\\\\\ /////\\\\\ /////
\\\\\\//////\\\\\\//////\\\\\\//////\\\\\\//////
\\\\\\//////\\\\\\//////\\\\\\//////\\\\\\//////
\\\\\///// \\\\\///// \\\\\///// \\\\\/////
\\\\//// \\\\//// \\\\//// \\\\////
A 4x2 grid of rhombi with side 3, level of nesting 3
जहां आवश्यक हो, किनारों और कोनों पर आंशिक रूप से दिखाई देने वाली रम्बी प्रदर्शित करना सुनिश्चित करें।