Borderou de evaluare (job #721421)

Utilizator avatar Patrickvasile Soltan Cristian Patrickvasile IP ascuns
Problemă Run (clasa a 8-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 25 mai 2023 08:55:31 Scor 0

Raport evaluator

Eroare de compilare: main.cpp:18:16: error: expected initializer before '<<' token 18 | #define N cout << "NO" << '\n' | ^~ main.cpp:55:5: note: in expansion of macro 'N' 55 | int N,L; | ^ main.cpp: In function 'void swap(int, int)': main.cpp:75:17: warning: unused variable 'dt' [-Wunused-variable] 75 | { int t; double dt; | ^~ main.cpp: In function 'void eliminate()': main.cpp:125:12: error: 'L' was not declared in this scope 125 | if(a>b) w+=L; | ^ main.cpp:109:23: warning: unused variable 'i' [-Wunused-variable] 109 | { int a,b,x,y,z,w;int i; | ^ main.cpp: In function 'int main()': main.cpp:18:16: error: invalid operands of types 'std::ostream*' {aka 'std::basic_ostream<char>*'} and 'const char [3]' to binary 'operator<<' 18 | #define N cout << "NO" << '\n' | ^~ ~~~~ | | | const char [3] main.cpp:171:17: note: in expansion of macro 'N' 171 | scanf("%d %d", &N,&L); | ^ main.cpp:171:20: error: 'L' was not declared in this scope 171 | scanf("%d %d", &N,&L); | ^ main.cpp:173:10: error: no match for 'operator<=' (operand types are 'int' and 'std::basic_ostream<char>') 173 | for(i=1;i<=N;i++) | ~^~ | | | int main.cpp:173:10: note: candidate: 'operator<=(int, int)' (built-in) 173 | for(i=1;i<=N;i++) | ^ main.cpp:173:10: note: no known conversion for argument 2 from 'std::basic_ostream<char>' to 'int' In file included from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/regex:66, from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/i686-pc-linux-gnu/bits/stdc++.h:110, from main.cpp:1: /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/regex.h:1128:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1128 | operator<=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/regex.h:1128:5: note: template argument deduction/substitution failed: main.cpp:18:27: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 18 | #define N cout << "NO" << '\n' | ^~~~ main.cpp:173:12: note: in expansion of macro 'N' 173 | for(i=1;i<=N;i++)