| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1172331 | nagibator | Knapsack (NOI18_knapsack) | C++20 | 1 ms | 328 KiB |
#include <bits/stdc++.h>
#define nn '\n'
#define int long long
#define pb push_back
#define all(x) x.begin(), x.end()
#define sec second
#define vec std::vector
using namespace std;
const int N = 2005;
vec<pair<int, int>> p;
int dp[N];
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n , m ;
cin >> n >> m;
int ans = 0;
int ok = 0;
int a , b , c;
cin >>a >> b >> c;
while(n > 0 && c > 0)
{
if(n < b)
{
break;
}
n-=b;
ans+=a;
c--;
}
cout << ans;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
