棋盤製作
#include #include #include #include #include #include #include #include #include long n;long m;
long maxl[2][2010];
long maxr[2][2010];
long _l[2010];
long _r[2010];
long height[2010];
long map[2010][2010];
long sum[2010][2010];
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
const long inf = 0x7f7f7f7f;
long ans = -inf;
long ans2 = -inf;
void work()
for (long j=1;j耍朋友
#include #include #include #include #include #include #include #include #define min(a,b) ((a)<(b)?(a):(b))
struct node
;node* head[4010];
bool map[4010][4010];
long dfn[4010];
long low[4010];
long top = 0;
long belong[4010];
long stack[4010];
bool instack[4010];
long bcnt = 0;
long n;
void insert(long a,long b)
long time = 0;
void tarjan(long u)
else if(instack[v])
}if (dfn[u] == low[u])
while (v-u); }}
int getint()
do rs = (rs<<3)+(rs<<1)+tmp-'0';
while (isdigit(tmp=getchar()));
return sgn?rs:-rs;
}long ans[4010];
int main()
;node* head[50010];
long dfn[100010];
long depth[100010];
long dist[50010];
long first[50010];
long time = 0;
long dist = 0;
long st[100010][20];
bool vis[50010];
void insert(long u,long v,long w)
void dfs(long u,long d) }}
long lg2(long a)
long rmq(long a,long b)
long len = lg2(b-a+1);
if (depth[st[a][len]]地板
如果行數小於列數則交換行列。。這樣會快得多。
#include #include #include #include #include #include #include #include #include long n;long m;
struct node
;typedef long long ll;
const long maxs = 1000000;
const long hmod = 100000;
node mmry[maxs];
node* hash[hmod];
ll f[2][maxs];
long sta[2][maxs];
long cnt[2];
long ths = 1;
long pre = 0;
bool map[110][110];
inline long get_id(long s)
inline void clear()
inline void add(ll& a,ll& b)
void work()
long wp = (last>>p)&3;
long wq = (last>>q)&3;
long now = last - (wp<= m)
{ for (long i=1;i
C語言 期末陣列集中複習
關於陣列說明及其初值的分辨 例項 一 int a 4 示例 二 int a 3 4 類似於這兩者的說明,陣列a的每個元素都可得到初值0。以此 衍生到示例 三 int a 3 其陣列a中包含9個元素,且第一維大小為3.對此與int a 3 做出對比 此二維陣列的第一維大小為3.值得注意的是 int a...
WINDOWS程式設計 複習(2)
可選mm anisotropic 任意 x y 可選可選 上面這個圖我是從這個部落格轉過來的。至於有什麼區別了,我覺得說不清楚,直接給上測試 吧 include lresult callback wndproc hwnd,uint,wparam,lparam int winapi winmain h...
CSS複習總結(2)
接上週,繼續複習css css主要是對網頁樣式的修改,比如字型大小顏色的設定等等,也可以通過一些標籤起到批量修改的效果,css樣式由選擇符和宣告組成,宣告又由屬性和值組成。如p,是將網頁中所有段的字型大小變為20px,顏色變為紅色。在之間插入css 的一種格式,可以與span連用以達到修改特定字元的...