Submission #1041119

# Submission time Handle Problem Language Result Execution time Memory
1041119 2024-08-01T15:52:18 Z DeathIsAwe Gondola (IOI14_gondola) C++14
Compilation error
0 ms 0 KB
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long

int valid(int n, int inputSeq[]) {
  int start = -1, temp;
  for (int i=0;i<n;i++) {
    if (inputSeq[i] <= n) {
      start = i; 
      break;
    }
  }
  if (start == -1) {
    return 1;
  } else {
    for (int i=start+1;i<n;i++) {
      if (inputSeq[i] <= n) {
        temp = (inputSeq[i] - inputSeq[start] + n) % n;
        if (temp != i - start) {
          return 0;
        }
        start = i;
      }
    }
  }
  return 1;
}

Compilation message

/usr/bin/ld: /tmp/ccBO5q0z.o: in function `main':
grader.cpp:(.text.startup+0x108): undefined reference to `countReplacement'
/usr/bin/ld: grader.cpp:(.text.startup+0x132): undefined reference to `replacement'
collect2: error: ld returned 1 exit status