Time Exceeded

foo.cc: In function 'int main()':
foo.cc:16:12: warning: unused variable 'index' [-Wunused-variable]
  int n,i,j,index,k,flag;
            ^~~~~
foo.cc:16:18: warning: unused variable 'k' [-Wunused-variable]
  int n,i,j,index,k,flag;
                  ^
foo.cc:16:20: warning: unused variable 'flag' [-Wunused-variable]
  int n,i,j,index,k,flag;
                    ^~~~
foo.cc:21:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%s%d%f",&s[i].num,s[i].name,&s[i].sex,&s[i].score);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:17:20: warning: 'n' is used uninitialized in this function [-Wuninitialized]
  struct student s[n],t; 
                    ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Time Exceeded ≥1935ms ≥316.0 KiB

信息

递交者
类型
递交
题目
P1151 结构体-学生信息处理3
语言
C++
递交时间
2021-11-08 20:34:16
评测时间
2021-11-08 20:34:16
评测机
分数
0
总耗时
≥1935ms
峰值内存
≥316.0 KiB