Borderou de evaluare (job #3242787)

Utilizator dgabiDolteanu Gabriel dgabi Data 14 septembrie 2024 05:56:48
Problema Numere 5 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<fstream> | ^~~~~~ main.cpp:2:29: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int n,a,x,y,i;bool v[1<<20];main(){std::fstream I("numere5.in");for(I>>n;++i<=n*n;I>>a,v[a]++);for(;--i;!v[i]?!x?x=i:1,y=i:1);std::ofstream("numere5.out")<<y<<' '<<x;} | ^~~~ main.cpp: In function 'int main()': main.cpp:2:91: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17 2 | int n,a,x,y,i;bool v[1<<20];main(){std::fstream I("numere5.in");for(I>>n;++i<=n*n;I>>a,v[a]++);for(;--i;!v[i]?!x?x=i:1,y=i:1);std::ofstream("numere5.out")<<y<<' '<<x;} | ~~~^ Non zero exit status: 1

Ceva nu functioneaza?