Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ calch
Function
calch
code/graph/idastar.cpp:2–5 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
int n, cur[100], pos;
2
int calch() {
3
int h = 0;
4
rep(i,0,n) if (cur[i] != 0) h += abs(i - cur[i]);
5
return h; }
6
int dfs(int d, int g, int prev) {
7
int h = calch();
8
if (g + h > d) return g + h;
Callers
2
dfs
Function · 0.85
idastar
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected