Borderou de evaluare (job #2797769)

Utilizator BlaugranasEnal Gemaledin Blaugranas Data 10 noiembrie 2021 16:19:02
Problema Euler Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:2:11: error: expected unqualified-id before numeric constant 2 | #define N 262500 | ^~~~~~ main.cpp:3:28: note: in expansion of macro 'N' 3 | int S[N],p[N*2],a[N*2],n,k,N,i,b; | ^ main.cpp: In function 'int main()': main.cpp:8:84: error: 'gets' was not declared in this scope; did you mean 'fgets'? 8 | freopen("euler.in","r",stdin),freopen("euler.out","w",stdout),scanf("%d\n",&n),gets(c),k=strlen(c); | ^~~~ | fgets main.cpp:9:10: error: 'i' was not declared in this scope 9 | for(;i<k;) { | ^ main.cpp:2:11: error: lvalue required as increment operand 2 | #define N 262500 | ^~~~~~ main.cpp:10:17: note: in expansion of macro 'N' 10 | for(p[++N]=0;c[i]==' ';++i); | ^ main.cpp:13:9: error: 'i' was not declared in this scope 13 | for(i=1;i<=N;++i) { | ^ main.cpp:14:13: error: lvalue required as increment operand 14 | a[++b]=p[i]; | ^ main.cpp:15:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 15 | if(b>2&&a[b]==a[b-2]) | ~^~ main.cpp:15:18: error: invalid types 'int [525000][bool [262500]]' for array subscript 15 | if(b>2&&a[b]==a[b-2]) | ^ main.cpp:15:24: error: invalid types 'int [525000][bool*]' for array subscript 15 | if(b>2&&a[b]==a[b-2]) | ^ main.cpp:16:16: error: invalid types 'int [525000][bool*]' for array subscript 16 | S[a[b-1]]=a[b],b-=2; | ^ main.cpp:16:24: error: invalid types 'int [525000][bool [262500]]' for array subscript 16 | S[a[b-1]]=a[b],b-=2; | ^ main.cpp:16:29: error: incompatible types in assignment of 'int' to 'bool [262500]' 16 | S[a[b-1]]=a[b],b-=2; | ~^~~ main.cpp:18:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 18 | if(b>1) | ~^~ main.cpp:21:28: error: 'i' was not declared in this scope 21 | for(printf("DA\n"),i=1;i<=n;++i) | ^ Non zero exit status: 1

Ceva nu functioneaza?