# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1067924 | sleepntsheep | Archery (IOI09_archery) | C++17 | 2100 ms | 440 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#pragma GCC optimize("O3,unroll-loops")
#include <cstdio>
#include <map>
#include <array>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define N 1000
#define N_ (2*N)
int n, r, s[N_], ans = 1e9, q[N_], opt;
ull hsh(array<int, N_> &a, int n) {
constexpr ll BASE = 10001;
ll z = 0, bp = 1;
for (int i = 0; i < n; ++i)
z = (z + bp * a[i]), bp *= BASE;
return z;
}
array<int, N_> p, e;
int check() {
for (int i = 0; i < n * 2; ++i) p[i] = q[i];
map<ull, int> mp;
for (int ii = 0, jj = 0; ii < r; ++ii, ++jj) {
ull hh = hsh(p, 2 * n);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |