QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#236554#2810. SpeedrunAhmed57#0 0ms0kbC++23839b2023-11-04 05:47:542023-11-04 05:47:55

Judging History

你现在查看的是测评时间为 2023-11-04 05:47:55 的历史记录

  • [2024-06-05 09:14:30]
  • 管理员手动重测本题所有提交记录
  • 测评结果:21
  • 用时:537ms
  • 内存:3944kb
  • [2024-05-20 18:53:03]
  • 管理员手动重测本题所有提交记录
  • 测评结果:21
  • 用时:488ms
  • 内存:3988kb
  • [2023-11-04 05:47:55]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-11-04 05:47:54]
  • 提交

speedrun

#include <bits/stdc++.h>
#include "speedrun.h"
using namespace std;
void setHintLen(int l);
void setHint(int i, int j, bool b);
int getLength();
bool getHint(int j);
bool goTo(int x);
vector<int> adj[1001];
void assignHints(int subtask,int N,int A[],int B[]){
    setHintLen(N);
    for(int i = 1;i<N;i++){
        adj[A[i]].push_back(B[i]);
        adj[B[i]].push_back(A[i]);
    }
    for(int i = 1;i<=N;i++){
        for(int j = 0;j<adj[i].size();j++){
            setHint(i,adj[i][j],1);
        }
    }
}
int vis[1001];
int n;
void dfs(int i){
    vis[i] = 1;
    for(int j = 1;j<=n;j++){
        if(vis[j])continue;
        if(getHint(j)){
            goTo(j);
            dfs(j);
            goTo(i);
        }
    }
}
void speedrun(int subtask, int N, int start){
    n = N;
    dfs(start);
}

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: