Submission #931963

# Submission time Handle Problem Language Result Execution time Memory
931963 2024-02-22T16:39:11 Z skyvn97 Boxes with souvenirs (IOI15_boxes) C++14
0 / 100
1 ms 2396 KB
#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 deliveryFast(int NN, int KK, int LL, int positions[]) {
    /// ham code thuat chuan
}

long long deliverySlow(int NN, int KK, int LL, int positions[]) {
    /// ham code thuat trau/duyet vet can
}

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.

  Chu y quan trong: Phan code ham main va cac phan code khac ben trong cap #ifdef SKY khong duoc phep tuong tac voi bien toan cuc,
  chi duoc khai bao cac bien cuc bo.
**/

int main(void) {
//    freopen("sample.in", "r", stdin);

    for (int i = 1; i <= 10000; i++) {
        int n = randInt(1, 10);
        int k = randInt(1, 20);
        int l = randInt(1, 30);
        int pos[1000];

        assert(deliverySlow(n, k, l, pos) == deliveryFast(n, k, l, pos));
    }
}

#endif // SKY

Compilation message

boxes.cpp: In function 'long long int deliveryFast(int, int, int, int*)':
boxes.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^
boxes.cpp:18:28: warning: unused parameter 'NN' [-Wunused-parameter]
   18 | long long deliveryFast(int NN, int KK, int LL, int positions[]) {
      |                        ~~~~^~
boxes.cpp:18:36: warning: unused parameter 'KK' [-Wunused-parameter]
   18 | long long deliveryFast(int NN, int KK, int LL, int positions[]) {
      |                                ~~~~^~
boxes.cpp:18:44: warning: unused parameter 'LL' [-Wunused-parameter]
   18 | long long deliveryFast(int NN, int KK, int LL, int positions[]) {
      |                                        ~~~~^~
boxes.cpp:18:52: warning: unused parameter 'positions' [-Wunused-parameter]
   18 | long long deliveryFast(int NN, int KK, int LL, int positions[]) {
      |                                                ~~~~^~~~~~~~~~~
boxes.cpp: In function 'long long int deliverySlow(int, int, int, int*)':
boxes.cpp:24:1: warning: no return statement in function returning non-void [-Wreturn-type]
   24 | }
      | ^
boxes.cpp:22:28: warning: unused parameter 'NN' [-Wunused-parameter]
   22 | long long deliverySlow(int NN, int KK, int LL, int positions[]) {
      |                        ~~~~^~
boxes.cpp:22:36: warning: unused parameter 'KK' [-Wunused-parameter]
   22 | long long deliverySlow(int NN, int KK, int LL, int positions[]) {
      |                                ~~~~^~
boxes.cpp:22:44: warning: unused parameter 'LL' [-Wunused-parameter]
   22 | long long deliverySlow(int NN, int KK, int LL, int positions[]) {
      |                                        ~~~~^~
boxes.cpp:22:52: warning: unused parameter 'positions' [-Wunused-parameter]
   22 | long long deliverySlow(int NN, int KK, int LL, int positions[]) {
      |                                                ~~~~^~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Halted 0 ms 0 KB -