제출 #1349796

#제출 시각아이디문제언어결과실행 시간메모리
1349796blameazu마술쇼 (APIO24_show)C++20
0 / 100
2 ms580 KiB
#include <bits/stdc++.h>
using namespace std;

#include "Alice.h"

vector<pair<int,int> > Alice(){
    const int N = 5000;
	long long x = setN(N);
    vector<pair<int, int> > re;
    for(int i = 1; i <= N; i++) if(i != (int)x) {
        re.push_back({(int)x, i});
    }
    return re;
}
#include <bits/stdc++.h>
using namespace std;

#include "Bob.h"

long long Bob(vector<pair<int,int> > edges){
	const int N = 5000;
    int n = N;
    vector<int> deg(n+1);
    for(auto &[a, b] : edges) deg[a]++, deg[b]++;
    for(int i = 1; i <= n; i++) if(deg[i] != 1) {
        return (long long)i;
    }
}

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

# 2번째 컴파일 단계

Bob.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...