Submission #920131

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9201312024-02-02 05:31:33coding_snorlaxBoxes with souvenirs (IOI15_boxes)C++14
Compilation error
0 ms0 KiB
//#include "boxes.h"
#include<bits/stdc++.h>
#define ll long long int
using namespace std;
vector<ll> P;
vector<ll> Le,R,Ri;
ll n,k,l;
void debug(){
cout << "Le " ;
for(int i:Le) cout << i << " ";
cout << "\n";
cout << "Ri ";
for(int i:Ri) cout << i << " ";
cout << "\n";
}
void pre_L(){
Le.push_back(0);
for(ll i=0;i<k;i++) Le.push_back(2*P[i]);
for(ll i=k;i<n;i++){
Le.push_back(2*P[i]+Le[i+1-k]);
}
Le.push_back(0);
}
void pre_R(){
for(ll i=n-1;i>=n-k;i--) R.push_back(2*(l-P[i]));
for(ll i=n-k-1;i>=0;i--){
R.push_back(2*(l-P[i])+R[n-k-1-i]);
}
Ri.push_back(0);
for(ll i=n-1;i>=0;i--) Ri.push_back(R[i]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

boxes.cpp: In function 'void debug()':
boxes.cpp:10:15: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   10 |     for(int i:Le) cout << i << " ";
      |               ^~
boxes.cpp:13:15: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   13 |     for(int i:Ri) cout << i << " ";
      |               ^~
/usr/bin/ld: /tmp/ccyKjNc1.o: in function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccNxQtw1.o:boxes.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status