답안 #842036

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
842036 2023-09-02T10:26:50 Z vjudge1 Speedrun (RMI21_speedrun) C++17
0 / 100
3500 ms 4080 KB
#include <bits/stdc++.h>
#include "speedrun.h"

using namespace std;
 
typedef long long ll;

// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
// #pragma optimization_level 3
 
// Defines
 
#define pb push_back // kak push_back 5
#define endl '\n'
#define FOR(i,start,end) for(int i = start;i < end;i ++)
#define REV(i,start,end) for(int i = start;i >= end;i --)
#define precal(x) fixed << setprecision(x)
#define F first
#define S second
#define sz(x) (ll)x.size()
#define all(x) (x).begin(),(x).end()
#define m_p make_pair
#define mt make_tuple
#define str to_string

// #ifndef ONLINE_JUDGE
//     #define cerr if(false) cerr
// #endif
 

int k[1001][1001];

// void setHintLen(int l){

// }

// void setHint(int i, int j, bool b){

// }

// int getLength(){

// }

// bool getHint(int j){

// }

// bool goTo(int x){

// }

bool used[1001];

void dfs(ll x,ll pr,ll start,ll N){
    used[x] = true;
    for(int i = 1;i <= N;i ++){
        if(used[i] == true) continue;
        bool check = goTo(i);
        if(check == true){
            bool t = goTo(i);
            dfs(i,x,start,N);
        }
    }
    if(x == start) return;
    bool t = goTo(pr);
}

void assignHints(int subtask, int N, int A [], int B []){
    if(subtask == 1){
        setHintLen(N);
        for(int i = 1;i <= N - 1;i ++){
            k[A[i]][B[i]] = 1,k[B[i]][A[i]] = 1;
        }
        for(int i = 1;i <= N;i ++){
            for(int j = 1;j <= N;j ++){
                if(i == j) continue;
                setHint(i,j,bool(k[i][j]));
            }
        }
    }
    return;
}

void speedrun(int subtask, int N, int start ){
    if(subtask == 1){
        int l = getLength(),pos = start;
        dfs(start,start,start,N);
    }
    return;
}

Compilation message

speedrun.cpp: In function 'void dfs(ll, ll, ll, ll)':
speedrun.cpp:64:18: warning: unused variable 't' [-Wunused-variable]
   64 |             bool t = goTo(i);
      |                  ^
speedrun.cpp:69:10: warning: unused variable 't' [-Wunused-variable]
   69 |     bool t = goTo(pr);
      |          ^
speedrun.cpp: In function 'void speedrun(int, int, int)':
speedrun.cpp:90:13: warning: unused variable 'l' [-Wunused-variable]
   90 |         int l = getLength(),pos = start;
      |             ^
speedrun.cpp:90:29: warning: unused variable 'pos' [-Wunused-variable]
   90 |         int l = getLength(),pos = start;
      |                             ^~~
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3528 ms 4080 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB setHintLen was never called
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 340 KB setHintLen was never called
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB setHintLen was never called
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB setHintLen was never called
2 Halted 0 ms 0 KB -