foo.cc: In function 'int main()':
foo.cc:15:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("students.in","r",stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:16:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("students.out","w",stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:17:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&s[i].Student_number);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:21:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&s[i].Chinese_achievement);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:22:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&s[i].Maths_achievement);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:23:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&s[i].English_achievement);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:24:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&s[i].Physics_achievement);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:25:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&s[i].Chemistry_achievement);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务