在谋篇题解里看到段:
struct Node{ int p,c; friend bool operator<(Node x, Node y) { return x.c<y.c; } }in[maxn];
测试了一下,似乎功能和如下代码一样
struct Node{ int p,c; bool operator<(const Node x) const { return c<x.c; } }in[maxn];
请问这个friend是什么意思?百度出来的都太高深了看不懂求解答