Detalii evaluare #28361053

Rezumat problemă

#2205 permrep

Se consideră un cuvânt C format din litere mici, nu neapărat distincte. Să se afișeze în ordine lexicografică toate cuvintele distincte formate cu exact aceleași caractere ca și C.

Detalii

Problema permrep Operații I/O permrep.in/permrep.out
Limita timp 0.5 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #28361053 Utilizator Gavra Luca (gavra_luca)
Fișier permrep.cpp Dimensiune 1.45 KB
Data încărcării 03 Martie 2021, 11:36 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

permrep.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
 #include &lt;bits/stdc++.h&gt;

          ^
permrep.cpp:50:1: error: stray '\' in program
 fout &lt;&lt; &quot;\n&quot;;

 ^
permrep.cpp:9:1: error: 'ifstream' does not name a type
 ifstream fin(&quot;permrep.in&quot;);

 ^
permrep.cpp:9:20: error: 'permrep' does not name a type
 ifstream fin(&quot;permrep.in&quot;);

                    ^
permrep.cpp:9:36: error: expected unqualified-id before ')' token
 ifstream fin(&quot;permrep.in&quot;);

                                    ^
permrep.cpp:10:1: error: 'ofstream' does not name a type
 ofstream fout(&quot;permrep.out&quot;);

 ^
permrep.cpp:10:21: error: 'permrep' does not name a type
 ofstream fout(&quot;permrep.out&quot;);

                     ^
permrep.cpp:10:38: error: expected unqualified-id before ')' token
 ofstream fout(&quot;permrep.out&quot;);

                                      ^
permrep.cpp: In function 'void CitireMemorare()':
permrep.cpp:15:1: error: 'fin' was not declared in this scope
 fin &gt;&gt; cuv;

 ^
permrep.cpp:15:6: error: 'gt' was not declared in this scope
 fin &gt;&gt; cuv;

      ^
permrep.cpp:15:17: warning: statement has no effect [-Wunused-value]
 fin &gt;&gt; cuv;

                 ^
permrep.cpp:16:15: error: 'strlen' was not declared in this scope
 N = strlen(cuv);// // LUNGIMEA VECTORULUI INITIAL

               ^
permrep.cpp:21:16: error: 'lt' was not declared in this scope
 for (j = 1; j &lt;= n &amp;&amp; cuv[i] != lit[j]; j++)

                ^
permrep.cpp:21:19: error: expected primary-expression before '=' token
 for (j = 1; j &lt;= n &amp;&amp; cuv[i] != lit[j]; j++)

                   ^
permrep.cpp:21:24: error: 'amp' was not declared in this scope
 for (j = 1; j &lt;= n &amp;&amp; cuv[i] != lit[j]; j++)

                        ^
permrep.cpp:21:27: error: expected ')' before ';' token
 for (j = 1; j &lt;= n &amp;&amp; cuv[i] != lit[j]; j++)

                           ^
permrep.cpp:21:29: error: 'amp' was not declared in this scope
 for (j = 1; j &lt;= n &amp;&amp; cuv[i] != lit[j]; j++)

                             ^
permrep.cpp:21:41: warning: statement has no effect [-Wunused-value]
 for (j = 1; j &lt;= n &amp;&amp; cuv[i] != lit[j]; j++)

                                         ^
permrep.cpp:21:55: error: expected ';' before ')' token
 for (j = 1; j &lt;= n &amp;&amp; cuv[i] != lit[j]; j++)

                                                       ^
permrep.cpp:23:10: error: expected ')' before ';' token
 if (j &gt; n) /// cuv[i] nu apare in lit[]

          ^
permrep.cpp:23:13: error: expected ';' before ')' token
 if (j &gt; n) /// cuv[i] nu apare in lit[]

             ^
permrep.cpp:28:1: warning: statement has no effect [-Wunused-value]
 }

 ^
permrep.cpp:29:1: error: 'else' without a previous 'if'
 else nr[j]++;

 ^
permrep.cpp:32:16: error: 'lt' was not declared in this scope
 for (i = 1; i &lt; n; i++)

                ^
permrep.cpp:32:20: warning: for increment expression has no effect [-Wunused-value]
 for (i = 1; i &lt; n; i++)

                    ^
permrep.cpp:32:21: error: expected ')' before ';' token
 for (i = 1; i &lt; n; i++)

                     ^
permrep.cpp:32:26: error: expected ';' before ')' token
 for (i = 1; i &lt; n; i++)

                          ^
permrep.cpp:33:20: error: 'lt' was not declared in this scope
 for (j = i + 1; j &lt;= n; j++)

                    ^
permrep.cpp:33:23: error: expected primary-expression before '=' token
 for (j = i + 1; j &lt;= n; j++)

                       ^
permrep.cpp:33:31: error: expected ';' before ')' token
 for (j = i + 1; j &lt;= n; j++)

                               ^
permrep.cpp:34:23: error: expected ';' before ')' token
 if (lit[i] &gt; lit[j])

                       ^
permrep.cpp:34:22: warning: statement has no effect [-Wunused-value]
 if (lit[i] &gt; lit[j])

                      ^
permrep.cpp: In function 'void Afisare()':
permrep.cpp:48:20: error: 'lt' was not declared in this scope
 for (int i = 1; i &lt;= N; i++)

                    ^
permrep.cpp:48:23: error: expected primary-expression before '=' token
 for (int i = 1; i &lt;= N; i++)

                       ^
permrep.cpp:48:26: error: expected ')' before ';' token
 for (int i = 1; i &lt;= N; i++)

                          ^
permrep.cpp:48:28: error: 'i' was not declared in this scope
 for (int i = 1; i &lt;= N; i++)

                            ^
permrep.cpp:48:31: error: expected ';' before ')' token
 for (int i = 1; i &lt;= N; i++)

                               ^
permrep.cpp:49:11: error: 'lt' was not declared in this scope
 fout &lt;&lt; lit[st[i]];

           ^
permrep.cpp:50:1: error: 'fout' was not declared in this scope
 fout &lt;&lt; &quot;\n&quot;;

 ^
permrep.cpp:50:16: error: 'quot' was not declared in this scope
 fout &lt;&lt; &quot;\n&quot;;

                ^
permrep.cpp: In function 'void Back(int)':
permrep.cpp:56:25: error: 'lt' was not declared in this scope
 else for (int i = 1; i &lt;= n; i++)

                         ^
permrep.cpp:56:28: error: expected primary-expression before '=' token
 else for (int i = 1; i &lt;= n; i++)

                            ^
permrep.cpp:56:31: error: expected ')' before ';' token
 else for (int i = 1; i &lt;= n; i++)

                               ^
permrep.cpp:56:33: error: 'i' was not declared in this scope
 else for (int i = 1; i &lt;= n; i++)

                                 ^
permrep.cpp:56:36: error: expected ';' before ')' token
 else for (int i = 1; i &lt;= n; i++)

                                    ^
permrep.cpp:59:17: error: expected ';' before ')' token
 if (nr[i] &gt; 0)

                 ^
permrep.cpp:65:1: warning: statement has no effect [-Wunused-value]
 }

 ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema permrep face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.