Tarjan 整理
Posted dgklr
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Tarjan 整理相关的知识,希望对你有一定的参考价值。
Tarjan 【整理】
#include<bits/stdc++.h>
using namespace std;
class FastIO{
/* copyright (c) dgklr 2019. All rights reserved. */
bool if_debug = 0;
char st[70]; // stack
int pl;
#ifdef linux
#define putc(x) putchar_unlocked(x)
#define getc() getchar_unlocked()
#else
#define putc(x) putchar(x)
#define getc() getchar()
#endif
#define endl '
' // I don't have the authority to get this.
public:
FastIO operator << (long long x){
pl = 0;
if (x == 0) putc('0');
if (x < 0) putc('-');
while (x != 0)
st[++pl] = x % 10 + 48, x /= 10;
while (pl != 0)
putc(st[pl]), pl --;
return (*this);
}
FastIO operator << (int x){
pl = 0;
if (x == 0) putc('0');
if (x < 0) putc('-');
while (x != 0)
st[++pl] = x % 10 + 48, x /= 10;
while (pl != 0)
putc(st[pl]), pl --;
return (*this);
}
FastIO operator << (char c){
putc(c);
return (*this);
}
FastIO operator << (string s){
for (string::iterator it = s.begin(); it != s.end(); it ++)
putc(*it);
}
FastIO operator << (char *c){
int pl = 0;
while (c[pl] != '