제출 #1370398

#제출 시각아이디문제언어결과실행 시간메모리
1370398solution6312Theseus (CEOI25_theseus)C++17
0 / 100
2 ms1920 KiB
#include <vector>
#include <cassert>
#include <queue>
#include <iostream>
using namespace std;
using pii=pair<int, int>;

vector<int> paint(int N, vector<pii> E, int T)
{
    vector<int> ans;
    for (auto [U, V]:E) ans.push_back((U==T || V==T));
}

int travel(int N, int U, vector<pii> G)
{
    for (auto [x, y]:G)
    {
        if (y)
        {
            return x;
        }
    }
}

컴파일 시 표준 에러 (stderr) 메시지

theseus.cpp: In function 'std::vector<int> paint(int, std::vector<std::pair<int, int> >, int)':
theseus.cpp:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^
theseus.cpp: In function 'int travel(int, int, std::vector<std::pair<int, int> >)':
theseus.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…