QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#442872#8582. 점프 게임GuanYunchangCompile Error//C++201.7kb2024-06-15 13:44:002024-06-15 13:44:01

詳細信息

answer.code: In function ‘ll play_game(ll, int, ll, std::vector<long long int>, std::vector<long long int>)’:
answer.code:34:42: error: ‘a’ was not declared in this scope
   34 |             dp[i] = max(dp[i-1], dp[i-k]+a[i-k]);
      |                                          ^
answer.code:38:42: error: ‘a’ was not declared in this scope
   38 |             if(i+k>n) mx = max(mx, dp[i]+a[i]);
      |                                          ^
answer.code: In function ‘void freopen(std::string)’:
answer.code:17:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   17 | void freopen(string s) { freopen((s+".in").c_str(), "r", stdin); freopen((s+".out").c_str(), "w", stdout); }
      |                          ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code:17:73: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   17 | void freopen(string s) { freopen((s+".in").c_str(), "r", stdin); freopen((s+".out").c_str(), "w", stdout); }
      |                                                                  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code: In function ‘ll play_game(ll, int, ll, std::vector<long long int>, std::vector<long long int>)’:
answer.code:43:1: warning: control reaches end of non-void function [-Wreturn-type]
   43 | }
      | ^