답안 #839932

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
839932 2023-08-30T21:24:10 Z pere_gil 가장 긴 여행 (IOI23_longesttrip) C++17
5 / 100
972 ms 328 KB
#include "longesttrip.h"
#include "bits/stdc++.h"
using namespace std;

#define vi vector<int>
#define ii pair<int,int>

vi longest_trip(int n, int d){
  int st=-1,en=-1;
  for(int i=0;i<n;i++)
    for(int j=i+1;j<n;j++)
      if(!are_connected({i},{j}))
	st=i,en=j;

  vi res;
  if(st!=-1) res.push_back(st);
  for(int i=0;i<n;i++)
    if(i!=st && i!=en) res.push_back(i);
  if(en!=-1) res.push_back(en);
  
  return res;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Incorrect
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 208 KB Output is correct
2 Correct 30 ms 208 KB Output is correct
3 Correct 219 ms 260 KB Output is correct
4 Correct 378 ms 208 KB Output is correct
5 Correct 972 ms 328 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 208 KB Output is correct
2 Correct 27 ms 208 KB Output is correct
3 Correct 207 ms 208 KB Output is correct
4 Correct 545 ms 208 KB Output is correct
5 Correct 899 ms 276 KB Output is correct
6 Correct 14 ms 208 KB Output is correct
7 Incorrect 1 ms 208 KB Incorrect
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 208 KB Output is correct
2 Correct 17 ms 208 KB Output is correct
3 Correct 168 ms 208 KB Output is correct
4 Correct 475 ms 208 KB Output is correct
5 Correct 824 ms 208 KB Output is correct
6 Correct 12 ms 208 KB Output is correct
7 Incorrect 1 ms 208 KB Incorrect
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 208 KB Output is correct
2 Correct 28 ms 208 KB Output is correct
3 Partially correct 198 ms 208 KB Output is partially correct
4 Partially correct 424 ms 208 KB Output is partially correct
5 Partially correct 898 ms 304 KB Output is partially correct
6 Correct 12 ms 208 KB Output is correct
7 Incorrect 1 ms 208 KB Incorrect
8 Halted 0 ms 0 KB -