Submission #926150

# Submission time Handle Problem Language Result Execution time Memory
926150 2024-02-12T15:43:40 Z n1k Longest Trip (IOI23_longesttrip) C++17
5 / 100
3 ms 600 KB
#include "longesttrip.h"
#include <bits/stdc++.h>

using namespace std;

/*

D=3 N
all nodes have indegree N-1

D=2
OBSERVE:
Graph is connected
if 2 nodes are not connected all other nodes are connected to them
degree in N-1 or N-2
man kann immer zwischen 2er paaren huepfen

D=1
OBSERVE
    if 2 nodes are not connected all other nodes are connected to either node

find longest path ?

consider a connected component what can we say about it
    can we always find a path of length == SZ(component)

connected component
    add a node
    if there are 2 nodes not conneced then new node also has to be connected there

GUESS
    CC is fully connected besides 1 or 2 nodes


*/

std::vector<int> longest_trip(int N, int D){
    vector<int> ans(N); 
    iota(ans.begin(), ans.end(), 0);

    return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 344 KB Output is correct
2 Correct 1 ms 428 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 0 ms 600 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Incorrect 0 ms 344 KB Incorrect
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Incorrect 0 ms 344 KB Incorrect
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 344 KB Output is correct
2 Correct 1 ms 600 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Incorrect 0 ms 344 KB Incorrect
7 Halted 0 ms 0 KB -