Borderou de evaluare (job #720090)

Utilizator avatar Emre Isleam Emre Emre IP ascuns
Problemă Cifre7 (clasa a 6-a) Compilator c-32
Rundă Arhiva de probleme Status evaluat
Dată 18 mai 2023 09:40:39 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:3:294: error: 'B' undeclared (first use in this function) 3 | FILE*fin;FILE*fout;int v[10];int A[10];int main(){fin = fopen("cifre7.in","r");fout = fopen("cifre7.out","w");int c,n,a,b,i,x,s=0,ok,y,auxi,auxu;long long ccl,max = 0;fscanf(fin,"%d%d",&c,&n);for(i = 0; i < n;i++){fscanf(fin,"%d%d",&a,&b);auxi = a;auxu = b;while(a){A[a%10]++;a/=10;}while(b){;B[b%10]++;b/=10;}ok=0;for(x = 0; x <= 9;x++){if(A[x] > 0 && B[x] > 0){if(A[x] < B[x])v[x] = A[x];elsev[x] = B[x];}}ccl = 0;for(x = 9; x >= 0;x--){for(y = 0; y < v[x];y++){ccl = ccl*10+x;}}if(ccl > max){max = ccl;}for(x = 0; x <= 9;x++){A[x] = 0;B[x] = 0;v[x] = 0;}if(ccl != 0)s++;}if(c == 1)fprintf(fout,"%d",s);elsefprintf(fout,"%lld",max);return 0;} | ^ main.c:3:294: note: each undeclared identifier is reported only once for each function it appears in main.c:3:391: error: 'elsev' undeclared (first use in this function) 3 | FILE*fin;FILE*fout;int v[10];int A[10];int main(){fin = fopen("cifre7.in","r");fout = fopen("cifre7.out","w");int c,n,a,b,i,x,s=0,ok,y,auxi,auxu;long long ccl,max = 0;fscanf(fin,"%d%d",&c,&n);for(i = 0; i < n;i++){fscanf(fin,"%d%d",&a,&b);auxi = a;auxu = b;while(a){A[a%10]++;a/=10;}while(b){;B[b%10]++;b/=10;}ok=0;for(x = 0; x <= 9;x++){if(A[x] > 0 && B[x] > 0){if(A[x] < B[x])v[x] = A[x];elsev[x] = B[x];}}ccl = 0;for(x = 9; x >= 0;x--){for(y = 0; y < v[x];y++){ccl = ccl*10+x;}}if(ccl > max){max = ccl;}for(x = 0; x <= 9;x++){A[x] = 0;B[x] = 0;v[x] = 0;}if(ccl != 0)s++;}if(c == 1)fprintf(fout,"%d",s);elsefprintf(fout,"%lld",max);return 0;} | ^~~~~ main.c:3:606: warning: implicit declaration of function 'elsefprintf'; did you mean 'vsnprintf'? [-Wimplicit-function-declaration] 3 | FILE*fin;FILE*fout;int v[10];int A[10];int main(){fin = fopen("cifre7.in","r");fout = fopen("cifre7.out","w");int c,n,a,b,i,x,s=0,ok,y,auxi,auxu;long long ccl,max = 0;fscanf(fin,"%d%d",&c,&n);for(i = 0; i < n;i++){fscanf(fin,"%d%d",&a,&b);auxi = a;auxu = b;while(a){A[a%10]++;a/=10;}while(b){;B[b%10]++;b/=10;}ok=0;for(x = 0; x <= 9;x++){if(A[x] > 0 && B[x] > 0){if(A[x] < B[x])v[x] = A[x];elsev[x] = B[x];}}ccl = 0;for(x = 9; x >= 0;x--){for(y = 0; y < v[x];y++){ccl = ccl*10+x;}}if(ccl > max){max = ccl;}for(x = 0; x <= 9;x++){A[x] = 0;B[x] = 0;v[x] = 0;}if(ccl != 0)s++;}if(c == 1)fprintf(fout,"%d",s);elsefprintf(fout,"%lld",max);return 0;} | ^~~~~~~~~~~ | vsnprintf main.c:3:141: warning: variable 'auxu' set but not used [-Wunused-but-set-variable] 3 | FILE*fin;FILE*fout;int v[10];int A[10];int main(){fin = fopen("cifre7.in","r");fout = fopen("cifre7.out","w");int c,n,a,b,i,x,s=0,ok,y,auxi,auxu;long long ccl,max = 0;fscanf(fin,"%d%d",&c,&n);for(i = 0; i < n;i++){fscanf(fin,"%d%d",&a,&b);auxi = a;auxu = b;while(a){A[a%10]++;a/=10;}while(b){;B[b%10]++;b/=10;}ok=0;for(x = 0; x <= 9;x++){if(A[x] > 0 && B[x] > 0){if(A[x] < B[x])v[x] = A[x];elsev[x] = B[x];}}ccl = 0;for(x = 9; x >= 0;x--){for(y = 0; y < v[x];y++){ccl = ccl*10+x;}}if(ccl > max){max = ccl;}for(x = 0; x <= 9;x++){A[x] = 0;B[x] = 0;v[x] = 0;}if(ccl != 0)s++;}if(c == 1)fprintf(fout,"%d",s);elsefprintf(fout,"%lld",max);return 0;} | ^~~~ main.c:3:136: warning: variable 'auxi' set but not used [-Wunused-but-set-variable] 3 | FILE*fin;FILE*fout;int v[10];int A[10];int main(){fin = fopen("cifre7.in","r");fout = fopen("cifre7.out","w");int c,n,a,b,i,x,s=0,ok,y,auxi,auxu;long long ccl,max = 0;fscanf(fin,"%d%d",&c,&n);for(i = 0; i < n;i++){fscanf(fin,"%d%d",&a,&b);auxi = a;auxu = b;while(a){A[a%10]++;a/=10;}while(b){;B[b%10]++;b/=10;}ok=0;for(x = 0; x <= 9;x++){if(A[x] > 0 && B[x] > 0){if(A[x] < B[x])v[x] = A[x];elsev[x] = B[x];}}ccl = 0;for(x = 9; x >= 0;x--){for(y = 0; y < v[x];y++){ccl = ccl*10+x;}}if(ccl > max){max = ccl;}for(x = 0; x <= 9;x++){A[x] = 0;B[x] = 0;v[x] = 0;}if(ccl != 0)s++;}if(c == 1)fprintf(fout,"%d",s);elsefprintf(fout,"%lld",max);return 0;} | ^~~~ main.c:3:131: warning: variable 'ok' set but not used [-Wunused-but-set-variable] 3 | FILE*fin;FILE*fout;int v[10];int A[10];int main(){fin = fopen("cifre7.in","r");fout = fopen("cifre7.out","w");int c,n,a,b,i,x,s=0,ok,y,auxi,auxu;long long ccl,max = 0;fscanf(fin,"%d%d",&c,&n);for(i = 0; i < n;i++){fscanf(fin,"%d%d",&a,&b);auxi = a;auxu = b;while(a){A[a%10]++;a/=10;}while(b){;B[b%10]++;b/=10;}ok=0;for(x = 0; x <= 9;x++){if(A[x] > 0 && B[x] > 0){if(A[x] < B[x])v[x] = A[x];elsev[x] = B[x];}}ccl = 0;for(x = 9; x >= 0;x--){for(y = 0; y < v[x];y++){ccl = ccl*10+x;}}if(ccl > max){max = ccl;}for(x = 0; x <= 9;x++){A[x] = 0;B[x] = 0;v[x] = 0;}if(ccl != 0)s++;}if(c == 1)fprintf(fout,"%d",s);elsefprintf(fout,"%lld",max);return 0;} | ^~ main.c:3:168: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result] 3 | FILE*fin;FILE*fout;int v[10];int A[10];int main(){fin = fopen("cifre7.in","r");fout = fopen("cifre7.out","w");int c,n,a,b,i,x,s=0,ok,y,auxi,auxu;long long ccl,max = 0;fscanf(fin,"%d%d",&c,&n);for(i = 0; i < n;i++){fscanf(fin,"%d%d",&a,&b);auxi = a;auxu = b;while(a){A[a%10]++;a/=10;}while(b){;B[b%10]++;b/=10;}ok=0;for(x = 0; x <= 9;x++){if(A[x] > 0 && B[x] > 0){if(A[x] < B[x])v[x] = A[x];elsev[x] = B[x];}}ccl = 0;for(x = 9; x >= 0;x--){for(y = 0; y < v[x];y++){ccl = ccl*10+x;}}if(ccl > max){max = ccl;}for(x = 0; x <= 9;x++){A[x] = 0;B[x] = 0;v[x] = 0;}if(ccl != 0)s++;}if(c == 1)fprintf(fout,"%d",s);elsefprintf(fout,"%lld",max);return 0;} | ^~~~~~~~~~~~~~~~~~~~~~~~ main.c:3:215: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result] 3 | FILE*fin;FILE*fout;int v[10];int A[10];int main(){fin = fopen("cifre7.in","r");fout = fopen("cifre7.out","w");int c,n,a,b,i,x,s=0,ok,y,auxi,auxu;long long ccl,max = 0;fscanf(fin,"%d%d",&c,&n);for(i = 0; i < n;i++){fscanf(fin,"%d%d",&a,&b);auxi = a;auxu = b;while(a){A[a%10]++;a/=10;}while(b){;B[b%10]++;b/=10;}ok=0;for(x = 0; x <= 9;x++){if(A[x] > 0 && B[x] > 0){if(A[x] < B[x])v[x] = A[x];elsev[x] = B[x];}}ccl = 0;for(x = 9; x >= 0;x--){for(y = 0; y < v[x];y++){ccl = ccl*10+x;}}if(ccl > max){max = ccl;}for(x = 0; x <= 9;x++){A[x] = 0;B[x] = 0;v[x] = 0;}if(ccl != 0)s++;}if(c == 1)fprintf(fout,"%d",s);elsefprintf(fout,"%lld",max);return 0;} | ^~~~~~~~~~~~~~~~~~~~~~~~