QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#582619#147. Floppy3un_larryfuncCompile Error//C++233.0kb2024-09-22 17:00:102024-09-22 17:00:11

Details

floppy.code: In function ‘int main()’:
floppy.code:102:7: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  102 |  scanf("%d%d", &n, &k);
      |  ~~~~~^~~~~~~~~~~~~~~~
floppy.code:104:35: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  104 |  for (int i = 0; i < n; i++) scanf("%lld", &f[i]), f[i] = (f[i] % P + P) % P;
      |                              ~~~~~^~~~~~~~~~~~~~~
floppy.code:106:36: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  106 |  for (int i = 1; i <= n; i++) scanf("%lld", &g[i]), g[i] = (P - g[i]) % P;
      |                               ~~~~~^~~~~~~~~~~~~~~
grader_floppy.cpp: In function ‘void my_fprintf(FILE*, const char*, ...)’:
grader_floppy.cpp:17:9: error: ‘exit’ was not declared in this scope
   17 |         exit(0);
      |         ^~~~
grader_floppy.cpp: In function ‘void my_fscanf(FILE*, int, const char*, ...)’:
grader_floppy.cpp:26:9: error: ‘exit’ was not declared in this scope
   26 |         exit(0);
      |         ^~~~
grader_floppy.cpp: In function ‘void save_to_floppy(const string&)’:
grader_floppy.cpp:51:5: error: ‘exit’ was not declared in this scope
   51 |     exit(0);
      |     ^~~~
grader_floppy.cpp: In function ‘int main(int, char**)’:
grader_floppy.cpp:91:15: error: ‘atoi’ was not declared in this scope
   91 |     int run = atoi(argv[1]);
      |               ^~~~