QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#21216#2810. SpeedrunQingyu0 ✓0ms0kbC++201.6kb2022-03-03 17:24:162024-05-20 18:34:12

Judging History

你现在查看的是测评时间为 2024-05-20 18:34:12 的历史记录

  • [2024-06-05 09:11:28]
  • 管理员手动重测本题所有提交记录
  • 测评结果:100
  • 用时:60ms
  • 内存:3992kb
  • [2024-05-20 18:51:03]
  • 管理员手动重测本题所有提交记录
  • 测评结果:100
  • 用时:53ms
  • 内存:3976kb
  • [2024-05-20 18:46:47]
  • 管理员手动重测该提交记录
  • 测评结果:100
  • 用时:44ms
  • 内存:3936kb
  • [2024-05-20 18:44:57]
  • 管理员手动重测该提交记录
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-05-20 18:44:18]
  • 管理员手动重测该提交记录
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-05-20 18:37:33]
  • 管理员手动重测该提交记录
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-05-20 18:34:12]
  • 管理员手动重测该提交记录
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-17 10:47:04]
  • 评测
  • 测评结果:100
  • 用时:224ms
  • 内存:3852kb
  • [2022-03-03 17:24:16]
  • 提交

speedrun

#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
template<class T> void check_min(T &a, const T &b){ a = (a < b) ? a : b; }
template<class T> void check_max(T &a, const T &b){ a = (a > b) ? a : b; }
#define all(x) (x).begin(), (x).end()
 
void setHintLen (int l);
void setHint(int i, int j, bool b);
int getLength ();
bool getHint(int j);
bool goTo(int x);
 
const int N = 1000 + 3;
 
vector<int> adj[N], order;
int p[N], n;
 
void setNumber(int i, bool second, int num){
    for(int j = 0; j < 10; ++j)
        setHint(i, 10 * second + j + 1, (num >> j) & 1);
}
 
void dfs(int u, int par){
    order.push_back(u);
    p[u] = par;
 
    for(int to: adj[u]){
        if(to == par) continue;
 
        dfs(to, u);
    }
}
 
void assignHints(int subtask, int _n, int a[], int b[]){
    setHintLen(20);
 
    n = _n;
 
    for(int i = 1; i < n; ++i){
        adj[a[i]].push_back(b[i]);
        adj[b[i]].push_back(a[i]);
    }
 
    dfs(1, 1);
 
    for(int i = 0; i < n; ++i){
        int x = order[i];
        setNumber(x, 0, p[x]);
        if(i == n - 1) setNumber(x, 1, x);
        else setNumber(x, 1, order[i + 1]);
    }
}
 
int getNumber(bool second){
    int result = 0;
    for(int j = 0; j < 10; ++j)
        result += ((int)getHint(10 * second + j + 1)) << j;
    return result;
}
 
void speedrun(int subtask, int _n, int start){
    n = _n;
 
    while(start != 1)
        goTo(start = getNumber(0));
 
    while(getNumber(1) != start){
        int nxt = getNumber(1);
        while(!goTo(nxt))
            goTo(start = getNumber(0));
        start = nxt;
    }
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Interactor1 Dangerous Syscalls

Test #1:

score: 0
Interactor1 Dangerous Syscalls

input:


output:


input:


output:


result:


Subtask #2:

score: 0
Interactor1 Dangerous Syscalls

Test #5:

score: 0
Interactor1 Dangerous Syscalls

input:


output:


input:


output:


result:


Subtask #3:

score: 0
Interactor1 Dangerous Syscalls

Test #7:

score: 0
Interactor1 Dangerous Syscalls

input:


output:


input:


output:


result:


Subtask #4:

score: 0
Interactor1 Dangerous Syscalls

Test #10:

score: 0
Interactor1 Dangerous Syscalls

input:


output:


input:


output:


result:


Subtask #5:

score: 0
Interactor1 Dangerous Syscalls

Test #16:

score: 0
Interactor1 Dangerous Syscalls

input:


output:


input:


output:


result: