摘要:这一题一开始用map做,结果果断map不给力,没给过。 但是set可以靠运气过。学习了下set。#include <stdio.h>#include <set>#include <iostream>using namespace std;struct node{ int a; char c; bool operator < (const node t) const { return t.c>c; }};set<node> g; // 与优先队列类似.其实是一颗红黑树,用来判重比较好int main(){ node tmp; tmp.a
阅读全文