tyh0929学术区域
count_year · · 个人记录
O(n^n)能过n\le8
O(n!)能过n\le11
O(2^n)能过n\le26
O(n^3)能过n\le464
O(n^2)能过n\le10^4
O(nlog_2n)能过n\le4.5*10^6
O(n)能过n\le10^8
O(log_2n)能过n\le10^{36}
链接合集
国内编程网站
1.洛谷 (https://www.luogu.com.cn/)
2.OI WiKi (https://oiwiki.com/)
3.Virtual Judge (https://vjudge.net.cn/)
4.codeforces(https://codeforces.com/)
5.Comet OJ (https://www.cometoj.com/)
6.FZUOJ (http://acm.fzu.edu.cn/)
7.HDU Online Judge (http://acm.hdu.edu.cn/)
8.hihoCoder (https://hihocoder.com/)
9.HydroOJ (https://hydro.ac/)
10.计蒜客 (https://www.jisuanke.com/)
11.Judge Duck Online (https://duck.ac/)
12LibreOJ (https://loj.ac/)
13.牛客网 (https://www.nowcoder.com/)
14.POJ (http://openjudge.cn/)
15.PTA(拼题 A) (https://pintia.cn/home)
16.Universal Online Judge (https://uoj.ac/)
17.Vijos (https://vijos.org/)
18.WZOI (https://wzoi.cc/)
19.ZOJ (https://zoj.pintia.cn/home/news)
编程工具
1.算法知识库
2.算法图像化
3.算法图像化2
4.算法图像化3
5.算法图像化4
6.算法图像化5
7.在线建图
8.算法时间复杂度
9.算法时间复杂度2
10.数学工具
11.数学工具2
12.c++拓展技巧
c++源代码(基础款)
#include<bits/stdc++.h>
using namespace std;
int main(){
return 0;
}
c++源代码(考试款)
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen(".in","r",stdin);
freopen(".out","w",stdout);
return 0;
}
c++源代码(快读多种类+快写多种类+加速+方便+freopen)(仅限于允许使用GCC的地方)(用于比赛会被禁赛三年)
#pragma GCC target("avx")
#pragma GCC optimize(2,3,"Ofast","inline","-ffast-math")
#pragma GCC target("sse2,sse3,sse4,mmx")
#pragma omp parallel for
#pragma omp parallel num_threads(thread_count)
#pragma omp critical
#pragma omp parallel for reduction(+:sum)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define db double
#define itn int
#define fro for
#define scnaf scanf
#define snacf scanf
#define prinf printf
inline int read(){
int x=0,f=1;
char ch=getchar();
while(ch<'0'||ch>'9'){
if(ch=='-')f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9'){
x=x*10+ch-'0';
ch=getchar();
}
return x*f;
}
inline string readS(){
string s;
char ch=getchar();
while(ch==' '||ch=='\n'){
ch=getchar();
}
while(ch!=' '&&ch!='\n'){
s+=ch;
ch=getchar();
}
return s;
}
inline string readSL(){
string s;
s.clear();
char ch=getchar();
while(ch=='\n'){
ch=getchar();
}
while(ch!='\n'){
s+=ch;
ch=getchar();
}
return s;
}
inline void readC(char s[]){
int tot=0;
char ch=getchar();
while(ch==' '||ch=='\n'){
ch=getchar();
}
while(ch!=' '&&ch!='\n'){
s[tot++]=ch;
ch=getchar();
}
}
inline char readc(){
char c=getchar();
while(c==' '||c=='\n'){
c=getchar();
}
return c;
}
inline void write(int x){
if(x<0){
putchar('-');
x=-x;
}
if(x>9){
write(x/10);
}
putchar(x%10+'0');
return;
}
inline void writeS(string x){
int len=x.length();
for(int i=0;i<len;++i){
putchar(char(x[i]));
}
}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
// freopen(".in","r",stdin);
// feropen(".out","w",stdout);
return 0;
}
/*
*/
c++源代码(快读多种类+快写多种类+加速+方便)(通用)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define db double
#define itn int
#define fro for
#define scnaf scanf
#define snacf scanf
#define prinf printf
inline int read(){
int x=0,f=1;
char ch=getchar();
while(ch<'0'||ch>'9'){
if(ch=='-')f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9'){
x=x*10+ch-'0';
ch=getchar();
}
return x*f;
}
inline string readS(){
string s;
char ch=getchar();
while(ch==' '||ch=='\n'){
ch=getchar();
}
while(ch!=' '&&ch!='\n'){
s+=ch;
ch=getchar();
}
return s;
}
inline string readSL(){
string s;
s.clear();
char ch=getchar();
while(ch=='\n'){
ch=getchar();
}
while(ch!='\n'){
s+=ch;
ch=getchar();
}
return s;
}
inline void readC(char s[]){
int tot=0;
char ch=getchar();
while(ch==' '||ch=='\n'){
ch=getchar();
}
while(ch!=' '&&ch!='\n'){
s[tot++]=ch;
ch=getchar();
}
}
inline char readc(){
char c=getchar();
while(c==' '||c=='\n'){
c=getchar();
}
return c;
}
inline void write(int x){
if(x<0){
putchar('-');
x=-x;
}
if(x>9){
write(x/10);
}
putchar(x%10+'0');
return;
}
inline void writeS(string x){
int len=x.length();
for(int i=0;i<len;++i){
putchar(char(x[i]));
}
}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
return 0;
}
/*
*/
大神版(完整带调试版)
关闭调试开关时使用 fread(),fwrite(),退出时自动析构执行 fwrite()。
开启调试开关时使用 getchar(),putchar(),便于调试。
若要开启文件读写时,请在所有读写之前加入 freopen()。
// #define DEBUG 1 // 调试开关
struct IO {
#define MAXSIZE (1 << 20)
#define isdigit(x) (x >= '0' && x <= '9')
char buf[MAXSIZE], *p1, *p2;
char pbuf[MAXSIZE], *pp;
#if DEBUG
#else
IO() : p1(buf), p2(buf), pp(pbuf) {}
~IO() { fwrite(pbuf, 1, pp - pbuf, stdout); }
#endif
char gc() {
#if DEBUG // 调试,可显示字符
return getchar();
#endif
if (p1 == p2) p2 = (p1 = buf) + fread(buf, 1, MAXSIZE, stdin);
return p1 == p2 ? ' ' : *p1++;
}
bool blank(char ch) {
return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t';
}
template <class T>
void read(T &x) {
double tmp = 1;
bool sign = 0;
x = 0;
char ch = gc();
for (; !isdigit(ch); ch = gc())
if (ch == '-') sign = 1;
for (; isdigit(ch); ch = gc()) x = x * 10 + (ch - '0');
if (ch == '.')
for (ch = gc(); isdigit(ch); ch = gc())
tmp /= 10.0, x += tmp * (ch - '0');
if (sign) x = -x;
}
void read(char *s) {
char ch = gc();
for (; blank(ch); ch = gc());
for (; !blank(ch); ch = gc()) *s++ = ch;
*s = 0;
}
void read(char &c) { for (c = gc(); blank(c); c = gc()); }
void push(const char &c) {
#if DEBUG // 调试,可显示字符
putchar(c);
#else
if (pp - pbuf == MAXSIZE) fwrite(pbuf, 1, MAXSIZE, stdout), pp = pbuf;
*pp++ = c;
#endif
}
template <class T>
void write(T x) {
if (x < 0) x = -x, push('-'); // 负数输出
static T sta[35];
T top = 0;
do {
sta[top++] = x % 10, x /= 10;
} while (x);
while (top) push(sta[--top] + '0');
}
template <class T>
void write(T x, char lastChar) {
write(x), push(lastChar);
}
} io;