이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "perm.h"
#include <bits/stdc++.h>
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define for0(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#endif
using ll = long long;
using ld = long double;
using vi = vector<int>;
template <class T>
bool uin(T &a, T b) {
return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
return a < b ? (a = b, true) : false;
}
mt19937 rng(chrono::system_clock::now().time_since_epoch().count());
namespace sub1 {
bool eligible(ll k) { return k <= 90; }
vi construct_permutation(ll k) {
vi ans;
ford(i, k - 1) { ans.pb(i); }
return ans;
}
}
namespace sub2 {
bool eligible(ll k) { return 1; }
vi construct_permutation(ll k) { return {}; }
}
std::vector<int> construct_permutation(long long k) {
if (sub1::eligible(k)) {
return sub1::construct_permutation(k);
}
if (sub2::eligible(k)) {
return sub2::construct_permutation(k);
}
}
컴파일 시 표준 에러 (stderr) 메시지
perm.cpp: In function 'std::vector<int> construct_permutation(long long int)':
perm.cpp:59:1: warning: control reaches end of non-void function [-Wreturn-type]
59 | }
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |