#1443
control2
Citind greutăţile unor cutii, să se determine numărul de control după o regulă precizată şi să se verifice dacă este număr prim.
Problema | control2 | Operații I/O |
control2.in /control2.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49279764 | Utilizator | |
Fișier | control2.cpp | Dimensiune | 2.19 KB |
Data încărcării | 23 Februarie 2024, 16:28 | Scor / rezultat | Eroare de compilare |
control2.cpp:41:6: error: stray '#' in program }#include<bits/stdc.h> ^ control2.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream fout("control2.out") ^ control2.cpp: In function 'int main()': control2.cpp:25:10: error: 'n' was not declared in this scope fin>>n; ^ control2.cpp:27:16: error: 'v' was not declared in this scope fin >> v[i] ^ control2.cpp:28:5: error: expected ';' before '}' token } ^ control2.cpp:29:10: error: 'v' was not declared in this scope sort(v+1, v + n + 1); ^ control2.cpp:31:9: error: 'f' was not declared in this scope f[v[i]] ++; ^ control2.cpp:34:12: error: 'f' was not declared in this scope if(f[i] > 0) { ^ control2.cpp:35:13: error: 'k' was not declared in this scope k++; ^ control2.cpp:36:13: error: 'arr' was not declared in this scope arr[k] = f[i]; ^ control2.cpp:39:12: error: 'k' was not declared in this scope while (k%3==1) { ^ control2.cpp:41:7: error: 'include' was not declared in this scope }#include<bits/stdc.h> ^ control2.cpp:41:15: error: 'bits' was not declared in this scope }#include<bits/stdc.h> ^ control2.cpp:41:20: error: 'stdc' was not declared in this scope }#include<bits/stdc.h> ^ control2.cpp:42:1: error: expected primary-expression before 'using' using namespace std; ^ control2.cpp:42:1: error: expected ';' before 'using' control2.cpp:44:1: error: expected ',' or ';' before 'ofstream' ofstream fout("control2.out") ^ control2.cpp:47:1: error: a function-definition is not allowed here before '{' token { ^ control2.cpp:116:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema control2 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
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ă.