#include <bits/stdc++.h>
#include "aliens.h"
using namespace std;
#define ll long long
#define vb vector<bool>
#define pb push_back
#define ff(aa, bb, cc) for(ll aa = bb; aa < cc; aa++)
#define vl vector<ll>
#define pll pair<ll, ll>
#define fi first
#define se second
#define ed "\n"
#define all(aaa) aaa.begin(), aaa.end()
#define rall(aaa) aaa.rbegin(), aaa.rend()
ll MOD = 1e9+7;
ll take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c){
	set<ll> st;
	vl arr;
	ff(i, 0, n){
		ll sz = st.size();
		st.insert(r[i]);
		if(sz != st.size()){
			arr.pb(r[i]);
		}
	}
	sort(all(arr));
	ll sz = arr.size();
	vector<vl> dp(sz+5, vl(k+1, 1e15));
	ff(i, 0, k+1){
		dp[0][i] = 0;
	}
	ff(i, 1, sz+1){
		ff(j, 1, k+1){
			ff(id, 0, i){
				ll cost = (arr[i-1]-arr[id]+1)*(arr[i-1]-arr[id]+1);
				dp[i][j] = min(dp[i][j], dp[id][j-1]+cost);
			}
		}
	}
	
    return dp[sz][k];
}
/*
int main() {
    int n, m, k;
    assert(3 == scanf("%d %d %d", &n, &m, &k));
    std::vector<int> r(n), c(n);
    for (int i = 0; i < n; i++) {
        assert(2 == scanf("%d %d", &r[i], &c[i]));
    }
    long long ans = take_photos(n, m, k, r, c);
    
    
    printf("%lld\n", ans);
    return 0;
}
*/
Compilation message (stderr)
aliens.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
aliens_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |