제출 #1353782

#제출 시각아이디문제언어결과실행 시간메모리
1353782marizaTheseus (CEOI25_theseus)C++20
4 / 100
4 ms2352 KiB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

vector<int> paint(int n, vector<pair<int,int>> e, int t){
    ll m=e.size();

    vector<int> ans;
    for(ll i=0; i<m; i++){
        if(e[i].first==t || e[i].second==t) ans.push_back(1);
        else ans.push_back(0);
    }
    return ans;
}

int travel(int n, int u, vector<pair<int,int>> nxt) {
    for(auto i:nxt){
        if(i.second==1) return i.first;
    }
}

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

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