दिया गया है, 5 गुना 5 क्षेत्रों के अधिकतम आकार के साथ एक चर आकार का बोर्ड। हर क्षेत्र कन्न एक 'x' से भर जाता है। यदि यह 'x' से नहीं भरा है, तो यह 'o' से भरा है।
प्रत्येक बोर्ड की प्रारंभिक स्थिति दी गई है (नीचे देखें)। प्रत्येक बोर्ड के साथ, 10 राउंड खेले जाने हैं (अधिकतम पर, स्थितियां: नीचे देखें) और एक्स के विकास को देखा जाना चाहिए।
एक राउंड निम्न तरीके से काम करता है:
- प्रत्येक 'x' ऑर्थोगोननलली बॉर्डरिंग फील्ड्स में फैलता है, लेकिन खुद ही गायब हो जाता है
- हर बार जब दो 'x' एक फ़ील्ड पर होते हैं, तो वे एक दूसरे को बेअसर करते हैं
प्रत्येक दौर में सभी 'x' का विकास एक साथ होना है। उदाहरण:
o o o o x o
o x o -> x o x
o o o o x o
विकास के प्रत्येक दौर के साथ, आपको यह देखना होगा कि क्या बोर्ड 'x' से खाली हो जाता है। क्या यह खाली नहीं है, एक दोहराव वाला पैटर्न मौजूद हो सकता है। यदि यह भी मामला नहीं है, तो हम विकास के विश्लेषण को छोड़ देते हैं। इसके अतिरिक्त आपको प्रत्येक शुरुआती बोर्ड के लिए एक्स फ़ील्ड का अधिकतम प्रतिशत प्रिंट करना होगा (पूरी संख्याओं तक नीचे)।
इनपुट:
इनपुट डेटा यहां पाया जा सकता है (पास्टबीन) इस डेटा में 100 शुरुआती राज्य हैं। जैसा कि पहले ही उल्लेख किया गया है, बोर्ड आकार में भिन्न होते हैं। पंक्तियों की संख्या 1 से 5 तक संख्या n के साथ बताई गई है, इसके बाद n पंक्तियाँ जिनमें केवल 'x' और 'o' हैं, प्रारंभिक पैटर्न को दर्शाती हैं। एक बोर्ड की प्रत्येक पंक्ति में 1 से 5 फ़ील्ड होते हैं।
आउटपुट:
पूरा परिणाम बाहर मुद्रित किया जाना चाहिए, निम्नलिखित रूप में प्रत्येक शुरुआती बोर्ड के लिए एक मुद्रित पंक्ति:
Round {0-10}: {repetition/empty/giveup}, {0-100} percent maximum-fill
उदाहरण:
उदाहरण 1:
Input: 2 Starting state: x o x
xox x x
xx
Round 1: x x o
o x
Round 2: x o x
o x
Round 3: o x o
o o
Round 4: x o x -> The pattern repeats:
o x It is the same as in round 2,
therefore we stop. Maximum fill was
in the starting state with four times 'x'
of 5 fields altogether,
so we have 4/5 = 80 %.
Output: Round 4: repetition, 80 percent maximum-fill
उदाहरण 2:
Input: 1 Starting state: x x
xx
Round 1: x x -> We already have a repetition, because
the pattern is the same as in the starting
state. The board is always filled 100 %.
Output: Round 1: repetition, 100 percent maximum-fill
आठ दिन के बाद, मैं विजेता के रूप में सबसे कम पात्रों के साथ काम करने के उत्तर को चिह्नित करूंगा। इसके अतिरिक्त मैं 100 शुरुआती बोर्ड (इनपुट) के लिए सही आउटपुट पोस्ट करूंगा।
आप अपनी पसंद की (प्रोग्रामिंग / स्क्रिप्टिंग / जो भी) भाषा का उपयोग कर सकते हैं।
मज़े करो!
पुनश्च: यदि आपके कोई प्रश्न हैं, तो बेझिझक पूछें।
PPS: मूल रचनाकारों के संबंध में: जर्मन बोलने में सक्षम लोगों के लिए, यह प्रश्न यहां से नहीं लिया गया है कि क्या आप यहां नहीं गए हैं । चूंकि चुनौती को पूरा करने का आधिकारिक समय समाप्त हो गया है, मैं देखना चाहता था कि क्या कोई छोटा और सुरुचिपूर्ण समाधान निकाल सकता है।
22.04.2014:
चुनौती दी! विजेता के रूप में चिह्नित। सही आउटपुट:
Round 10: giveup, 50 percent maximum-fill
Round 5: empty, 66 percent maximum-fill
Round 1: repetition, 100 percent maximum-fill
Round 1: empty, 100 percent maximum-fill
Round 4: repetition, 100 percent maximum-fill
Round 4: repetition, 70 percent maximum-fill
Round 2: repetition, 60 percent maximum-fill
Round 4: empty, 88 percent maximum-fill
Round 10: giveup, 50 percent maximum-fill
Round 5: repetition, 80 percent maximum-fill
Round 10: repetition, 80 percent maximum-fill
Round 1: empty, 80 percent maximum-fill
Round 3: repetition, 60 percent maximum-fill
Round 4: repetition, 48 percent maximum-fill
Round 9: empty, 41 percent maximum-fill
Round 10: giveup, 92 percent maximum-fill
Round 10: giveup, 53 percent maximum-fill
Round 10: giveup, 66 percent maximum-fill
Round 6: repetition, 50 percent maximum-fill
Round 10: giveup, 88 percent maximum-fill
Round 10: giveup, 76 percent maximum-fill
Round 10: giveup, 68 percent maximum-fill
Round 10: giveup, 40 percent maximum-fill
Round 10: giveup, 100 percent maximum-fill
Round 10: giveup, 71 percent maximum-fill
Round 2: empty, 81 percent maximum-fill
Round 6: repetition, 36 percent maximum-fill
Round 10: giveup, 61 percent maximum-fill
Round 10: giveup, 60 percent maximum-fill
Round 4: repetition, 66 percent maximum-fill
Round 10: giveup, 72 percent maximum-fill
Round 3: empty, 80 percent maximum-fill
Round 10: giveup, 50 percent maximum-fill
Round 10: giveup, 83 percent maximum-fill
Round 7: repetition, 37 percent maximum-fill
Round 9: repetition, 85 percent maximum-fill
Round 5: repetition, 40 percent maximum-fill
Round 5: repetition, 60 percent maximum-fill
Round 4: empty, 80 percent maximum-fill
Round 10: giveup, 60 percent maximum-fill
Round 4: repetition, 46 percent maximum-fill
Round 6: repetition, 42 percent maximum-fill
Round 10: giveup, 72 percent maximum-fill
Round 4: repetition, 70 percent maximum-fill
Round 4: repetition, 80 percent maximum-fill
Round 6: repetition, 50 percent maximum-fill
Round 4: repetition, 56 percent maximum-fill
Round 10: giveup, 60 percent maximum-fill
Round 10: giveup, 54 percent maximum-fill
Round 10: giveup, 66 percent maximum-fill
Round 2: repetition, 40 percent maximum-fill
Round 2: repetition, 40 percent maximum-fill
Round 6: repetition, 75 percent maximum-fill
Round 7: empty, 85 percent maximum-fill
Round 10: giveup, 50 percent maximum-fill
Round 6: repetition, 70 percent maximum-fill
Round 2: empty, 66 percent maximum-fill
Round 1: empty, 66 percent maximum-fill
Round 3: empty, 100 percent maximum-fill
Round 3: empty, 66 percent maximum-fill
Round 8: repetition, 42 percent maximum-fill
Round 1: empty, 60 percent maximum-fill
Round 2: repetition, 100 percent maximum-fill
Round 2: repetition, 83 percent maximum-fill
Round 4: repetition, 66 percent maximum-fill
Round 6: repetition, 75 percent maximum-fill
Round 4: empty, 66 percent maximum-fill
Round 10: giveup, 61 percent maximum-fill
Round 10: giveup, 56 percent maximum-fill
Round 4: empty, 66 percent maximum-fill
Round 6: repetition, 33 percent maximum-fill
Round 3: empty, 57 percent maximum-fill
Round 3: repetition, 100 percent maximum-fill
Round 6: repetition, 73 percent maximum-fill
Round 10: giveup, 50 percent maximum-fill
Round 6: repetition, 50 percent maximum-fill
Round 10: giveup, 73 percent maximum-fill
Round 5: empty, 80 percent maximum-fill
Round 10: giveup, 61 percent maximum-fill
Round 3: repetition, 53 percent maximum-fill
Round 10: giveup, 33 percent maximum-fill
Round 10: giveup, 80 percent maximum-fill
Round 10: giveup, 63 percent maximum-fill
Round 10: giveup, 70 percent maximum-fill
Round 10: giveup, 84 percent maximum-fill
Round 7: repetition, 70 percent maximum-fill
Round 10: repetition, 57 percent maximum-fill
Round 10: giveup, 55 percent maximum-fill
Round 6: repetition, 36 percent maximum-fill
Round 4: repetition, 75 percent maximum-fill
Round 10: giveup, 72 percent maximum-fill
Round 10: giveup, 64 percent maximum-fill
Round 10: giveup, 84 percent maximum-fill
Round 10: giveup, 58 percent maximum-fill
Round 10: giveup, 60 percent maximum-fill
Round 10: giveup, 53 percent maximum-fill
Round 4: repetition, 40 percent maximum-fill
Round 4: empty, 40 percent maximum-fill
Round 10: giveup, 50 percent maximum-fill
Round 10: giveup, 68 percent maximum-fill