답안 #839739

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
839739 2023-08-30T15:49:35 Z model_code 가장 긴 여행 (IOI23_longesttrip) C++17
15 / 100
214 ms 208 KB
// protocol_violation/sol_birka0_D2_rand.cpp

#include "longesttrip.h"

#include <algorithm>
#include <random>

using namespace std;

random_device rd;
mt19937 g(rd());

vector<int> longest_trip(int N, int /*D*/)
{
    vector<int> t;
    for (int i = 0; i < N; ++i)
    {
        t.push_back(i);
    }
    bool ok = false;
    while (!ok)
    {
        shuffle(t.begin(), t.end(), g);
        ok = true;
        for (int i = 0; i + 1 < N; ++i)
        {
            if (!are_connected({t[i]}, {t[i + 1]}))
            {
                ok = false;
                break;
            }
        }
    }

    return t;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 201 ms 208 KB too many calls
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 208 KB Output is correct
2 Correct 8 ms 208 KB Output is correct
3 Correct 13 ms 208 KB Output is correct
4 Correct 9 ms 208 KB Output is correct
5 Correct 6 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 208 KB Output is correct
2 Correct 9 ms 208 KB Output is correct
3 Correct 9 ms 208 KB Output is correct
4 Correct 6 ms 208 KB Output is correct
5 Correct 9 ms 208 KB Output is correct
6 Correct 14 ms 208 KB Output is correct
7 Correct 13 ms 208 KB Output is correct
8 Correct 16 ms 208 KB Output is correct
9 Correct 9 ms 208 KB Output is correct
10 Correct 22 ms 208 KB Output is correct
11 Correct 18 ms 208 KB Output is correct
12 Correct 8 ms 208 KB Output is correct
13 Correct 9 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 208 KB Output is correct
2 Correct 7 ms 208 KB Output is correct
3 Correct 7 ms 208 KB Output is correct
4 Correct 9 ms 208 KB Output is correct
5 Correct 7 ms 208 KB Output is correct
6 Correct 18 ms 208 KB Output is correct
7 Correct 16 ms 208 KB Output is correct
8 Correct 14 ms 208 KB Output is correct
9 Correct 15 ms 208 KB Output is correct
10 Correct 16 ms 208 KB Output is correct
11 Correct 9 ms 208 KB Output is correct
12 Correct 13 ms 208 KB Output is correct
13 Correct 13 ms 208 KB Output is correct
14 Incorrect 187 ms 208 KB too many calls
15 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 9 ms 208 KB Output is correct
2 Correct 9 ms 208 KB Output is correct
3 Correct 6 ms 208 KB Output is correct
4 Correct 5 ms 208 KB Output is correct
5 Correct 8 ms 208 KB Output is correct
6 Correct 19 ms 208 KB Output is correct
7 Correct 11 ms 208 KB Output is correct
8 Correct 15 ms 208 KB Output is correct
9 Correct 14 ms 208 KB Output is correct
10 Partially correct 16 ms 208 KB Output is partially correct
11 Partially correct 11 ms 208 KB Output is partially correct
12 Partially correct 11 ms 208 KB Output is partially correct
13 Partially correct 11 ms 208 KB Output is partially correct
14 Incorrect 214 ms 208 KB too many calls
15 Halted 0 ms 0 KB -