如果你 A 了好多点 但 T 了好多点的话,44,54, 64分的。
查看原帖
如果你 A 了好多点 但 T 了好多点的话,44,54, 64分的。
395825
AThls123楼主2023/3/28 11:07

你需要的不仅仅是快读,还有快写。

int read() {
    char c; int sign = 1;
    while((c = getchar()) < '0' || c > '9') if(c == '-') sign = -1;
    int res = c - '0';
    while((c = getchar()) >= '0' && c <= '9') res = res * 10 + c - '0';
    return res * sign;
}

void write(int x) {
    if(x > 9) write(x/10);
    putchar(x%10 + '0');
}

void writen(int x) {
    if(x < 0) {
        putchar('-');
        x = -x;
    }
    write(x);
    puts("");
}

实测加了快写,快了四倍

2023/3/28 11:07
加载中...