摘要:
这道题需要把单词看成有向图的边,单词的首字母和尾字母当做点,这样就能建立有向图 另外,这题需要打印边的编号,而不是点的编号,所以dfs时候需要push边的编号 #include <bits/stdc++.h> using namespace std; const int N=1e3+10; int 阅读全文
摘要:
参考:https://www.cnblogs.com/littlehb/p/15464421.html#define lowbit(x) (x & -x) int f3(int x) { int res = 0; while (x) { x -= lowbit(x); res++; } return 阅读全文
摘要:
命令行编译:g++ -std=c++11 -O2 -Wall test.cpp -o testThis command produces a binary file test from the source code test.cpp. The compiler follows the C++11 阅读全文