跳到正文

个人记录

锐评 openai o1 模型

xzggzh1约 8 分钟
原文
文章信息与版本

文章信息

发布
2024年9月13日
收录
2026年5月19日
更新
2026年11月13日
篇幅
约 8 分钟

版本

  1. v1当前

https://openai.com/index/learning-to-reason-with-llms/

这个网站是英文原文的官网介绍。

听起来很厉害,说是ioi不限次数提交能拿金牌。

但是事实上放出的还是preview版本,然后拿金牌的还是加强版。(preview版本,原版,加强版还是有很大区别的)

借了同学的号去测试了 o1 preview 的水平(因为现在只能测到这个 24/9/12)

题目是这个超超的序列,是孙1超之前出的题。

结果是 远远做不出来。其实也合理,cf1258分也敢挑战提高难度的题?

重点是,o1 ioi版本能否完整做出这个题,或者说,能否在prompt engineering 以及告知评测结果的前提下迭代出最终的解决这个题的代码

这个还有待测试,我还是非常期待这个结果的。


后面贴一个preview给出的代码

NOT EVEN WRONG

建树的时候建的是普通线段树,根本不可能过。

C++
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
using namespace std;

// 快速读入
inline int read_int() {
    int x = 0, f = 1;
    char ch = getchar();
    while (!isdigit(ch)) {
        if (ch == '-') f = -1;
        ch = getchar();
    }
    while (isdigit(ch)) {
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}

typedef long long ll;

struct Node {
    int l, r;
    ll sum;
    ll lazy;
    Node *left, *right;
    Node(int l, int r): l(l), r(r), sum(0), lazy(0), left(nullptr), right(nullptr) {}
};

void build(Node* node, const vector<int>& a) {
    if (node->l == node->r) {
        node->sum = a[node->l];
        return;
    }
    int mid = (node->l + node->r) / 2;
    node->left = new Node(node->l, mid);
    node->right = new Node(mid + 1, node->r);
    build(node->left, a);
    build(node->right, a);
    node->sum = node->left->sum + node->right->sum;
}

void push(Node* node) {
    if (node->lazy != 0) {
        if (node->l != node->r) {
            node->left->lazy += node->lazy;
            node->right->lazy += node->lazy;
        }
        node->sum += (node->r - node->l + 1) * node->lazy;
        node->lazy = 0;
    }
}

void update(Node* node, int l, int r, int m, int residue, ll v) {
    push(node);
    if (node->r < l || node->l > r) {
        return;
    }
    int s = node->l + ((residue - node->l % m + m) % m);
    if (s > node->r) {
        return;
    }
    ll cnt = (node->r - s) / m + 1;
    ll total_positions = node->r - node->l + 1;
    if (cnt == 0) {
        return;
    }
    if (cnt == total_positions) {
        node->lazy += v;
        push(node);
    } else {
        update(node->left, l, r, m, residue, v);
        update(node->right, l, r, m, residue, v);
        node->sum = node->left->sum + node->right->sum;
    }
}

ll query(Node* node, int l, int r, int m, int residue) {
    push(node);
    if (node->r < l || node->l > r) {
        return 0;
    }
    int s = node->l + ((residue - node->l % m + m) % m);
    if (s > node->r) {
        return 0;
    }
    ll cnt = (node->r - s) / m + 1;
    ll total_positions = node->r - node->l + 1;
    if (cnt == 0) {
        return 0;
    }
    if (cnt == total_positions) {
        return node->sum;
    } else {
        return query(node->left, l, r, m, residue) + query(node->right, l, r, m, residue);
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n = read_int();
    int m = read_int();

    vector<int> a(n);
    for (int i = 0; i < n; ++i) {
        a[i] = read_int();
    }

    Node* root = new Node(0, n - 1);
    build(root, a);

    ll lastans = 0;

    for (int i = 0; i < m; ++i) {
        int op_prime = read_int();
        int op = (lastans + op_prime) % 2 + 1;
        if (op == 1) {
            int x = read_int();
            int y = read_int();
            ll v = read_int();
            int m_value = 1 << x;
            int residue = y % m_value;
            update(root, 0, n - 1, m_value, residue, v);
        } else {
            int x = read_int();
            int y = read_int();
            int m_value = 1 << x;
            int residue = y % m_value;
            ll ans = query(root, 0, n - 1, m_value, residue);
            cout << ans << '\n';
            lastans = ans;
        }
    }
    return 0;
}
原文