Submission #1358823

#TimeUsernameProblemLanguageResultExecution timeMemory
1358823maya_sWorm Worries (BOI18_worm)C++20
Compilation error
0 ms0 KiB
#include "sorting.h"
#include<bits/stdc++.h>
using namespace std;
typedef int ll;

int findSwapPairs(int n, int s[], int m, int x[], int y[], int p[], int q[]) {\
	vector<ll> v(n);
	for(ll i = 0; i < n; i++) v[i] = s[i];
	ll cnt = 0;
	for(ll i = 0; i < n; i++){
		for(ll j = i+1; j < n; j++) if(v[j] == i){
			swap(v[i], v[j]);
			p[cnt] = i, q[cnt] = j;
			cnt++;
			break;
		}
	}
	return cnt;
}


Compilation message (stderr)

worm.cpp:1:10: fatal error: sorting.h: No such file or directory
    1 | #include "sorting.h"
      |          ^~~~~~~~~~~
compilation terminated.