foo.c: In function 'main':
foo.c:11:2: error: unknown type name 'len'; use 'struct' keyword to refer to the type
11 | len t;
| ^~~
| struct
foo.c:20:6: error: incompatible types when assigning to type 'int' from type 'struct len'
20 | t=a[i];
| ^
foo.c:22:9: error: incompatible types when assigning to type 'struct len' from type 'int'
22 | a[j]=t;
| ^
foo.c:10:20: warning: unused variable 'endtree' [-Wunused-variable]
10 | int L,M,i,j=0,n=0,endtree=0;
| ^~~~~~~
foo.c:12:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
12 | scanf("%d%d",&L,&M);
| ^~~~~~~~~~~~~~~~~~~
foo.c:14:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
14 | scanf("%d%d",&a[i].beg,&a[i].end);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务