Submission #733533

#TimeUsernameProblemLanguageResultExecution timeMemory
733533JultoWall (IOI14_wall)C++14
Compilation error
0 ms0 KiB
#include "wall.h" #include <bits/stdc++.h> using namespace std; void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){ for(int i = 0; i < k; i++){ for(int j = left[i]; j <= right[i]; j++){ if(op[i] == 1){ finalHeight[j] = max(height[i], finalHeight[j]); } else{ finalHeight[j] = min(height[i], finalHeight[j]); } } } /*for(int i = 0; i < n; i++){ cout << finalHeight[i] << " "; }*/ } signed main() { ios::sync_with_stdio(0); cin.tie(0); int n, k; n = 4, k = 5; int left[] = {0, 1, 1, 0, 2}, right[] = {3, 2, 1, 1, 3}, height[] = {2, 1, 3, 4, 10}, op[] = {1, 2, 1, 2, 1}, finalHeight[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; buildWall(n, k, op, left, right, height, finalHeight); }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccEpYthS.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc86y3LR.o:wall.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status