题目 › fcs-85

FrontierCS #85

FrontierCS 算法赛道 v1.1 · 2026-05 · L5 开放式 · C++17 · 时限 2 秒 · 0–100 连续分

查看原题跳到结果

题面

来源:FrontierCS 官方 statement.txt,与模型收到的题面相同。

Maze Time limit: 2s Memory limit: 512MB 3.1 Background The subject of this work is SCP-167. It is recommended to review information about SCP-167 before proceeding with the work. 3.2 Description SCP-167 can be roughly described as a point connected to an infinitely deep binary tree, as shown in the figure below. Level 0 o | Level 1 o / Level 2 o ... / Level 3 o ... o o o We define the point at Level 0 as the exit of SCP-167. To prevent researchers from getting lost inside SCP-167, you need to write a pathfinding system to help SCP-167 researchers find the exit. For a researcher lost in SCP-167, because the three edges connected to their current node are highly similar, they cannot tell which edge leads towards the exit. In SCP-167, one becomes lost as soon as they cannot determine the absolute position of their current node. At this point, all you know is the relative path between points. To easily describe relative paths, we can assume each edge is one of three colors: red, yellow, or blue, and the three edges connected to any single node are all different colors. Thus, each move can be represented by a color, indicating the edge of that color. Simultaneously, you have a ranging device that can measure the distance between your current node and the exit. Assume you are lost in SCP-167. You only know the initial distance initialDeep between your current node and the exit, but not the absolute position of this node. Please write a pathfinding system to locate the exit. 3.3 Task Description To simulate being lost, we have prepared an interaction library. You will read initialDeep from the standard input, which represents the distance between your initial position and the exit. Here, initialDeep ≤ 10^4. You can perform the following two operations by outputing to the interactor by standard output. After each operation, you need to flush the output and read the returned value of the interactor from the standard input. "move c" where c is an integer 0, 1, or 2, which represent red, yellow and blue respectively. You can perform such operation for at most 10^5 times. Once you have reached the exit, you must not move again. The interactor will return 1 if you reach the exit after the move. Otherwise, it will return 0. "query" The interactor will return the distance between your current node and the exit. You may make at most 100000 distance queries; exceeding this limit receives zero points. This limit is separate from the limit of 100000 moves. The number of times you make a query will determine your score. Details are shown below. ## Scoring All feasibility and interaction limits apply before scoring; invalid output receives zero. Points are averaged over test files. For the logarithmic branch, write x for the original minimizing quantity and a for its physical 60-point reference. The improvement factor is r=a/x, and the upper-band award is P=min(100,60+ln(r)). Here ln is natural: r=1 corresponds to 60 points, and on the uncapped logarithmic upper band, r=exp(P-60). Each additional point multiplies the physical improvement factor by e (divides a minimizing objective by e or multiplies a maximizing objective by e, as applicable). The lower-band, zero-objective, and completion rules below still apply. Q is the number of distance queries. Define the objective x=Q, its physical reference a=A=5000, and the lower-band calculation L=60*5001/(Q+1). ```text P = 100, if x = 0 P = L, if L <= 60 and x > 0 P = min(100, 60 + ln(r)), otherwise ``` Zero is tested on the valid original count, cost, or error, before the lower-band test. A zero reference anchor has no positive improvement branch; positive objectives keep their lower-band score. The +1 shift is used only in L, not in the logarithm. The checker reports P/100.

结果

Kimi K3.1 ProKimi

max

0.0

平均得分 ↑

  • 0.0采样 1 · 编译错误
  • 39.3k平均输出 token(含思考) ↓
  • 27.7输出速度 tokens/s ↑
  • 1422 秒延迟 ↓

Kimi K3.1 Pro(high)Kimi high

high

59.8

平均得分 ↑

  • 59.8采样 1 · 部分分
  • 10.7k平均输出 token(含思考) ↓
  • 24.1输出速度 tokens/s ↑
  • 445 秒延迟 ↓

DeepSeek Flash V4.1-1017DeepSeek

auto(high)

59.8

平均得分 ↑

  • 59.8采样 1 · 部分分
  • 71.3k平均输出 token(含思考) ↓
  • 175.3输出速度 tokens/s ↑
  • 408 秒延迟 ↓

MiniMax M3.1 FlashMiniMax

auto(max)

59.6

平均得分 ↑

  • 59.6采样 1 · 部分分
  • 81.7k平均输出 token(含思考) ↓
  • 84.2输出速度 tokens/s ↑
  • 971 秒延迟 ↓

↑ 越大越好,↓ 越小越好。得分 0–100,按官方时限判定,所有测试点都满分才算解出。CPU 时间 / 官方解为解出的答案在官方解最慢的 3 个测试点上的 CPU 时间之比(几何平均),只比较官方解至少需要 0.05 秒的题;复杂度按增长幂次相对官方解分类。判题与计分见 原理。

代码

Kimi K3.1 Pro · 采样 1 · 32 行
#include <bits/stdc++.h>
using namespace std;

static mt19937 rng((unsigned)chrono::steady_clock::now().time_since_epoch().count());
static int movesUsed = 0;

bool makeMove(int c) {
    cout << "move " << c << '\n' << flush;
    int result;
    cin >> result;
    ++movesUsed;
    return result == 1;
}

int makeQuery() {
    cout << "query\n" << flush;
    int distance;
    cin >> distance;
    return distance;
}

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

    int depth;
    if (!(cin >> initialDeep)) {
        return 0;
    }

    return 0;
}