This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#ifndef SKY
#include "boxes.h"
#endif // SKY
#include<bits/stdc++.h>
using namespace std;
#define MAX 10001000
int numTeam, maxCapa, numPos, pos[MAX];
int dp[MAX], ahihi[MAX];
long long result;
void solve(void) {
result = 0;
for (int i = 0; i < numTeam; i++) result += pos[i];
}
long long delivery(int NN, int KK, int LL, int positions[]) {
// doc du lieu
numTeam = NN; maxCapa = KK; numPos = LL;
for (int i = 0; i < numTeam; i++) pos[i] = positions[i];
solve();
return result;
}
#ifdef SKY
/**
Input format:
- Dong 1: N K L
- Dong 2: pos[0] pos[1] ... pos[N - 1]
Output format: in ra ket qua ham delivery.
**/
int main(void) {
// freopen("sample.in", "r", stdin);
int n, k, l; cin >> n >> k >> l;
int pos[10000];
for (int i = 0; i < n; i++) cin >> pos[i];
cout << delivery(n, k, l, pos) << endl;
}
#endif // SKY
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |