Submission #1088157

#TimeUsernameProblemLanguageResultExecution timeMemory
1088157browntoadBoxes with souvenirs (IOI15_boxes)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "boxes.h" using namespace std; #define ll long long // #define int ll #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) #define REP1(i, n) FOR(i, 1, n+1) #define RREP(i, n) for (int i = (n)-1; i >= 0; i--) #define pii pair<int, int> #define f first #define s second #define pb push_back #define ALL(x) (x).begin(), (x).end() #define SZ(x) (int)((x).size()) const ll maxn = 1e5+5; int delivery(int n, int k, int l, vector<int> pos){ ll ans = 0; REP(i, n){ ans += min(pos[i], l-pos[i]); } return ans; } /* signed main(){ } */

Compilation message (stderr)

boxes.cpp: In function 'int delivery(int, int, int, std::vector<int>)':
boxes.cpp:24:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   24 |     return ans;
      |            ^~~
boxes.cpp:19:25: warning: unused parameter 'k' [-Wunused-parameter]
   19 | int delivery(int n, int k, int l, vector<int> pos){
      |                     ~~~~^
/usr/bin/ld: /tmp/ccm4eGnG.o: in function `main':
grader.c:(.text.startup+0x1ef): undefined reference to `delivery(int, int, int, int*)'
collect2: error: ld returned 1 exit status