Submission #1222303

#TimeUsernameProblemLanguageResultExecution timeMemory
1222303jakeob77Text editor (CEOI24_editor)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ins insert
#define pb push_back

void solve(){
    int n;cin>>n;
    int st,stt,g,gg;cin>>st>>stt>>g>>gg;
    vector<int>a(n);
    for(int &d:a) cin>>d;
    cout<<min(abs(st-g)+abs(stt-gg),1+(l[0]+1-gg))<<endl;

}

int main() {
	int t=1;
    while(t--)solve();
}

Compilation message (stderr)

Main.cpp: In function 'void solve()':
Main.cpp:12:40: error: 'l' was not declared in this scope
   12 |     cout<<min(abs(st-g)+abs(stt-gg),1+(l[0]+1-gg))<<endl;
      |                                        ^