记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:8:3: error: unknown type name 'ss'
 { ss a[100000];
   ^~
/in/foo.c:8:3: note: use 'struct' keyword to refer to the type
/in/foo.c:13:23: error: request for member 'id' in something not a structure or union
  { scanf("%d %d",&a[i].id,&a[i].score );
                       ^
/in/foo.c:13:32: error: request for member 'score' in something not a structure or union
  { scanf("%d %d",&a[i].id,&a[i].score );
                                ^
/in/foo.c:15:14: error: request for member 'score' in something not a structure or union
  int max=a[0].score;
              ^
/in/foo.c:19:12: error: request for member 'score' in something not a structure or union
   { if(a[j].score>max) jmax=j; 
            ^
/in/foo.c:21:11: error: request for member 'score' in something not a structure or union
   tmp=a[i].score;
           ^
/in/foo.c:22:7: error: request for member 'score' in something not a structure or union
   a[i].score=a[jmax].score;
       ^
/in/foo.c:22:21: error: request for member 'score' in something not a structure or union
   a[i].score=a[jmax].score;
                     ^
/in/foo.c:23:10: error: request for member 'score' in something not a structure or union
   a[jmax].score=tmp;
          ^
/in/foo.c:24:11: error: request for member 'id' in something not a structure or union
   idt=a[i].id;
           ^
/in/foo.c:25:7: error: request for member 'id' in something not a structure or union
   a[i].id=a[jmax].id;
       ^
/in/foo.c:25:18: error: request for member 'id' in something not a structure or union
   a[i].id=a[jmax].id;
                  ^
/in/foo.c:26:10: error: request for member 'id' in something not a structure or union
   a[jmax].id=idt;
          ^
/in/foo.c:30:12: error: request for member 'score' in something not a structure or union
   { if(a[i].score==a[j].score && a[i].id >a[j].id )
            ^
/in/foo.c:30:24: error: request for member 'score' in something not a structure or union
   { if(a[i].score==a[j].score && a[i].id >a[j].id )
                        ^
/in/foo.c:30:38: error: request for member 'id' in something not a structure or union
   { if(a[i].score==a[j].score && a[i].id >a[j].id )
                                      ^
/in/foo.c:30:47: error: request for member 'id' in something not a structure or union
   { if(a[i].score==a[j].score && a[i].id >a[j].id )
                                               ^
/in/foo.c:31:14: error: request for member 'id' in something not a structure or union
    { idt=a[j].id;
              ^
/in/foo.c:32:9: error: request for member 'id' in something not a structure or union
     a[j].id=a[i].id;
         ^
/in/foo.c:32:17: error: request for member 'id' in something not a structure or union
     a[j].id=a[i].id;
                 ^
/in/foo.c:33:9: error: request for member 'id' in something not a structure or union
     a[i].id=idt;
         ^
/in/foo.c:38:23: error: request for member 'id' in something not a structure or union
  printf("%d %d",a[k-1].id,a[k-1].score);
                       ^
/in/foo.c:38:33: error: request for member 'score' in something not a structure or union
  printf("%d %d",a[k-1].id,a[k-1].score);
                                 ^
/in/foo.c:8:6: warning: variable 'a' set but not used [-Wunused-but-set-variable]
 { ss a[100000];
      ^

信息

递交者
类型
递交
题目
2-1 比赛榜单
语言
C
递交时间
2019-01-15 19:20:21
评测时间
2019-01-15 19:20:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes