Borderou de evaluare (job #2799572)

Utilizator BlaugranasEnal Gemaledin Blaugranas Data 13 noiembrie 2021 12:59:28
Problema Qtri Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:11:6: error: conflicting declaration 'char b [32768]' 11 | char b[S]; | ^ main.cpp:8:5: note: previous declaration as 'std::pair<int, int> b' 8 | P a,b,c,d; | ^ main.cpp: In function 'void I()': main.cpp:15:20: error: cannot convert 'std::pair<int, int>' to 'std::basic_istream<char>::char_type*' {aka 'char*'} 15 | u=0,F.read(b,S); | ^ | | | std::pair<int, 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, from main.cpp:1: /usr/include/c++/10/istream:486:23: note: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::read(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = long int]' 486 | read(char_type* __s, streamsize __n); | ~~~~~~~~~~~^~~ main.cpp: In function 'void A(int&)': main.cpp:19:20: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int') 19 | for(;!isdigit(b[u])&&b[u]!='-';I()); | ^ main.cpp:19:27: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int') 19 | for(;!isdigit(b[u])&&b[u]!='-';I()); | ^ main.cpp:21:9: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int') 21 | if(b[u]=='-') | ^ main.cpp:23:22: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int') 23 | for(n=0;isdigit(b[u]);n=n*10+b[u]-'0',I()); | ^ main.cpp:23:35: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int') 23 | for(n=0;isdigit(b[u]);n=n*10+b[u]-'0',I()); | ^ main.cpp: In function 'int main()': main.cpp:33:138: error: no matching function for call to 'abs(const char [4])' 33 | A(a.x),A(a.y),A(b.x),A(b.y),A(c.x),A(c.y),A(d.x),A(d.y),G<<(abs(D(a,b,d))+abs(D(a,c,d))+abs(D(b,c,d)==abs(D(a,b,c))?"DA\n":"NU\n"); | ^ In file included from /usr/include/c++/10/bits/std_abs.h:38, from /usr/include/c++/10/cmath:47, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41, from main.cpp:1: /usr/include/stdlib.h:840:12: note: candidate: 'int abs(int)' (near match) 840 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; | ^~~ /usr/include/stdlib.h:840:12: note: conversion of argument 1 would be ill-formed: main.cpp:33:124: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 33 | A(a.x),A(a.y),A(b.x),A(b.y),A(c.x),A(c.y),A(d.x),A(d.y),G<<(abs(D(a,b,d))+abs(D(a,c,d))+abs(D(b,c,d)==abs(D(a,b,c))?"DA\n":"NU\n"); Non zero exit status: 1

Ceva nu functioneaza?