Submission #1160771

#TimeUsernameProblemLanguageResultExecution timeMemory
1160771SmuggingSpun철로 (IOI14_rail)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include "rail.h"
using namespace std;
void findLocation(int N, int first, int location[], int stype[]){
    location[0] = first;
    stype[0] = 1;
    fill(stype + 1, stype + N, 2);
    for(int i = 1; i < n; i++){
        location[i] = first + getDistance(0, i);
    }
}

Compilation message (stderr)

rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:8:24: error: 'n' was not declared in this scope
    8 |     for(int i = 1; i < n; i++){
      |                        ^