「赛后总结」20200902

得分情况

预计得分:(large 0 + 100 + 0 + 0 + 38 + 20 = 158)

实际得分:(large 0 + 60 + 0 + 0 + 18 + 20 = 98)

考场上

开 T1,题目是截图。。题意简洁好评,看数据范围,没暴力分差评(可能我暴力太暴力了)。直接过。

开 T2,感觉是一道矩阵乘法优化递推,就是模数有点大,用了龟速乘写完拍了会小数据没锅。交了。

拍上之后因为肚子疼去上了个厕所,读了 T3、T4 和 T5 的题。

开 T3,神仙题,好像之前讲过,但我不会。过。

开 T4,不会正解,有暴力分,但不知道怎么写也感觉很麻烦就过了。

开 T5,部分分很多也感觉很可做(直到讲题前才发现我题意理解错了)。

开 T6,只有不到三十分钟了,还在听心心直播。

T1 #515. 「LibreOJ β Round #2」贪心只能过样例

考场代码

sb 暴力。

#include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
#include <algorithm>
#define MAXN 101

int n, ans, a[MAXN], b[MAXN], w[MAXN];
bool vis[1648518];

void dfs(int step, int now) {
    if (step > n) {
        if (!vis[now]) {
            ++ans;
            vis[now] = true;
        }
        return;
    }
    for (int i = a[step]; i <= b[step]; ++i) {
        dfs(step + 1, now + w[i]);
    }
}

int main() {
    scanf("%d", &n);
    for (int i = 1; i <= 100; ++i) w[i] = i * i;
    for (int i = 1; i <= n; ++i) {
        scanf("%d %d", &a[i], &b[i]);
        if (a[i] > b[i]) std::swap(a[i], b[i]);
    }
    dfs(1, 0);
    std::cout << ans << '
';
    return 0;
}

正解

T2 P2044 [NOI2012]随机数生成器

考场代码

炸了int了,我记得我开了long long啊/yiw

不放考场代码了就差了个long long

正解

原文地址:https://www.cnblogs.com/poi-bolg-poi/p/13603476.html