Submission #209520

#TimeUsernameProblemLanguageResultExecution timeMemory
209520model_codeKnapsack (NOI18_knapsack)C++17
12 / 100
5 ms256 KiB
#include <bits/stdc++.h> using namespace std; long long s,n,w,v,k; int main(){ scanf("%lld %lld",&s,&n); scanf("%lld %lld %lld",&v,&w,&k); printf("%lld\n",v*min(k,s/w)); return 0; }

Compilation message (stderr)

knapsack.cpp: In function 'int main()':
knapsack.cpp:5:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld",&s,&n);
  ~~~~~^~~~~~~~~~~~~~~~~~~
knapsack.cpp:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld %lld",&v,&w,&k);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...