Borderou de evaluare (job #3000046)
Utilizator | Data | 11 martie 2023 21:16:20 | |
---|---|---|---|
Problema | Tnia | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int find_sum(int, int, int, int)':
main.cpp:15:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
15 | if(pillars[r] < l1){
| ~~~~~~~~~~~^~~~
main.cpp:19:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
19 | if(pillars[r] >= l2){
| ~~~~~~~~~~~^~~~~
main.cpp:24:17: error: invalid conversion from 'int*' to 'int' [-fpermissive]
24 | sum += pillars[r] - l1 + 1;
| ~~~~^~~~~~~~~~~~~~~~~~~~~~
| |
| int*
main.cpp: In function 'int main()':
main.cpp:34:13: error: no match for 'operator>>' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int [100002]')
34 | fin >> pillars[r];
| ~~~ ^~ ~~~~~~~~~~
| | |
| | int [100002]
| std::ifstream {aka std::basic_ifstream<char>}
In file included from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from main.cpp:1:
/usr/include/c++/10/istream:168:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
168 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/10/istream:168:7: note: conversion of argument 1 would be ill-formed:
main.cpp:34:25: error: cannot bind non-const lvalue reference of type 'bool&' to an rvalue of type 'bool'
34 | fin >> pillars[r];
| ~~~~~~~~~^
In file included from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from main.cpp:1:
/usr/include/c++/10/istream:172:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
172 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/10/istream:172:7: note: conversion of argument 1 would be ill-formed:
main.cpp:34:25: error: invalid conversion from 'int*' to 'short int' [-fpermissive]
34 | fin >> pillars[r];
| ~~~~~~~~~^
| |
| int*
main.cpp:34:25: error: cannot bind rvalue '(short int)((int*)(& pillars[r]))' to 'short int&'
In file included from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !