Submission #1263993

#TimeUsernameProblemLanguageResultExecution timeMemory
1263993liangjeremy정렬하기 (IOI15_sorting)C++20
Compilation error
0 ms0 KiB
#include "sorting.h" #include<bits/stdc++.h> #define fi first #define se second //#define int long long using namespace std; using db=double; using ll=int64_t; using sll=__int128; using lb=long double; int findSwapPairs(int n, int a[], int m, int x[], int y[], int p[], int q[]){ for(int i=0; i<m; i++){ bool ok=true; for(int j=0; j<n; j++){ if(a[j]!=j)ok=false; } if(ok)break; swap(a[x[i]],a[y[i]]); int idx=-1; for(int j=0; j<n; j++){ if(a[j]!=j){ idx=j; break; } } if(idx=-1)break; int idx2=-1; for(int j=0; j<n; j++){ if(a[j]==idx)idx2=j; } p[i]=idx; q[i]=idx2; } return lst; }

Compilation message (stderr)

sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:32:16: error: 'lst' was not declared in this scope
   32 |         return lst;
      |                ^~~