<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=0551_-_Elevi</id>
	<title>0551 - Elevi - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=0551_-_Elevi"/>
	<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0551_-_Elevi&amp;action=history"/>
	<updated>2026-05-01T08:16:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=0551_-_Elevi&amp;diff=4513&amp;oldid=prev</id>
		<title>Csatari Mălina at 12:04, 26 April 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0551_-_Elevi&amp;diff=4513&amp;oldid=prev"/>
		<updated>2023-04-26T12:04:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:04, 26 April 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# 0551&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# 0551&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;def citire_cu_restrictii_m_n(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;):&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;def citire_cu_restrictii_m_n(m, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;n&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    n, &lt;/del&gt;m &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= map(int&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;input().split()&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     if n &amp;lt; 1 or n &amp;gt; 1000:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     if n &amp;lt; 1 or n &amp;gt; 1000:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         print(&amp;quot;Datele nu corespund restricțiilor impuse.&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         print(&amp;quot;Datele nu corespund restricțiilor impuse.&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l44&quot;&gt;Line 44:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         print(&amp;quot;Datele nu corespund restricțiilor impuse.&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         print(&amp;quot;Datele nu corespund restricțiilor impuse.&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         exit()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         exit()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    return m, n&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l76&quot;&gt;Line 76:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if __name__ == &amp;#039;__main__&amp;#039;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if __name__ == &amp;#039;__main__&amp;#039;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     m, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;n = &lt;/del&gt;citire_cu_restrictii_m_n()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;n, &lt;/ins&gt;m &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= map(int&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;input().split())&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    &lt;/ins&gt;citire_cu_restrictii_m_n(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;m, n&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     prelucrare_max_cnt(m, n)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     prelucrare_max_cnt(m, n)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l93&quot;&gt;Line 93:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 92:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Explicație rezolvare==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Explicație rezolvare==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: &lt;/del&gt;Acest cod definește trei funcții și &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;un bloc &lt;/del&gt;if __name__ == &#039;__main__&#039;: care apelează aceste funcții în &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;funcție de anumite condiții. Iată un rezumat al fiecărei funcții:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    &lt;/ins&gt;Acest cod definește trei funcții și &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;o secțiune &#039;&#039;&#039;&lt;/ins&gt;if __name__ == &#039;__main__&#039;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;(linia 40) &lt;/ins&gt;care apelează aceste funcții &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;după citirea numerelor n și m cu ajutorul comenzii de citire input() și cea de conversie &lt;/ins&gt;în &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;număr int() (linia 41)&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;   Funcția &lt;/ins&gt;&#039;&#039;&#039;citire_cu_restrictii_m_n(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;m, n&lt;/ins&gt;)&#039;&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;primește doi parametri, m și n, &lt;/ins&gt;și verifică dacă &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aceștia îndeplinesc restricțiile impuse&lt;/ins&gt;. Dacă &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;n nu este între 1 și 1000 sau m nu este între 1 și 100&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se afișează &quot;Datele nu corespund restricțiilor impuse.&quot; &lt;/ins&gt;și &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se încheie &lt;/ins&gt;programul prin &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;apelul &lt;/ins&gt;funcției exit().&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;   Funcția &lt;/ins&gt;&#039;&#039;&#039;verificare_vectori_conform_restrictiilor(vector)&#039;&#039;&#039; primește un vector &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;de numere &lt;/ins&gt;și verifică dacă &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;acestea îndeplinesc restricțiile &lt;/ins&gt;impuse. Dacă &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;un element din vector este mai mare decât 1000000 sau mai mic decât 1&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se afișează &quot;Datele nu corespund restricțiilor impuse.&quot; &lt;/ins&gt;și &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se încheie &lt;/ins&gt;programul prin &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;apelul &lt;/ins&gt;funcției exit().&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;   Funcția &lt;/ins&gt;&#039;&#039;&#039;prelucrare_max_cnt(m, n)&#039;&#039;&#039; primește doi parametri, m și n, și &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;efectuează o prelucrare &lt;/ins&gt;de &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;date&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Se creează un vector gol de lungime 1001 cu vector = [0] * 1001. Apoi se citește &lt;/ins&gt;n &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;linii &lt;/ins&gt;de &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;input, fiecare conținând &lt;/ins&gt;m &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;numere separate prin spațiu, &lt;/ins&gt;și &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se stochează în vector. Pentru fiecare linie, se găsește cel mai mare element &lt;/ins&gt;din &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;acea linie și se compară cu maximul global (MAX)&lt;/ins&gt;. Dacă &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;acesta &lt;/ins&gt;este mai mare decât &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;maximul global curent&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se actualizează maximul global &lt;/ins&gt;și &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se resetează &lt;/ins&gt;contorul &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(CNT) la 1&lt;/ins&gt;. Dacă este &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;egal &lt;/ins&gt;cu &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;maximul global curent&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se incrementează &lt;/ins&gt;contorul. La final, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;se afișează &quot;Datele sunt introduse corect&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; &lt;/ins&gt;și &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pe un rând nou MAX &lt;/ins&gt;și &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;CNT&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;conform problemei&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/del&gt;. &#039;&#039;&#039;citire_cu_restrictii_m_n()&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: Această funcție cere utilizatorului să introducă două numere întregi separate prin spațiu &lt;/del&gt;și verifică dacă &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;acestea corespund anumitor restricții&lt;/del&gt;. Dacă &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;valorile introduse sunt în afara acestor restricții&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;funcția va afișa un mesaj de eroare &lt;/del&gt;și &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;va încheia &lt;/del&gt;programul prin &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;apelarea &lt;/del&gt;funcției exit(). &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;În caz contrar, funcția va returna cele două valori ca o tuplă.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2. &lt;/del&gt;&#039;&#039;&#039;verificare_vectori_conform_restrictiilor(vector)&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: Această funcție &lt;/del&gt;primește un vector &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ca parametru &lt;/del&gt;și verifică dacă &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;valorile acestuia corespund unor restricții &lt;/del&gt;impuse. Dacă &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;valorile sunt în afara acestor restricții&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;funcția va afișa un mesaj de eroare &lt;/del&gt;și &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;va încheia &lt;/del&gt;programul prin &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;apelarea &lt;/del&gt;funcției exit().&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3. &lt;/del&gt;&#039;&#039;&#039;prelucrare_max_cnt(m, n)&#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: Această funcție &lt;/del&gt;primește doi parametri, m și n, și &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;prelucrează datele introduse &lt;/del&gt;de &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;utilizator&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Funcția va citi &lt;/del&gt;n &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vectori &lt;/del&gt;de &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lungime &lt;/del&gt;m &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;de la tastatură &lt;/del&gt;și &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;va găsi valoarea maximă &lt;/del&gt;din &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fiecare vector&lt;/del&gt;. Dacă &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;valoarea maximă a unui vector &lt;/del&gt;este mai mare decât &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;valoarea maximă găsită până atunci&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;funcția va actualiza această valoare maximă &lt;/del&gt;și &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;va reseta &lt;/del&gt;contorul. Dacă &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;valoarea maximă &lt;/del&gt;este &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aceeași &lt;/del&gt;cu &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;valoarea maximă găsită anterior&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;funcția va incrementa &lt;/del&gt;contorul. La final, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;funcția va afișa un mesaj de confirmare și valorile maxime și contorul calculat&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Funcția &#039;&#039;&#039;citire_cu_restrictii_m_n()&#039;&#039;&#039; este apelată în blocul if __name__ == &#039;__main__&#039;: pentru a citi valorile m &lt;/del&gt;și &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;n &lt;/del&gt;și &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pentru a verifica dacă acestea corespund restricțiilor. Dacă valorile sunt corecte&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;funcția &#039;&#039;&#039;prelucrare_max_cnt()&#039;&#039;&#039; este apelată pentru a prelucra datele introduse&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Csatari Mălina</name></author>
	</entry>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=0551_-_Elevi&amp;diff=2026&amp;oldid=prev</id>
		<title>Nagy Lenard at 14:35, 31 March 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0551_-_Elevi&amp;diff=2026&amp;oldid=prev"/>
		<updated>2023-03-31T14:35:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:35, 31 March 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l25&quot;&gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Ieșire&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Ieșire&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;: Datele sunt introduse corect.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;: Datele sunt introduse corect.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;: &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;25 25 15 15&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;6 3&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Exemplul 2===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Exemplul 2===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Intrare&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Intrare&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nagy Lenard</name></author>
	</entry>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=0551_-_Elevi&amp;diff=2017&amp;oldid=prev</id>
		<title>Csatari Mălina: Pagină nouă: Sursa: https://www.pbinfo.ro/probleme/551/elevi 0551- Elevi] ---- == Cerinţa == La liceul nostru sunt &#039;&#039;&#039;m&#039;&#039;&#039; clase, fiecare având &#039;&#039;&#039;n&#039;&#039;&#039; elevi. Pentru fiecare elev se cunoaşte talentul artistic, exprimat printr-un număr natural. Să se determine cea mai mare valoare pe care o are talentul artistic al elevilor, notată cu &#039;&#039;&#039;MAX&#039;&#039;&#039; şi numărul &#039;&#039;&#039;CNT&#039;&#039;&#039; de clase din liceu în care există elevi care au talent maxim. == Date de intrare == Programul citește de la tastatu...</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0551_-_Elevi&amp;diff=2017&amp;oldid=prev"/>
		<updated>2023-03-31T13:03:38Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: Sursa: https://www.pbinfo.ro/probleme/551/elevi 0551- Elevi] ---- == Cerinţa == La liceul nostru sunt &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039; clase, fiecare având &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; elevi. Pentru fiecare elev se cunoaşte talentul artistic, exprimat printr-un număr natural. Să se determine cea mai mare valoare pe care o are talentul artistic al elevilor, notată cu &amp;#039;&amp;#039;&amp;#039;MAX&amp;#039;&amp;#039;&amp;#039; şi numărul &amp;#039;&amp;#039;&amp;#039;CNT&amp;#039;&amp;#039;&amp;#039; de clase din liceu în care există elevi care au talent maxim. == Date de intrare == Programul citește de la tastatu...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sursa: https://www.pbinfo.ro/probleme/551/elevi 0551- Elevi]&lt;br /&gt;
----&lt;br /&gt;
== Cerinţa ==&lt;br /&gt;
La liceul nostru sunt &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039; clase, fiecare având &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; elevi. Pentru fiecare elev se cunoaşte talentul artistic, exprimat printr-un număr natural. Să se determine cea mai mare valoare pe care o are talentul artistic al elevilor, notată cu &amp;#039;&amp;#039;&amp;#039;MAX&amp;#039;&amp;#039;&amp;#039; şi numărul &amp;#039;&amp;#039;&amp;#039;CNT&amp;#039;&amp;#039;&amp;#039; de clase din liceu în care există elevi care au talent maxim.&lt;br /&gt;
== Date de intrare ==&lt;br /&gt;
Programul citește de la tastatură numerele &amp;#039;&amp;#039;&amp;#039;m n&amp;#039;&amp;#039;&amp;#039;, iar apoi &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039; şiruri cu câte &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; numere naturale, reprezentând talentul fiecărui elev din fiecare clasă.&lt;br /&gt;
== Date de ieșire == &lt;br /&gt;
Dacă datele sunt introduse corect, pe ecran se va afișa: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;quot;Datele sunt introduse corect.&amp;quot;&amp;#039;&amp;#039;&amp;#039;, apoi pe un rând nou va afișa numerele MAX CNT, separate prin exact un spaţiu, cu semnificaţia precizată. În cazul în care datele nu respectă restricțiile, se va afișa pe ecran: &amp;#039;&amp;#039;&amp;#039;&amp;quot;Datele nu corespund restricțiilor impuse.&amp;quot;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Restricţii şi precizări ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039; &amp;amp;les; &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; &amp;amp;les; &amp;#039;&amp;#039;&amp;#039;1000&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039; &amp;amp;les; &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039; &amp;amp;les; &amp;#039;&amp;#039;&amp;#039;100&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* talentul artistic al unui elev este un număr natural mai mic decât &amp;#039;&amp;#039;&amp;#039;1.000.000&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Exemple ==&lt;br /&gt;
===Exemplul 1===&lt;br /&gt;
; Intrare&lt;br /&gt;
: 5 4&lt;br /&gt;
: 1 5 3 5 &lt;br /&gt;
: 4 4 6 1 &lt;br /&gt;
: 6 3 6 2 &lt;br /&gt;
: 1 4 1 4 &lt;br /&gt;
: 6 5 6 2 &lt;br /&gt;
; Ieșire&lt;br /&gt;
: Datele sunt introduse corect.&lt;br /&gt;
: 25 25 15 15&lt;br /&gt;
===Exemplul 2===&lt;br /&gt;
; Intrare&lt;br /&gt;
: -1 12&lt;br /&gt;
; Ieșire&lt;br /&gt;
: Datele nu corespund restricțiilor impuse.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Rezolvare == &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
# 0551&lt;br /&gt;
&lt;br /&gt;
def citire_cu_restrictii_m_n():&lt;br /&gt;
    n, m = map(int, input().split())&lt;br /&gt;
    if n &amp;lt; 1 or n &amp;gt; 1000:&lt;br /&gt;
        print(&amp;quot;Datele nu corespund restricțiilor impuse.&amp;quot;)&lt;br /&gt;
        exit()&lt;br /&gt;
    if m &amp;lt; 1 or m &amp;gt; 100:&lt;br /&gt;
        print(&amp;quot;Datele nu corespund restricțiilor impuse.&amp;quot;)&lt;br /&gt;
        exit()&lt;br /&gt;
    return m, n&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def verificare_vectori_conform_restrictiilor(vector):&lt;br /&gt;
    for element in vector:&lt;br /&gt;
        if element &amp;gt; 1000000 or element &amp;lt; 1:&lt;br /&gt;
            print(&amp;quot;Datele nu corespund restricțiilor impuse.&amp;quot;)&lt;br /&gt;
            exit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def prelucrare_max_cnt(m, n):&lt;br /&gt;
    vector = [0] * 1001&lt;br /&gt;
    MAX, CNT = -1, 0&lt;br /&gt;
    for k in range(1, n+1):&lt;br /&gt;
        vector = list(map(int, input().split()))&lt;br /&gt;
&lt;br /&gt;
        cmaxim = vector[0]&lt;br /&gt;
&lt;br /&gt;
        for i in range(m):&lt;br /&gt;
            if vector[i] &amp;gt; cmaxim:&lt;br /&gt;
                cmaxim = vector[i]&lt;br /&gt;
&lt;br /&gt;
        if cmaxim &amp;gt; MAX:&lt;br /&gt;
            MAX = cmaxim&lt;br /&gt;
            CNT = 1&lt;br /&gt;
        elif cmaxim == MAX:&lt;br /&gt;
            CNT += 1&lt;br /&gt;
    print(&amp;quot;Datele sunt introduse corect.&amp;quot;)&lt;br /&gt;
    print(MAX, CNT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
    m, n = citire_cu_restrictii_m_n()&lt;br /&gt;
    prelucrare_max_cnt(m, n)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Explicație rezolvare==&lt;br /&gt;
: Acest cod definește trei funcții și un bloc if __name__ == &amp;#039;__main__&amp;#039;: care apelează aceste funcții în funcție de anumite condiții. Iată un rezumat al fiecărei funcții:&lt;br /&gt;
&lt;br /&gt;
1. &amp;#039;&amp;#039;&amp;#039;citire_cu_restrictii_m_n()&amp;#039;&amp;#039;&amp;#039;: Această funcție cere utilizatorului să introducă două numere întregi separate prin spațiu și verifică dacă acestea corespund anumitor restricții. Dacă valorile introduse sunt în afara acestor restricții, funcția va afișa un mesaj de eroare și va încheia programul prin apelarea funcției exit(). În caz contrar, funcția va returna cele două valori ca o tuplă.&lt;br /&gt;
&lt;br /&gt;
2. &amp;#039;&amp;#039;&amp;#039;verificare_vectori_conform_restrictiilor(vector)&amp;#039;&amp;#039;&amp;#039;: Această funcție primește un vector ca parametru și verifică dacă valorile acestuia corespund unor restricții impuse. Dacă valorile sunt în afara acestor restricții, funcția va afișa un mesaj de eroare și va încheia programul prin apelarea funcției exit().&lt;br /&gt;
&lt;br /&gt;
3. &amp;#039;&amp;#039;&amp;#039;prelucrare_max_cnt(m, n)&amp;#039;&amp;#039;&amp;#039;: Această funcție primește doi parametri, m și n, și prelucrează datele introduse de utilizator. Funcția va citi n vectori de lungime m de la tastatură și va găsi valoarea maximă din fiecare vector. Dacă valoarea maximă a unui vector este mai mare decât valoarea maximă găsită până atunci, funcția va actualiza această valoare maximă și va reseta contorul. Dacă valoarea maximă este aceeași cu valoarea maximă găsită anterior, funcția va incrementa contorul. La final, funcția va afișa un mesaj de confirmare și valorile maxime și contorul calculat.&lt;br /&gt;
&lt;br /&gt;
Funcția &amp;#039;&amp;#039;&amp;#039;citire_cu_restrictii_m_n()&amp;#039;&amp;#039;&amp;#039; este apelată în blocul if __name__ == &amp;#039;__main__&amp;#039;: pentru a citi valorile m și n și pentru a verifica dacă acestea corespund restricțiilor. Dacă valorile sunt corecte, funcția &amp;#039;&amp;#039;&amp;#039;prelucrare_max_cnt()&amp;#039;&amp;#039;&amp;#039; este apelată pentru a prelucra datele introduse.&lt;/div&gt;</summary>
		<author><name>Csatari Mălina</name></author>
	</entry>
</feed>