#2081
Se citesc numere până când nu mai este niciun număr de citit. Se cere să se afișeze valoarea maximă dintre acestea.
Problema | Parsare | Operații I/O |
![]() parsare.in /parsare.out
|
---|---|---|---|
Limita timp | 0.7 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57570717 | Utilizator | |
Fișier | parsare.cpp | Dimensiune | 1.26 KB |
Data încărcării | 05 Aprilie 2025, 12:18 | Scor / rezultat | Eroare de compilare |
parsare.cpp:1:9: error: #include expects "FILENAME" or <FILENAME> #include<fstream> ^ parsare.cpp:16:1: error: stray '\310' in program Pentru a obține cele 100 puncte trebuie folosită metoda parsării datelor de intrare: ^ parsare.cpp:16:1: error: stray '\233' in program parsare.cpp:16:1: error: stray '\304' in program parsare.cpp:16:1: error: stray '\203' in program parsare.cpp:16:1: error: stray '\304' in program parsare.cpp:16:1: error: stray '\203' in program parsare.cpp:17:10: error: #include expects "FILENAME" or <FILENAME> #include <bits/stdc++.h> ^ parsare.cpp:29:11: error: stray '#' in program if (c == '-') ^ parsare.cpp:29:17: error: stray '#' in program if (c == '-') ^ parsare.cpp:34:12: error: stray '#' in program if (c>='0' && c<='9') ^ parsare.cpp:34:18: error: stray '#' in program if (c>='0' && c<='9') ^ parsare.cpp:34:41: error: stray '#' in program if (c>='0' && c<='9') ^ parsare.cpp:34:47: error: stray '#' in program if (c>='0' && c<='9') ^ parsare.cpp:36:16: error: stray '#' in program raspuns = c - '0'; ^ parsare.cpp:36:22: error: stray '#' in program raspuns = c - '0'; ^ parsare.cpp:44:11: error: stray '#' in program if (c<'0' || c>'9') break; ^ parsare.cpp:44:17: error: stray '#' in program if (c<'0' || c>'9') break; ^ parsare.cpp:44:31: error: stray '#' in program if (c<'0' || c>'9') break; ^ parsare.cpp:44:37: error: stray '#' in program if (c<'0' || c>'9') break; ^ parsare.cpp:45:27: error: stray '#' in program raspuns = 10*raspuns + c-'0'; ^ parsare.cpp:45:33: error: stray '#' in program raspuns = 10*raspuns + c-'0'; ^ parsare.cpp:3:1: error: 'ifstream' does not name a type ifstream fin("parsare.in"); ^ parsare.cpp:3:20: error: 'parsare' does not name a type ifstream fin("parsare.in"); ^ parsare.cpp:3:36: error: expected unqualified-id before ')' token ifstream fin("parsare.in"); ^ parsare.cpp:4:1: error: 'ofstream' does not name a type ofstream fout("parsare.out"); ^ parsare.cpp:4:21: error: 'parsare' does not name a type ofstream fout("parsare.out"); ^ parsare.cpp:4:38: error: expected unqualified-id before ')' token ofstream fout("parsare.out"); ^ parsare.cpp: In function 'int main()': parsare.cpp:9:7: error: 'fin' was not declared in this scope while(fin>>x) ^ parsare.cpp:9:11: error: 'gt' was not declared in this scope while(fin>>x) ^ parsare.cpp:9:13: error: expected ')' before ';' token while(fin>>x) ^ parsare.cpp:9:15: error: 'gt' was not declared in this scope while(fin>>x) ^ parsare.cpp:9:19: error: expected ';' before ')' token while(fin>>x) ^ parsare.cpp:10:8: warning: statement has no effect [-Wunused-value] if(x>maxx) ^ parsare.cpp:10:13: error: expected ';' before ')' token if(x>maxx) ^ parsare.cpp:11:7: warning: statement has no effect [-Wunused-value] maxx=x; ^ parsare.cpp:12:1: error: 'fout' was not declared in this scope fout<<maxx; ^ parsare.cpp:12:6: error: 'lt' was not declared in this scope fout<<maxx; ^ parsare.cpp:12:17: warning: statement has no effect [-Wunused-value] fout<<maxx; ^ parsare.cpp: At global scope: parsare.cpp:16:1: error: 'Pentru' does not name a type Pentru a obține cele 100 puncte trebuie folosită metoda parsării datelor de intrare: ^ parsare.cpp: In function 'int citireInt()': parsare.cpp:27:13: error: 'getchar' was not declared in this scope c = getchar(); ^ parsare.cpp:28:10: error: 'EOF' was not declared in this scope if (c == EOF) return 100001; ^ parsare.cpp:29:12: error: lvalue required as unary '&' operand if (c == '-') ^ parsare.cpp:29:14: error: expected ')' before ';' token if (c == '-') ^ parsare.cpp:29:18: error: lvalue required as unary '&' operand if (c == '-') ^ parsare.cpp:29:21: error: expected primary-expression before ')' token if (c == '-') ^ parsare.cpp:29:21: error: expected ';' before ')' token parsare.cpp:34:7: error: 'gt' was not declared in this scope if (c>='0' && c<='9') ^ parsare.cpp:34:9: error: expected ')' before ';' token if (c>='0' && c<='9') ^ parsare.cpp:34:10: error: expected primary-expression before '=' token if (c>='0' && c<='9') ^ parsare.cpp:34:13: error: lvalue required as unary '&' operand if (c>='0' && c<='9') ^ parsare.cpp:34:21: warning: statement has no effect [-Wunused-value] if (c>='0' && c<='9') ^ parsare.cpp:34:24: error: 'amp' was not declared in this scope if (c>='0' && c<='9') ^ parsare.cpp:34:36: error: 'lt' was not declared in this scope if (c>='0' && c<='9') ^ parsare.cpp:34:39: error: expected primary-expression before '=' token if (c>='0' && c<='9') ^ parsare.cpp:34:42: error: lvalue required as unary '&' operand if (c>='0' && c<='9') ^ parsare.cpp:34:50: warning: statement has no effect [-Wunused-value] if (c>='0' && c<='9') ^ parsare.cpp:34:51: error: expected primary-expression before ')' token if (c>='0' && c<='9') ^ parsare.cpp:34:51: error: expected ';' before ')' token parsare.cpp:43:13: error: 'getchar' was not declared in this scope c = getchar(); ^ parsare.cpp:44:7: error: 'lt' was not declared in this scope if (c<'0' || c>'9') break; ^ parsare.cpp:44:9: error: expected ')' before ';' token if (c<'0' || c>'9') break; ^ parsare.cpp:44:12: error: lvalue required as unary '&' operand if (c<'0' || c>'9') break; ^ parsare.cpp:44:20: warning: statement has no effect [-Wunused-value] if (c<'0' || c>'9') break; ^ parsare.cpp:44:22: error: expected primary-expression before '||' token if (c<'0' || c>'9') break; ^ parsare.cpp:44:27: error: 'gt' was not declared in this scope if (c<'0' || c>'9') break; ^ parsare.cpp:44:32: error: lvalue required as unary '&' operand if (c<'0' || c>'9') break; ^ parsare.cpp:44:40: warning: statement has no effect [-Wunused-value] if (c<'0' || c>'9') break; ^ parsare.cpp:44:41: error: expected primary-expression before ')' token if (c<'0' || c>'9') break; ^ parsare.cpp:44:41: error: expected ';' before ')' token parsare.cpp:45:28: error: lvalue required as unary '&' operand raspuns = 10*raspuns + c-'0'; ^ parsare.cpp:45:36: warning: statement has no effect [-Wunused-value] raspuns = 10*raspuns + c-'0'; ^ parsare.cpp: In function 'int main()': parsare.cpp:50:5: error: redefinition of 'int main()' int main() ^ parsare.cpp:6:5: error: 'int main()' previously defined here int main() ^ parsare.cpp:53:11: error: 'quot' was not declared in this scope freopen ("parsare.in", "r", stdin); ^ parsare.cpp:53:16: error: 'parsare' was not declared in this scope freopen ("parsare.in", "r", stdin); ^ parsare.cpp:53:32: error: expected primary-expression before ',' token freopen ("parsare.in", "r", stdin); ^ parsare.cpp:53:40: error: 'r' was not declared in this scope freopen ("parsare.in", "r", stdin); ^ parsare.cpp:53:47: error: expected primary-expression before ',' token freopen ("parsare.in", "r", stdin); ^ parsare.cpp:53:49: error: 'stdin' was not declared in this scope freopen ("parsare.in", "r", stdin); ^ parsare.cpp:53:54: error: expected ';' before ')' token freopen ("parsare.in", "r", stdin); ^ parsare.cpp:54:33: error: expected primary-expression before ',' token freopen ("parsare.out", "w", stdout); ^ parsare.cpp:54:41: error: 'w' was not declared in this scope freopen ("parsare.out", "w", stdout); ^ parsare.cpp:54:48: error: expected primary-expression before ',' token freopen ("parsare.out", "w", stdout); ^ parsare.cpp:54:50: error: 'stdout' was not declared in this scope freopen ("parsare.out", "w", stdout); ^ parsare.cpp:54:56: error: expected ';' before ')' token freopen ("parsare.out", "w", stdout); ^ parsare.cpp:60:1: error: 'cout' was not declared in this scope cout << maxim; ^ parsare.cpp:60:7: error: 'lt' was not declared in this scope cout << maxim; ^ parsare.cpp:60:20: warning: statement has no effect [-Wunused-value] cout << maxim; ^ parsare.cpp:63:21: error: 'max' was not declared in this scope maxim = max(maxim, x); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Parsare 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ă.