| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1305692 | athena | Knapsack (NOI18_knapsack) | C++20 | 1 ms | 976 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main(){
int s,n;
cin>>s>>n;
int cost=0;
int sum=0;
while(n--)
{
int x,y,z;
cin>>x>>y>>z;
while(z!=0 && sum<s)
{
cost+=x;
sum+=y;
z--;
}
}
cout<<cost<<endl;
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
