Submission #731601

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7316012023-04-27 16:03:23jasen_penchevAliens (IOI16_aliens)C++14
Compilation error
0 ms0 KiB
/// Conveh Hull Trick Optimization
#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#include <deque>
#define endl '\n'
using namespace std;
const long long INF = (long long)(1e18);
struct line
{
long long a, b;
long long calc(long long x)
{
return (a * x + b);
}
long double intersect(line l)
{
return (long double)(l.b - b) / (a - l.a);
}
};
long long take_photos(int n, int m, int k, vector<int> row, vector<int> col)
{
vector< pair<int, int> > temp;
for (int i = 0; i < n; ++ i)
{
temp.push_back({max(row[i], col[i]), min(row[i], col[i])});
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

aliens.cpp: In function 'long long int take_photos(int, int, int, std::vector<int>, std::vector<int>)':
aliens.cpp:36:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   36 |     for (auto [r, l] : temp)
      |               ^
/usr/bin/ld: /tmp/ccENYMnB.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cctPdPUB.o:aliens.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status