Submission #419484

# Submission time Handle Problem Language Result Execution time Memory
419484 2021-06-07T07:42:23 Z KalasLavas Crocodile's Underground City (IOI11_crocodile) C++14
Compilation error
0 ms 0 KB
#include "crocodile.h"
#include <stdio.h>
#include <stdlib.h>

#define MAX_N 50000
#define MAX_M 10000000

static int N, M;
static int R[MAX_M][2];
static int L[MAX_M];
static int K;
static int P[MAX_N];
// static int solution;

inline 
void my_assert(int e) {if (!e) abort();}

void read_input()
{
  int i;
  my_assert(3==scanf("%d %d %d",&N,&M,&K));
  for(i=0; i<M; i++)
    my_assert(3==scanf("%d %d %d",&R[i][0],&R[i][1],&L[i]));
  for(i=0; i<K; i++)
    my_assert(1==scanf("%d",&P[i]));
  // my_assert(1==scanf("%d",&solution));
}

int main()
{
  int ans;
  read_input();
  ans = travel_plan(N,M,R,L,K,P);
  
  printf("Ans: %d", ans);
  return 0;
}

Compilation message

/usr/bin/ld: /tmp/ccxZnZRV.o: in function `read_input()':
grader.cpp:(.text+0x0): multiple definition of `read_input()'; /tmp/cc4WRQqT.o:crocodile.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/ccxZnZRV.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc4WRQqT.o:crocodile.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cc4WRQqT.o: in function `main':
crocodile.cpp:(.text.startup+0x36): undefined reference to `travel_plan(int, int, int (*) [2], int*, int, int*)'
/usr/bin/ld: /tmp/ccxZnZRV.o: in function `main':
grader.cpp:(.text.startup+0x36): undefined reference to `travel_plan(int, int, int (*) [2], int*, int, int*)'
collect2: error: ld returned 1 exit status