QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#870529 | #8614. 3D | ucup-team159# | AC ✓ | 21ms | 3968kb | C++23 | 23.9kb | 2025-01-25 16:41:58 | 2025-01-25 16:42:08 |
Judging History
answer
#line 1 "ucup3-27/D/main.cpp"
#define YOSUPO_AVX2_PRAGMA
// #undef YOSUPO_LOCAL
#line 2 "/home/vscode/yosupo-library/src/yosupo/fastio.hpp"
#include <unistd.h>
#include <algorithm>
#include <array>
#include <bit>
#include <cassert>
#include <cctype>
#include <cstdint>
#include <cstring>
#include <sstream>
#include <string>
#include <type_traits>
#include <vector>
#line 2 "/home/vscode/yosupo-library/src/yosupo/internal_type_traits.hpp"
#line 5 "/home/vscode/yosupo-library/src/yosupo/internal_type_traits.hpp"
namespace yosupo {
namespace internal {
template <class T>
using is_signed_int128 =
typename std::conditional<std::is_same<T, __int128_t>::value ||
std::is_same<T, __int128>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_unsigned_int128 =
typename std::conditional<std::is_same<T, __uint128_t>::value ||
std::is_same<T, unsigned __int128>::value,
std::true_type,
std::false_type>::type;
template <class T>
using make_unsigned_int128 =
typename std::conditional<std::is_same<T, __int128_t>::value,
__uint128_t,
unsigned __int128>;
template <class T>
using is_integral =
typename std::conditional<std::is_integral<T>::value ||
internal::is_signed_int128<T>::value ||
internal::is_unsigned_int128<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_signed_int = typename std::conditional<(is_integral<T>::value &&
std::is_signed<T>::value) ||
is_signed_int128<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_unsigned_int =
typename std::conditional<(is_integral<T>::value &&
std::is_unsigned<T>::value) ||
is_unsigned_int128<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using to_unsigned = typename std::conditional<
is_signed_int128<T>::value,
make_unsigned_int128<T>,
typename std::conditional<std::is_signed<T>::value,
std::make_unsigned<T>,
std::common_type<T>>::type>::type;
template <class T>
using is_integral_t = std::enable_if_t<is_integral<T>::value>;
template <class T>
using is_signed_int_t = std::enable_if_t<is_signed_int<T>::value>;
template <class T>
using is_unsigned_int_t = std::enable_if_t<is_unsigned_int<T>::value>;
template <class T> using to_unsigned_t = typename to_unsigned<T>::type;
} // namespace internal
} // namespace yosupo
#line 17 "/home/vscode/yosupo-library/src/yosupo/fastio.hpp"
namespace yosupo {
struct Scanner {
public:
Scanner(const Scanner&) = delete;
Scanner& operator=(const Scanner&) = delete;
Scanner(FILE* fp) : fd(fileno(fp)) { line[0] = 127; }
void read() {}
template <class H, class... T> void read(H& h, T&... t) {
bool f = read_single(h);
assert(f);
read(t...);
}
int read_unsafe() { return 0; }
template <class H, class... T> int read_unsafe(H& h, T&... t) {
bool f = read_single(h);
if (!f) return 0;
return 1 + read_unsafe(t...);
}
int close() { return ::close(fd); }
private:
static constexpr int SIZE = 1 << 15;
int fd = -1;
std::array<char, SIZE + 1> line;
int st = 0, ed = 0;
bool eof = false;
bool read_single(std::string& ref) {
if (!skip_space()) return false;
ref = "";
while (true) {
char c = top();
if (c <= ' ') break;
ref += c;
st++;
}
return true;
}
bool read_single(double& ref) {
std::string s;
if (!read_single(s)) return false;
ref = std::stod(s);
return true;
}
template <class T,
std::enable_if_t<std::is_same<T, char>::value>* = nullptr>
bool read_single(T& ref) {
if (!skip_space<50>()) return false;
ref = top();
st++;
return true;
}
template <class T,
internal::is_signed_int_t<T>* = nullptr,
std::enable_if_t<!std::is_same<T, char>::value>* = nullptr>
bool read_single(T& sref) {
using U = internal::to_unsigned_t<T>;
if (!skip_space<50>()) return false;
bool neg = false;
if (line[st] == '-') {
neg = true;
st++;
}
U ref = 0;
do {
ref = 10 * ref + (line[st++] & 0x0f);
} while (line[st] >= '0');
sref = neg ? -ref : ref;
return true;
}
template <class U,
internal::is_unsigned_int_t<U>* = nullptr,
std::enable_if_t<!std::is_same<U, char>::value>* = nullptr>
bool read_single(U& ref) {
if (!skip_space<50>()) return false;
ref = 0;
do {
ref = 10 * ref + (line[st++] & 0x0f);
} while (line[st] >= '0');
return true;
}
bool reread() {
if (ed - st >= 50) return true;
if (st > SIZE / 2) {
std::memmove(line.data(), line.data() + st, ed - st);
ed -= st;
st = 0;
}
if (eof) return false;
auto u = ::read(fd, line.data() + ed, SIZE - ed);
if (u == 0) {
eof = true;
line[ed] = '\0';
u = 1;
}
ed += int(u);
line[ed] = char(127);
return true;
}
char top() {
if (st == ed) {
bool f = reread();
assert(f);
}
return line[st];
}
template <int TOKEN_LEN = 0> bool skip_space() {
while (true) {
while (line[st] <= ' ') st++;
if (ed - st > TOKEN_LEN) return true;
if (st > ed) st = ed;
for (auto i = st; i < ed; i++) {
if (line[i] <= ' ') return true;
}
if (!reread()) return false;
}
}
};
struct Printer {
public:
template <char sep = ' ', bool F = false> void write() {}
template <char sep = ' ', bool F = false, class H, class... T>
void write(const H& h, const T&... t) {
if (F) write_single(sep);
write_single(h);
write<true>(t...);
}
template <char sep = ' ', class... T> void writeln(const T&... t) {
write<sep>(t...);
write_single('\n');
}
Printer(FILE* _fp) : fd(fileno(_fp)) {}
~Printer() { flush(); }
int close() {
flush();
return ::close(fd);
}
void flush() {
if (pos) {
auto res = ::write(fd, line.data(), pos);
assert(res != -1);
pos = 0;
}
}
private:
static std::array<std::array<char, 2>, 100> small;
static std::array<unsigned long long, 20> tens;
static constexpr size_t SIZE = 1 << 15;
int fd;
std::array<char, SIZE> line;
size_t pos = 0;
std::stringstream ss;
template <class T,
std::enable_if_t<std::is_same<char, T>::value>* = nullptr>
void write_single(const T& val) {
if (pos == SIZE) flush();
line[pos++] = val;
}
template <class T,
internal::is_signed_int_t<T>* = nullptr,
std::enable_if_t<!std::is_same<char, T>::value>* = nullptr>
void write_single(const T& val) {
using U = internal::to_unsigned_t<T>;
if (val == 0) {
write_single('0');
return;
}
if (pos > SIZE - 50) flush();
U uval = val;
if (val < 0) {
write_single('-');
uval = -uval;
}
write_unsigned(uval);
}
template <class U,
internal::is_unsigned_int_t<U>* = nullptr,
std::enable_if_t<!std::is_same<char, U>::value>* = nullptr>
void write_single(U uval) {
if (uval == 0) {
write_single('0');
return;
}
if (pos > SIZE - 50) flush();
write_unsigned(uval);
}
static int calc_len(uint64_t x) {
int i = ((63 - std::countl_zero(x)) * 3 + 3) / 10;
if (x < tens[i])
return i;
else
return i + 1;
}
template <class U,
internal::is_unsigned_int_t<U>* = nullptr,
std::enable_if_t<2 >= sizeof(U)>* = nullptr>
void write_unsigned(U uval) {
size_t len = calc_len(uval);
pos += len;
char* ptr = line.data() + pos;
while (uval >= 100) {
ptr -= 2;
memcpy(ptr, small[uval % 100].data(), 2);
uval /= 100;
}
if (uval >= 10) {
memcpy(ptr - 2, small[uval].data(), 2);
} else {
*(ptr - 1) = char('0' + uval);
}
}
template <class U,
internal::is_unsigned_int_t<U>* = nullptr,
std::enable_if_t<4 == sizeof(U)>* = nullptr>
void write_unsigned(U uval) {
std::array<char, 8> buf;
memcpy(buf.data() + 6, small[uval % 100].data(), 2);
memcpy(buf.data() + 4, small[uval / 100 % 100].data(), 2);
memcpy(buf.data() + 2, small[uval / 10000 % 100].data(), 2);
memcpy(buf.data() + 0, small[uval / 1000000 % 100].data(), 2);
if (uval >= 100000000) {
if (uval >= 1000000000) {
memcpy(line.data() + pos, small[uval / 100000000 % 100].data(),
2);
pos += 2;
} else {
line[pos] = char('0' + uval / 100000000);
pos++;
}
memcpy(line.data() + pos, buf.data(), 8);
pos += 8;
} else {
size_t len = calc_len(uval);
memcpy(line.data() + pos, buf.data() + (8 - len), len);
pos += len;
}
}
template <class U,
internal::is_unsigned_int_t<U>* = nullptr,
std::enable_if_t<8 == sizeof(U)>* = nullptr>
void write_unsigned(U uval) {
size_t len = calc_len(uval);
pos += len;
char* ptr = line.data() + pos;
while (uval >= 100) {
ptr -= 2;
memcpy(ptr, small[uval % 100].data(), 2);
uval /= 100;
}
if (uval >= 10) {
memcpy(ptr - 2, small[uval].data(), 2);
} else {
*(ptr - 1) = char('0' + uval);
}
}
template <
class U,
std::enable_if_t<internal::is_unsigned_int128<U>::value>* = nullptr>
void write_unsigned(U uval) {
static std::array<char, 50> buf;
size_t len = 0;
while (uval > 0) {
buf[len++] = char((uval % 10) + '0');
uval /= 10;
}
std::reverse(buf.begin(), buf.begin() + len);
memcpy(line.data() + pos, buf.data(), len);
pos += len;
}
void write_single(const std::string& s) {
for (char c : s) write_single(c);
}
void write_single(const char* s) {
size_t len = strlen(s);
for (size_t i = 0; i < len; i++) write_single(s[i]);
}
template <class T> void write_single(const std::vector<T>& val) {
auto n = val.size();
for (size_t i = 0; i < n; i++) {
if (i) write_single(' ');
write_single(val[i]);
}
}
};
inline std::array<std::array<char, 2>, 100> Printer::small = [] {
std::array<std::array<char, 2>, 100> table;
for (int i = 0; i <= 99; i++) {
table[i][1] = char('0' + (i % 10));
table[i][0] = char('0' + (i / 10 % 10));
}
return table;
}();
inline std::array<unsigned long long, 20> Printer::tens = [] {
std::array<unsigned long long, 20> table;
for (int i = 0; i < 20; i++) {
table[i] = 1;
for (int j = 0; j < i; j++) {
table[i] *= 10;
}
}
return table;
}();
} // namespace yosupo
#line 2 "/home/vscode/yosupo-library/src/yosupo/random.hpp"
#line 6 "/home/vscode/yosupo-library/src/yosupo/random.hpp"
#include <chrono>
#line 8 "/home/vscode/yosupo-library/src/yosupo/random.hpp"
#include <random>
#line 10 "/home/vscode/yosupo-library/src/yosupo/random.hpp"
namespace yosupo {
struct Xoshiro256StarStar {
public:
using result_type = uint64_t;
Xoshiro256StarStar() : Xoshiro256StarStar(0) {}
explicit Xoshiro256StarStar(uint64_t seed) {
// use splitmix64
// Reference: http://xoshiro.di.unimi.it/splitmix64.c
for (int i = 0; i < 4; i++) {
uint64_t z = (seed += 0x9e3779b97f4a7c15);
z = (z ^ (z >> 30)) * 0xbf58476d1ce4e5b9;
z = (z ^ (z >> 27)) * 0x94d049bb133111eb;
s[i] = z ^ (z >> 31);
}
}
static constexpr result_type min() { return 0; }
static constexpr result_type max() { return -1; }
result_type operator()() {
const uint64_t result_starstar = rotl(s[1] * 5, 7) * 9;
const uint64_t t = s[1] << 17;
s[2] ^= s[0];
s[3] ^= s[1];
s[1] ^= s[2];
s[0] ^= s[3];
s[2] ^= t;
s[3] = rotl(s[3], 45);
return result_starstar;
}
private:
// Use xoshiro256**
// Refereces: http://xoshiro.di.unimi.it/xoshiro256starstar.c
static uint64_t rotl(const uint64_t x, int k) {
return (x << k) | (x >> (64 - k));
}
std::array<uint64_t, 4> s;
};
// https://github.com/wangyi-fudan/wyhash
struct WYRand {
public:
using result_type = uint64_t;
explicit WYRand(uint64_t seed) : s(seed) {}
static constexpr result_type min() { return 0; }
static constexpr result_type max() { return -1; }
result_type operator()() {
s += 0x2d358dccaa6c78a5;
auto x = (unsigned __int128)s * (s ^ 0x8bb84b93962eacc9);
return (uint64_t)(x ^ (x >> 64));
}
private:
uint64_t s;
};
using Random = WYRand;
inline Random& global_gen() {
static Random gen(
std::chrono::steady_clock::now().time_since_epoch().count());
return gen;
}
template <class G>
concept random_64 = std::uniform_random_bit_generator<G> &&
std::same_as<uint64_t, std::invoke_result_t<G&>> &&
G::min() == uint64_t(0) && G::max() == uint64_t(-1);
namespace internal {
// random choice from [0, upper]
template <random_64 G> uint64_t uniform_u64(uint64_t upper, G& gen) {
if (!(upper & (upper + 1))) {
// b = 00..0011..11
return gen() & upper;
}
int log = 63 - std::countl_zero(upper);
uint64_t mask = (log == 63) ? ~0ULL : (1ULL << (log + 1)) - 1;
while (true) {
uint64_t r = gen() & mask;
if (r <= upper) return r;
}
}
// random choice from [0, upper], faster than uniform_u64
template <random_64 G> uint64_t random_u64(uint64_t upper, G& gen) {
return (uint64_t)(((unsigned __int128)(upper) + 1) * gen() >> 64);
}
} // namespace internal
template <class T, random_64 G> T uniform(T lower, T upper, G& gen) {
return T(lower +
internal::uniform_u64(uint64_t(upper) - uint64_t(lower), gen));
}
template <class T> T uniform(T lower, T upper) {
return uniform(lower, upper, global_gen());
}
template <class T, random_64 G> T random(T lower, T upper, G& gen) {
return T(lower +
internal::random_u64(uint64_t(upper) - uint64_t(lower), gen));
}
template <class T> T random(T lower, T upper) {
return random(lower, upper, global_gen());
}
template <random_64 G> bool uniform_bool(G& gen) { return gen() & 1; }
inline bool uniform_bool() { return uniform_bool(global_gen()); }
// select 2 elements from [lower, uppper]
template <class T, random_64 G>
std::pair<T, T> uniform_pair(T lower, T upper, G& gen) {
assert(upper - lower >= 1);
T a, b;
do {
a = uniform(lower, upper, gen);
b = uniform(lower, upper, gen);
} while (a == b);
if (a > b) std::swap(a, b);
return {a, b};
}
template <class T> std::pair<T, T> uniform_pair(T lower, T upper) {
return uniform_pair(lower, upper, global_gen());
}
// random value in the interval (0.0, 1.0]
template <class G> inline double open_closed_01(G& gen) {
union {
uint64_t i;
double f;
} u = {0xbff0000000000000 | (gen() >> 12)};
return 2.0 + u.f;
}
inline double open_closed_01() {
return open_closed_01(global_gen());
}
} // namespace yosupo
#line 6 "ucup3-27/D/main.cpp"
using namespace yosupo;
#line 2 "ucup3-27/D/base.hpp"
#ifdef YOSUPO_AVX2_PRAGMA
#line 5 "ucup3-27/D/base.hpp"
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#endif
#line 11 "ucup3-27/D/base.hpp"
#include <bitset>
#line 13 "ucup3-27/D/base.hpp"
#include <cmath>
#include <cstdio>
#line 16 "ucup3-27/D/base.hpp"
#include <iostream>
#include <map>
#include <queue>
#include <ranges>
#include <set>
#line 22 "ucup3-27/D/base.hpp"
#include <utility>
#line 24 "ucup3-27/D/base.hpp"
using std::abs, std::pow, std::sqrt;
using std::array, std::vector, std::string, std::queue, std::deque;
using std::countl_zero, std::countl_one, std::countr_zero, std::countr_one;
using std::istream, std::ostream, std::cerr, std::endl;
using std::min, std::max, std::swap;
using std::pair, std::tuple, std::bitset;
using std::popcount;
using std::priority_queue, std::set, std::multiset, std::map;
using std::views::iota, std::views::reverse;
namespace ranges = std::ranges;
using ranges::sort, ranges::copy_n;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); }
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
#ifdef YOSUPO_LOCAL
inline ostream& operator<<(ostream& os, __int128_t x) {
if (x < 0) {
os << "-";
x *= -1;
}
if (x == 0) {
return os << "0";
}
string s;
while (x) {
s += char(x % 10 + '0');
x /= 10;
}
ranges::reverse(s);
return os << s;
}
inline ostream& operator<<(ostream& os, __uint128_t x) {
if (x == 0) {
return os << "0";
}
string s;
while (x) {
s += char(x % 10 + '0');
x /= 10;
}
ranges::reverse(s);
return os << s;
}
template <class T, class U>
ostream& operator<<(ostream& os, const pair<T, U>& p);
template <class T> ostream& operator<<(ostream& os, const V<T>& v);
template <class T> ostream& operator<<(ostream& os, const deque<T>& v);
template <class T, size_t N>
ostream& operator<<(ostream& os, const array<T, N>& a);
template <class T> ostream& operator<<(ostream& os, const set<T>& s);
template <class T, class U>
ostream& operator<<(ostream& os, const map<T, U>& m);
template <class T, class U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
return os << "P(" << p.first << ", " << p.second << ")";
}
template <class T> ostream& operator<<(ostream& os, const V<T>& v) {
os << "[";
bool f = false;
for (auto d : v) {
if (f) os << ", ";
f = true;
os << d;
}
return os << "]";
}
template <class T> ostream& operator<<(ostream& os, const deque<T>& v) {
os << "[";
bool f = false;
for (auto d : v) {
if (f) os << ", ";
f = true;
os << d;
}
return os << "]";
}
template <class T, size_t N>
ostream& operator<<(ostream& os, const array<T, N>& a) {
os << "[";
bool f = false;
for (auto d : a) {
if (f) os << ", ";
f = true;
os << d;
}
return os << "]";
}
template <class T> ostream& operator<<(ostream& os, const set<T>& s) {
os << "{";
bool f = false;
for (auto d : s) {
if (f) os << ", ";
f = true;
os << d;
}
return os << "}";
}
template <class T> ostream& operator<<(ostream& os, const multiset<T>& s) {
os << "{";
bool f = false;
for (auto d : s) {
if (f) os << ", ";
f = true;
os << d;
}
return os << "}";
}
template <class T, class U>
ostream& operator<<(ostream& os, const map<T, U>& s) {
os << "{";
bool f = false;
for (auto p : s) {
if (f) os << ", ";
f = true;
os << p.first << ": " << p.second;
}
return os << "}";
}
struct PrettyOS {
ostream& os;
bool first;
template <class T> auto operator<<(T&& x) {
if (!first) os << ", ";
first = false;
os << x;
return *this;
}
};
template <class... T> void dbg0(T&&... t) {
(PrettyOS{cerr, true} << ... << t);
}
#define dbg(...) \
do { \
cerr << __LINE__ << " : " << #__VA_ARGS__ << " = "; \
dbg0(__VA_ARGS__); \
cerr << endl; \
} while (false);
#else
#define dbg(...)
#endif
#line 9 "ucup3-27/D/main.cpp"
Scanner sc = Scanner(stdin);
Printer pr = Printer(stdout);
using D = double;
using P = array<D, 3>;
D uniform01() {
return (D)(uniform<ull>(0, -1)) / (D)(ull(-1));
}
D dist(P a, P b) {
return sqrt(
(a[0] - b[0]) * (a[0] - b[0]) +
(a[1] - b[1]) * (a[1] - b[1]) +
(a[2] - b[2]) * (a[2] - b[2]));
}
P uniform_p() {
return {uniform01(), uniform01(), uniform01()};
}
V<P> gen(int n) {
V<P> res;
for (int _ : iota(0, n)) {
res.push_back(uniform_p());
}
return res;
}
VV<D> gen_mat(V<P> ps) {
int n = int(ps.size());
VV<D> mat(n, V<D>(n));
for (int i : iota(0, n)) {
for (int j : iota(i + 1, n)) {
D err = uniform01() * 0.2 - 0.1;
mat[i][j] = mat[j][i] = dist(ps[i], ps[j]) + err;
}
}
return mat;
}
D check(VV<D> mat, V<P> ps) {
int n = int(ps.size());
D ans = 0;
for (int i : iota(0, n)) {
for (int j : iota(i + 1, n)) {
D err = abs(dist(ps[i], ps[j]) - mat[i][j]);
ans = max(ans, err);
}
}
return ans;
}
V<P> solve(VV<D> mat) {
int n = int(mat.size());
const D alpha = 0.005;
for (int _ : iota(0, 200)) {
V<P> ps(n, uniform_p());
for (int _ : iota(0, 10000)) {
int i = uniform(0, n - 1);
auto score = [&](P p) {
D s = 0;
for (int j : iota(0, n)) {
if (i == j) continue;
s = max(s, abs(dist(p, ps[j]) - mat[i][j]));
}
return s;
};
D max_score = score(ps[i]);
for (D x : {ps[i][0] - alpha, ps[i][0], ps[i][0] + alpha}) {
for (D y : {ps[i][1] - alpha, ps[i][1], ps[i][1] + alpha}) {
for (D z : {ps[i][2] - alpha, ps[i][2], ps[i][2] + alpha}) {
P p{x, y, z};
D s = score(p);
if (s < max_score) {
max_score = s;
ps[i] = p;
}
}
}
}
}
//dbg(check(mat, ps));
if (check(mat, ps) < 0.09) return ps;
}
//dbg("IMPOSSIBLE");
return V<P>(n, {0, 0, 0});
}
bool test(int n) {
auto a = gen(n);
auto mat = gen_mat(a);
auto b = solve(mat);
D err = check(mat, b);
//dbg(err);
return err < 0.1;
}
void stress() {
for (int n : iota(1, 11)) {
int ng = 0;
for (int _ : iota(0, 100)) {
if (!test(n)) ng++;
}
dbg("RESULT: ", n, ng);
}
}
int main() {
// stress();
int n;
scanf("%d", &n);
VV<D> mat(n, V<D>(n));
for (int i : iota(0, n)) {
for (int j : iota(0, n)) {
scanf("%lf", &(mat[i][j]));
}
}
auto ps = solve(mat);
P p0 = ps[0];
for (auto& p : ps) {
p[0] -= p0[0];
p[1] -= p0[1];
p[2] -= p0[2];
}
dbg(check(mat, ps));
for (auto p : ps) {
printf("%.20lf %.20lf %.20lf\n", p[0], p[1], p[2]);
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3968kb
input:
4 0.000000 0.758400 0.557479 0.379026 0.758400 0.000000 0.516608 0.446312 0.557479 0.516608 0.000000 0.554364 0.379026 0.446312 0.554364 0.000000
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.07500000000000006661 -0.06000000000000005329 0.74999999999999411582 -0.02500000000000002220 -0.41500000000000025757 0.37500000000000033307 -0.00500000000000000444 0.14000000000000012434 0.35500000000000031530
result:
ok OK. Max delta: 0.002615
Test #2:
score: 0
Accepted
time: 1ms
memory: 3968kb
input:
1 0.000000
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000
result:
ok OK. Max delta: 0.000000
Test #3:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
2 0.000000 0.938096 0.938096 0.000000
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.01500000000000001332 0.07500000000000006661 -0.93500000000000071942
result:
ok OK. Max delta: 0.000027
Test #4:
score: 0
Accepted
time: 1ms
memory: 3968kb
input:
3 0.000000 0.769195 0.308169 0.769195 0.000000 0.686850 0.308169 0.686850 0.000000
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.07500000000000006661 0.30000000000000026645 0.70500000000000040412 -0.03500000000000003109 0.30500000000000027089 0.02000000000000001776
result:
ok OK. Max delta: 0.000665
Test #5:
score: 0
Accepted
time: 1ms
memory: 3968kb
input:
5 0.000000 0.444506 0.292333 0.209539 1.195824 0.444506 0.000000 0.220873 0.748833 0.757486 0.292333 0.220873 0.000000 0.533499 0.797167 0.209539 0.748833 0.533499 0.000000 1.141148 1.195824 0.757486 0.797167 1.141148 0.000000
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.05500000000000004885 0.24000000000000021316 0.43000000000000027089 -0.03000000000000002665 0.05500000000000004885 0.32500000000000023315 -0.01500000000000001332 -0.25500000000000022649 -0.06000000000000005329 -0.0500000000000000...
result:
ok OK. Max delta: 0.052854
Test #6:
score: 0
Accepted
time: 3ms
memory: 3968kb
input:
6 0.000000 0.932377 0.787009 0.996894 0.763544 0.651377 0.932377 0.000000 0.421278 1.155673 1.149686 0.508563 0.787009 0.421278 0.000000 0.709021 0.793974 0.224884 0.996894 1.155673 0.709021 0.000000 0.392548 0.957498 0.763544 1.149686 0.793974 0.392548 0.000000 0.714079 0.651377 0.508563 0.224884 0...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.26999999999999946265 -0.71500000000000052403 -0.47000000000000041744 -0.17499999999999937828 -0.79000000000000059064 -0.01000000000000000888 -0.28999999999999948042 -0.69000000000000061284 0.73999999999998422595 -0.2899999999999...
result:
ok OK. Max delta: 0.056377
Test #7:
score: 0
Accepted
time: 4ms
memory: 3840kb
input:
7 0.000000 0.688481 0.455407 0.777049 0.963980 0.255052 0.554599 0.688481 0.000000 0.596921 0.827787 1.260207 0.340235 0.493011 0.455407 0.596921 0.000000 0.609173 0.640567 0.352193 0.243913 0.777049 0.827787 0.609173 0.000000 0.858134 0.701131 0.393303 0.963980 1.260207 0.640567 0.858134 0.000000 0...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.27000000000000018430 -0.28999999999999381828 -0.52000000000000001776 -0.28500000000000019762 -0.34499999999999320099 0.08499999999999818812 0.07500000000000006661 -0.80499999999999360956 -0.01999999999999957367 -0.25500000000000...
result:
ok OK. Max delta: 0.034723
Test #8:
score: 0
Accepted
time: 3ms
memory: 3840kb
input:
8 0.000000 0.437494 0.934265 0.074097 0.673669 0.425700 0.479212 0.679270 0.437494 0.000000 0.331045 0.393801 0.527073 0.402792 0.375134 0.461133 0.934265 0.331045 0.000000 0.792317 0.605663 0.880433 0.786178 0.455534 0.074097 0.393801 0.792317 0.000000 0.681633 0.278020 0.327267 0.550058 0.673669 0...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.09500000000000008438 0.08500000000000013101 0.48000000000000031530 0.18500000000000016431 0.02500000000000007772 0.85500000000000064837 -0.02500000000000002220 0.00000000000000005551 0.12500000000000005551 0.33500000000000029754 ...
result:
ok OK. Max delta: 0.059243
Test #9:
score: 0
Accepted
time: 9ms
memory: 3840kb
input:
9 0.000000 0.883128 0.449200 0.525234 0.745161 0.323207 0.430759 1.247103 0.564870 0.883128 0.000000 0.664206 0.590150 0.433578 0.890708 0.741718 0.798316 1.033522 0.449200 0.664206 0.000000 0.326949 0.636800 0.523900 0.642051 0.680925 0.349474 0.525234 0.590150 0.326949 0.000000 0.523965 0.344241 0...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.83499999999999396927 -0.06000000000000005329 -0.33000000000000029310 -0.15499999999999669598 0.08000000000000007105 -0.46000000000000035305 -0.34999999999999353850 0.17999999999999916067 -0.27000000000000023981 -0.56999999999999...
result:
ok OK. Max delta: 0.050284
Test #10:
score: 0
Accepted
time: 11ms
memory: 3968kb
input:
10 0.000000 1.141963 0.357381 0.960442 0.887799 0.393165 1.000015 0.883861 1.059968 0.666258 1.141963 0.000000 0.730979 0.430440 0.528721 0.822481 0.567380 0.334929 0.552413 0.840500 0.357381 0.730979 0.000000 0.861027 0.623726 0.216981 0.719423 0.558824 0.726378 0.310217 0.960442 0.430440 0.861027 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.65000000000000046629 0.90499999999998936850 -0.06000000000000010880 -0.17000000000000009548 0.28000000000000024869 -0.16000000000000011435 -0.27500000000000018874 0.95499999999998830269 0.25000000000000016653 -0.2150000000000001...
result:
ok OK. Max delta: 0.078973
Test #11:
score: 0
Accepted
time: 16ms
memory: 3840kb
input:
10 0.000000 0.508467 0.359704 0.705660 0.752608 0.632298 0.433047 0.541855 0.108842 0.652503 0.508467 0.000000 0.849608 0.542157 0.614068 0.673963 0.552462 0.470005 0.697815 0.822930 0.359704 0.849608 0.000000 0.832286 0.790254 0.844729 0.428335 0.707356 0.221649 0.447522 0.705660 0.542157 0.832286 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.49500000000000043965 -0.02000000000000001776 -0.27500000000000024425 -0.27000000000000012879 0.19500000000000011768 -0.05000000000000004441 0.30000000000000026645 0.29000000000000020206 -0.59000000000000052403 0.41000000000000036...
result:
ok OK. Max delta: 0.060240
Test #12:
score: 0
Accepted
time: 6ms
memory: 3840kb
input:
10 0.000000 0.532841 1.081715 0.791902 0.304710 0.943952 0.318604 0.512618 0.263399 0.317304 0.532841 0.000000 0.617254 0.571776 0.863445 0.644868 0.534570 0.898453 0.767957 0.380512 1.081715 0.617254 0.000000 0.498716 1.118400 0.375946 0.739541 1.081104 0.985516 0.778030 0.791902 0.571776 0.498716 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.15500000000000013767 -0.39999999999999147349 0.34500000000000025091 0.23999999999999965805 -0.94999999999998963052 0.25000000000000016653 -0.10500000000000009326 -0.81999999999998951505 0.06500000000000000222 0.05000000000000004...
result:
ok OK. Max delta: 0.087102
Test #13:
score: 0
Accepted
time: 5ms
memory: 3968kb
input:
10 0.000000 0.337812 0.820740 0.714576 0.958294 1.114603 1.052855 0.816204 0.921684 0.581533 0.337812 0.000000 0.588126 0.550959 0.851936 1.076003 0.824637 0.634512 0.630209 0.781504 0.820740 0.588126 0.000000 0.754545 0.853344 0.651402 0.625435 0.521290 0.463145 0.927492 0.714576 0.550959 0.754545 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.20500000000000018208 0.30500000000000027089 -0.06000000000000005329 0.18500000000000016431 0.84999999999999309441 0.02500000000000002220 0.15000000000000013323 0.36500000000000032419 0.53500000000000047518 -0.61500000000000054623...
result:
ok OK. Max delta: 0.052517
Test #14:
score: 0
Accepted
time: 10ms
memory: 3968kb
input:
10 0.000000 0.157221 0.630350 0.940948 0.790907 0.666502 0.536584 0.506196 0.353744 0.642539 0.157221 0.000000 0.582092 1.279081 0.812532 0.810677 0.850103 0.865478 0.320962 0.694578 0.630350 0.582092 0.000000 1.171965 1.045437 1.168568 0.582206 0.854963 0.513105 1.137099 0.940948 1.279081 1.171965 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.11000000000000009770 0.19499999999999584332 0.03500000000000003109 0.00000000000000000000 -0.05499999999999882760 0.57500000000000051070 0.18500000000000016431 -0.97999999999999187761 -0.06500000000000000222 -0.52000000000000046...
result:
ok OK. Max delta: 0.070194
Test #15:
score: 0
Accepted
time: 11ms
memory: 3968kb
input:
10 0.000000 0.655953 0.416075 0.956128 0.351321 0.411663 0.904277 0.786858 0.961004 1.159073 0.655953 0.000000 0.398507 0.430374 0.378366 0.531641 0.789955 0.396050 0.368849 1.088933 0.416075 0.398507 0.000000 0.976294 0.461240 0.328488 0.979923 0.705916 0.884932 1.254989 0.956128 0.430374 0.976294 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.55500000000000038192 0.17500000000000009992 0.02999999999999997113 0.13500000000000003664 0.24500000000000021760 0.23500000000000004219 0.99000000000000076827 0.10000000000000003331 -0.01500000000000006883 0.34500000000000019540 ...
result:
ok OK. Max delta: 0.074414
Test #16:
score: 0
Accepted
time: 10ms
memory: 3840kb
input:
10 0.000000 0.672245 0.576475 0.810904 0.599396 0.493165 0.431514 0.511677 0.859634 0.881368 0.672245 0.000000 1.249406 1.027657 0.113558 0.392208 0.862698 0.329856 1.012059 1.039747 0.576475 1.249406 0.000000 0.869439 1.254676 1.087547 0.535956 1.182094 0.744887 0.645939 0.810904 1.027657 0.869439 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.08500000000000007550 0.43499999999999072742 -0.43000000000000027089 0.01500000000000001332 -0.64999999999999669154 0.06999999999999850786 -0.19000000000000016875 -0.44499999999999662048 -0.74500000000000055067 0.09000000000000007...
result:
ok OK. Max delta: 0.081250
Test #17:
score: 0
Accepted
time: 5ms
memory: 3712kb
input:
10 0.000000 0.609276 0.612588 0.898616 0.668529 0.802163 0.126104 0.681054 0.761434 0.310892 0.609276 0.000000 0.922363 0.423227 0.591390 0.662160 0.751720 0.241917 0.563127 0.693959 0.612588 0.922363 0.000000 0.873479 0.681583 0.707351 0.595097 0.923846 0.768951 0.393683 0.898616 0.423227 0.873479 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.32000000000000017319 -0.00000000000000002776 0.58500000000000040856 0.06500000000000005773 0.65500000000000058176 -0.05000000000000004441 0.66000000000000036415 0.31000000000000021982 0.49000000000000037970 0.62000000000000032863...
result:
ok OK. Max delta: 0.058151
Test #18:
score: 0
Accepted
time: 21ms
memory: 3840kb
input:
10 0.000000 0.542508 0.426558 0.741404 0.733105 0.586307 0.271270 0.847645 0.757695 0.830800 0.542508 0.000000 0.497136 1.012191 1.083431 0.944439 0.618287 0.696705 0.472089 0.354373 0.426558 0.497136 0.000000 0.973354 0.928175 0.884683 0.594828 0.699473 0.534409 0.737409 0.741404 1.012191 0.973354 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.13999999999999701572 0.03500000000000003109 -0.56000000000000049738 0.07999999999999829470 -0.28500000000000025313 -0.41500000000000036859 -0.72999999999999509726 0.00000000000000000000 0.15500000000000013767 -0.5149999999999949...
result:
ok OK. Max delta: 0.086177
Test #19:
score: 0
Accepted
time: 5ms
memory: 3840kb
input:
10 0.000000 1.061016 0.689894 0.927767 0.698893 0.765947 0.661068 0.306274 0.338125 0.696899 1.061016 0.000000 0.648243 1.014484 1.091752 0.749377 0.935557 1.183802 0.696073 0.582378 0.689894 0.648243 0.000000 0.480864 0.914770 0.542060 0.834022 0.683526 0.147432 0.385821 0.927767 1.014484 0.480864 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.41999999999999693134 0.68499999999998639755 0.58000000000000040412 -0.10000000000000008882 0.22499999999999620304 0.57000000000000039524 0.04500000000000003997 -0.14000000000000012434 0.84499999999999864109 0.58499999999999341416...
result:
ok OK. Max delta: 0.071724
Test #20:
score: 0
Accepted
time: 20ms
memory: 3968kb
input:
10 0.000000 0.628979 0.809480 0.577228 0.543499 1.184491 0.915473 0.675321 0.902183 0.959077 0.628979 0.000000 0.645170 0.420946 0.821186 0.479130 0.411255 0.481181 0.640513 0.425707 0.809480 0.645170 0.000000 0.338814 0.659221 0.790485 0.676700 0.571793 1.093424 0.897873 0.577228 0.420946 0.338814 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.33500000000000029754 -0.22499999999999520384 0.55500000000000038192 -0.05500000000000004885 -0.65999999999999536815 0.34500000000000019540 0.19000000000000014100 -0.52999999999999525269 0.30000000000000015543 -0.42000000000000015...
result:
ok OK. Max delta: 0.067897
Test #21:
score: 0
Accepted
time: 6ms
memory: 3968kb
input:
10 0.000000 1.348062 0.906255 1.056869 0.692737 1.233088 1.241780 0.765549 0.485628 0.823618 1.348062 0.000000 0.835159 0.531092 0.980818 0.271515 0.366699 0.868310 0.952290 0.828378 0.906255 0.835159 0.000000 0.460229 0.654184 0.642472 0.775590 0.878833 0.474961 0.920338 1.056869 0.531092 0.460229 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.76500000000000023537 0.28000000000000024869 1.00500000000000078160 0.60500000000000053735 -0.38500000000000011990 0.63000000000000044853 0.44000000000000039080 -0.05999999999999996309 0.90500000000000069278 0.63000000000000055955...
result:
ok OK. Max delta: 0.056758
Test #22:
score: 0
Accepted
time: 6ms
memory: 3840kb
input:
10 0.000000 0.329257 0.705789 0.891723 1.151056 0.462469 1.051266 0.851658 0.464279 0.417320 0.329257 0.000000 0.600718 0.970605 0.938181 0.326375 1.043915 0.847296 0.532934 0.745040 0.705789 0.600718 0.000000 1.011572 0.883348 0.772478 0.845990 0.814815 0.707183 0.894030 0.891723 0.970605 1.011572 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.09499999999999797495 0.32000000000000022871 0.10000000000000008882 -0.07999999999999829470 0.64500000000000046185 -0.36000000000000031974 -0.87999999999999367617 0.02500000000000002220 -0.33500000000000029754 -0.9699999999999937...
result:
ok OK. Max delta: 0.056321
Test #23:
score: 0
Accepted
time: 6ms
memory: 3840kb
input:
10 0.000000 0.235777 0.530634 0.606656 0.893717 0.919646 0.941638 0.481056 0.559410 0.700416 0.235777 0.000000 0.591394 0.366417 0.562795 0.668466 0.673889 0.313022 0.373190 0.531931 0.530634 0.591394 0.000000 0.770613 1.067598 0.986187 0.932384 0.420644 0.877563 0.676012 0.606656 0.366417 0.770613 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.25499999999999456435 0.14500000000000012879 -0.07000000000000006217 0.01999999999999957367 0.41500000000000031308 -0.43000000000000038192 -0.37499999999999200639 0.27500000000000018874 0.27500000000000024425 -0.68499999999999039...
result:
ok OK. Max delta: 0.080609
Test #24:
score: 0
Accepted
time: 6ms
memory: 3840kb
input:
10 0.000000 0.901469 1.004974 0.822893 1.099344 0.765078 0.723063 0.160831 0.793508 0.863924 0.901469 0.000000 0.806530 0.620901 0.732184 0.887322 0.586228 1.007618 0.872765 0.806577 1.004974 0.806530 0.000000 0.726444 0.134216 0.429813 0.720199 1.033061 0.169605 0.776613 0.822893 0.620901 0.726444 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.49500000000000043965 0.37000000000000032863 0.73499999999999821032 -0.43500000000000038636 0.96499999999999586109 0.11000000000000009770 -0.73000000000000064837 0.33500000000000029754 0.14500000000000012879 -0.525000000000000466...
result:
ok OK. Max delta: 0.059845
Test #25:
score: 0
Accepted
time: 10ms
memory: 3968kb
input:
10 0.000000 1.095184 1.336518 0.794425 0.718704 0.763264 0.384992 0.883098 0.631205 0.935701 1.095184 0.000000 0.505724 0.476965 0.562544 0.650190 1.020870 0.721884 0.428427 0.539934 1.336518 0.505724 0.000000 0.970641 0.940969 0.604111 1.386828 1.106682 0.675365 0.942494 0.794425 0.476965 0.970641 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.77999999999999614086 -0.45999999999999707789 0.51499999999999157563 -0.94499999999999628741 -0.82499999999999740208 0.26999999999999679812 -0.32499999999999573674 -0.22999999999999687361 0.65999999999998848477 -0.469999999999995...
result:
ok OK. Max delta: 0.055718
Test #26:
score: 0
Accepted
time: 10ms
memory: 3968kb
input:
10 0.000000 1.135517 1.113155 0.997554 0.727160 0.981947 0.488711 0.763412 1.076807 0.644405 1.135517 0.000000 0.733205 0.734929 0.861199 0.513731 0.994157 0.553712 0.347820 0.602565 1.113155 0.733205 0.000000 0.801728 0.820963 1.015892 0.665360 0.726164 0.347759 0.804973 0.997554 0.734929 0.801728 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.62999999999999278799 -0.17999999999999616307 0.99499999999998878231 -0.41999999999999260147 0.48499999999998966160 0.84499999999999197975 -0.86499999999999299671 -0.09499999999999797495 0.37500000000000033307 0.08499999999999818...
result:
ok OK. Max delta: 0.072419
Test #27:
score: 0
Accepted
time: 15ms
memory: 3968kb
input:
10 0.000000 0.544278 1.089486 0.715763 0.596527 0.723484 0.423739 0.471742 0.726903 1.176242 0.544278 0.000000 1.126588 0.538243 0.972699 0.775994 0.788377 0.568696 0.530006 1.520139 1.089486 1.126588 0.000000 1.038058 1.015711 0.638127 0.817608 0.769405 0.831526 0.577701 0.715763 0.538243 1.038058 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.32500000000000023315 0.37999999999999189981 0.19999999999999573674 0.67000000000000059508 -0.06499999999999861444 -0.81999999999999462208 0.68000000000000060396 0.06499999999999861444 0.15499999999999669598 -0.0699999999999999927...
result:
ok OK. Max delta: 0.070288
Test #28:
score: 0
Accepted
time: 11ms
memory: 3968kb
input:
10 0.000000 0.832288 0.572233 0.849134 0.600857 0.620493 0.944267 1.199429 0.727190 0.217328 0.832288 0.000000 0.734687 0.455716 0.626719 0.037075 0.553344 0.651513 0.730533 0.579599 0.572233 0.734687 0.000000 1.001902 0.903210 0.646058 1.025264 0.964509 0.864814 0.633656 0.849134 0.455716 1.001902 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.29000000000000025757 0.62499999999999478195 -0.34000000000000019096 0.53500000000000047518 -0.02000000000000001776 -0.21500000000000007994 -0.17000000000000015099 0.55999999999999616751 -0.52000000000000035083 0.02500000000000002...
result:
ok OK. Max delta: 0.066255
Test #29:
score: 0
Accepted
time: 6ms
memory: 3968kb
input:
10 0.000000 0.586822 0.745373 0.762676 1.077487 0.702889 0.309968 0.738006 0.984101 0.700294 0.586822 0.000000 0.158555 0.554726 0.474922 0.344694 0.523935 0.762669 0.463703 0.137706 0.745373 0.158555 0.000000 0.708435 0.586102 0.221952 0.662258 0.842651 0.444822 0.189350 0.762676 0.554726 0.708435 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.06999999999999850786 -0.59000000000000052403 -0.09000000000000007994 -0.22499999999999575895 -0.64500000000000046185 0.05000000000000004441 -0.14999999999999680256 -0.47500000000000036637 -0.63000000000000044853 0.04499999999999...
result:
ok OK. Max delta: 0.060758
Test #30:
score: 0
Accepted
time: 5ms
memory: 3968kb
input:
10 0.000000 0.791403 0.753593 0.460535 0.937848 0.744280 0.953396 0.674676 0.637909 0.604709 0.791403 0.000000 0.701957 0.506847 0.588675 0.880952 0.450810 0.284847 0.934408 0.786806 0.753593 0.701957 0.000000 0.317244 0.838216 0.584279 1.073648 0.727383 0.184555 0.999700 0.460535 0.506847 0.317244 ...
output:
0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -0.67500000000000048850 -0.08000000000000007105 0.52000000000000035083 -0.29000000000000014655 -0.62500000000000055511 0.13500000000000011990 -0.25500000000000011546 -0.28500000000000025313 0.19500000000000017319 -0.135000000000000...
result:
ok OK. Max delta: 0.070605
Extra Test:
score: 0
Extra Test Passed