已 hack 全部题解
查看原帖
已 hack 全部题解
315448
whdywjd楼主2024/12/19 14:31

输入由以下代码生成:

#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define ll long long
#define o1 first
#define o2 second
#define omp make_pair
#define opb push_back
#define opc pop_back()
#define inf 3423423423423423422ll
#define MAX_N 522222

using namespace std;

ll read(){ll x = 0;char c = 0;bool v = 0;do{c = getchar();if(c == '-')v = 1;} while(c < '0' || c > '9');do{x = (x << 3) + (x << 1) + c - '0';c = getchar();} while(c >= '0' && c <= '9');return v ? -x : x;}
char gtc(){char c = 0;while(c < 33)c = getchar();return c;}

int n = 200000, q = 200000;

void oM()
{
    printf("%d %d\n", n, q);
    printf("10000000 ");
    for(int i = n / 2 - 1; i; i--)
        printf("%d ", i);
    for(int i = 2; i < n / 2; i++)
        printf("%d ", i);
    printf("10000000\n");
    for(int i = 1; i <= q - 10; i++)
    {
        if(i & 1)
            printf("0 %d %d %d\n", i - 1, n / 2 + 2, n);
        else
            printf("1 %d %d\n", i - 1, n / 2 + 2);
    }
    printf("3 0 7\n");
    printf("3 1 7\n");
    printf("3 2 7\n");
    printf("3 1000 7\n");
    printf("3 90000 7\n");
    printf("3 100000 7\n");
    printf("3 110000 7\n");
    printf("3 120000 7\n");
    printf("3 199000 7\n");
    printf("3 199001 7\n");
}

void oC()
{
    ;
}

void oE()
{
    ;
}

int main()
{
    oE();
    int T = 1;
    while(T--)
        oM(), oC();
    return 0;
}

输出:

0
200000
99994
99994
99994
99994
99994
99994
99994
200000

输出由 https://qoj.ac/submission/641909 在本地运行生成,但该代码在本题空间限制下会 MLE。

除第一篇题解外,所有题解均无法通过该组数据。第一篇题解未给出完整代码,但其线段树所开空间大小不足,推测也会产生错误。

2024/12/19 14:31
加载中...