Submission #57169

# Submission time Handle Problem Language Result Execution time Memory
57169 2018-07-14T08:02:39 Z boook Boxes with souvenirs (IOI15_boxes) C++14
0 / 100
2 ms 368 KB
/*input

*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie(0) , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define MAX 10000090
#define INF 0x3f3f3f3f

int delivery(int n , int k , int l , int *x){
    int ans = 0;
    REP(i , 0 , l) ans += min(i , l - i) * x[i];
    return ans;
}
// int n , k , l , x[MAX];
// int32_t main(){
//     IOS;
//     cin >> n >> k >> l;
//     REP(i , 0 , n) cin >> x[i];
//     cout << delivery(n , k , x) << endl;
//     return 0;
// }

Compilation message

boxes.cpp: In function 'int delivery(int, int, int, int*)':
boxes.cpp:25:18: warning: unused parameter 'n' [-Wunused-parameter]
 int delivery(int n , int k , int l , int *x){
                  ^
boxes.cpp:25:26: warning: unused parameter 'k' [-Wunused-parameter]
 int delivery(int n , int k , int l , int *x){
                          ^
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 368 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 368 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 368 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 368 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -