เขียนโค้ดที่สั้นที่สุดที่วัดได้ด้วยจำนวนไบต์เพื่อสร้างตาราง ASCII ที่ประกอบด้วย rhombi โดยกำหนดพารามิเตอร์ต่อไปนี้:
- m - จำนวน rhombi สมบูรณ์ในหนึ่งแถว
- n - จำนวนแถว
- s - ด้านของรูปสี่เหลี่ยมขนมเปียกปูนที่เล็กที่สุด
- r - ระดับของการทำรัง - มีกี่รอมบิที่อยู่ใน "ฐานคน" (ซึ่งเป็นฟอนต์ระหว่างจุดตัดของตาราง)
ตัวอย่าง
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
ให้แน่ใจว่าได้แสดงรูปสี่เหลี่ยมขนมเปียกปูนที่มองเห็นได้บางส่วนที่ขอบและมุมที่จำเป็น