Borderou de evaluare (job #1472645)
| Utilizator | Data | 17 august 2015 14:52:22 | |
|---|---|---|---|
| Problema | Arbore partial de cost minim | Status | done |
| Runda | Arhiva educationala | Compilator | c | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
user.c:8:18: error: conflicting types for ‘q’
N *g[200005],*p,*q;
^
user.c:7:63: note: previous declaration of ‘q’ was here
int n,m,i,j,k,d[200005],w[200005],h[200005],s,t,e,l[200005],r,q[200005];
^
user.c: In function ‘M’:
user.c:30:58: warning: operation on ‘h[l]’ may be undefined [-Wsequence-point]
void M(int l,int k) { for(d[h[l]]=k;l>1&&d[h[l/2]]>k;h[l]^=h[l/2]^=h[l]^=h[l/2],w[h[l]]=l,w[h[l/2]]=l/2,l/=2); }
^
user.c: In function ‘main’:
user.c:45:30: error: incompatible types when assigning to type ‘N’ from type ‘int’
d[p->I]=p->C,q[p->I]=i,M(w[p->I],d[p->I]);
^
user.c:45:32: warning: left-hand operand of comma expression has no effect [-Wunused-value]
d[p->I]=p->C,q[p->I]=i,M(w[p->I],d[p->I]);
^
user.c:47:5: error: used struct type value where scalar is required
if(q[i])
^
user.c:51:5: error: used struct type value where scalar is required
if(q[j])
^
user.c:52:7: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘N’ [-Wformat=]
printf("%d %d\n",j,q[j]);
^
user.c:32:9: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
freopen("apm.in","r",stdin),freopen("apm.out","w",stdout),scanf("%d%d",&n,&m);
^
user.c:32:37: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
freopen("apm.in","r",stdin),freopen("apm.out","w",stdout),scanf("%d%d",&n,&m);
^
user.c:32:65: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
freopen("apm.in","r",stdin),freopen("apm.out","w",stdout),scanf("%d%d",&n,&m);
^
user.c:34:11: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&i,&j,&k);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
