hack 两篇复杂度错误的题解。
查看原帖
hack 两篇复杂度错误的题解。
679936
sunkuangzheng楼主2024/4/25 18:08

直接全 F 即 TLE。

O(n3log⁡n)\mathcal O(n^3 \log n) 草 n=1000n = 1000,是不是有点困难了。

gen 如下:

/**
 *    author: sunkuangzheng
 *    created: 25.04.2024 17:52:24
**/
#include<bits/stdc++.h>
#ifdef DEBUG_LOCAL
#include <mydebug/debug.h>
#endif
using ll = long long;
const int N = 5e5+5;
using namespace std;
int T,n;
void los(){
    
}int main(){
    //freopen("p4147.in","w",stdout);
    ios::sync_with_stdio(0),cin.tie(0);
    cout << 1000 << " " << 1000 << "\n";
    for(int i = 1;i <= 1000;i ++,cout << "\n") for(int j = 1;j <= 1000;j ++)
        cout << "FR"[(i & 1) && (j & 1)];
}

测评结果(TLE 1.20s)。

2024/4/25 18:08
加载中...