QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#88977 | #5741. Triterminant | heno239 | AC ✓ | 32ms | 17644kb | C++17 | 6.7kb | 2023-03-18 06:16:31 | 2023-03-18 06:16:33 |
Judging History
answer
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<cassert>
#include<complex>
#include<numeric>
#include<array>
#include<chrono>
using namespace std;
//#define int long long
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
//ll mod = 1;
//constexpr ll mod = 998244353;
constexpr ll mod = 1000000007;
const ll INF = mod * mod;
typedef pair<int, int>P;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
#define all(v) (v).begin(),(v).end()
typedef pair<ll, ll> LP;
template<typename T>
void chmin(T& a, T b) {
a = min(a, b);
}
template<typename T>
void chmax(T& a, T b) {
a = max(a, b);
}
template<typename T>
vector<T> vmerge(vector<T>& a, vector<T>& b) {
vector<T> res;
int ida = 0, idb = 0;
while (ida < a.size() || idb < b.size()) {
if (idb == b.size()) {
res.push_back(a[ida]); ida++;
}
else if (ida == a.size()) {
res.push_back(b[idb]); idb++;
}
else {
if (a[ida] < b[idb]) {
res.push_back(a[ida]); ida++;
}
else {
res.push_back(b[idb]); idb++;
}
}
}
return res;
}
template<typename T>
void cinarray(vector<T>& v) {
rep(i, v.size())cin >> v[i];
}
template<typename T>
void coutarray(vector<T>& v) {
rep(i, v.size()) {
if (i > 0)cout << " "; cout << v[i];
}
cout << "\n";
}
ll mod_pow(ll x, ll n, ll m = mod) {
if (n < 0) {
ll res = mod_pow(x, -n, m);
return mod_pow(res, m - 2, m);
}
if (abs(x) >= m)x %= m;
if (x < 0)x += m;
//if (x == 0)return 0;
ll res = 1;
while (n) {
if (n & 1)res = res * x % m;
x = x * x % m; n >>= 1;
}
return res;
}
//mod should be <2^31
struct modint {
int n;
modint() :n(0) { ; }
modint(ll m) {
if (m < 0 || mod <= m) {
m %= mod; if (m < 0)m += mod;
}
n = m;
}
operator int() { return n; }
};
bool operator==(modint a, modint b) { return a.n == b.n; }
bool operator<(modint a, modint b) { return a.n < b.n; }
modint operator+=(modint& a, modint b) { a.n += b.n; if (a.n >= mod)a.n -= (int)mod; return a; }
modint operator-=(modint& a, modint b) { a.n -= b.n; if (a.n < 0)a.n += (int)mod; return a; }
modint operator*=(modint& a, modint b) { a.n = ((ll)a.n * b.n) % mod; return a; }
modint operator+(modint a, modint b) { return a += b; }
modint operator-(modint a, modint b) { return a -= b; }
modint operator*(modint a, modint b) { return a *= b; }
modint operator^(modint a, ll n) {
if (n == 0)return modint(1);
modint res = (a * a) ^ (n / 2);
if (n % 2)res = res * a;
return res;
}
ll inv(ll a, ll p) {
return (a == 1 ? 1 : (1 - p * inv(p % a, a)) / a + p);
}
modint operator/(modint a, modint b) { return a * modint(inv(b, mod)); }
modint operator/=(modint& a, modint b) { a = a / b; return a; }
const int max_n = 1 << 20;
modint fact[max_n], factinv[max_n];
void init_f() {
fact[0] = modint(1);
for (int i = 0; i < max_n - 1; i++) {
fact[i + 1] = fact[i] * modint(i + 1);
}
factinv[max_n - 1] = modint(1) / fact[max_n - 1];
for (int i = max_n - 2; i >= 0; i--) {
factinv[i] = factinv[i + 1] * modint(i + 1);
}
}
modint comb(int a, int b) {
if (a < 0 || b < 0 || a < b)return 0;
return fact[a] * factinv[b] * factinv[a - b];
}
modint combP(int a, int b) {
if (a < 0 || b < 0 || a < b)return 0;
return fact[a] * factinv[a - b];
}
ll gcd(ll a, ll b) {
a = abs(a); b = abs(b);
if (a < b)swap(a, b);
while (b) {
ll r = a % b; a = b; b = r;
}
return a;
}
using ld = long double;
//typedef long double ld;
typedef pair<ld, ld> LDP;
const ld eps = 1e-10;
const ld pi = acosl(-1.0);
template<typename T>
void addv(vector<T>& v, int loc, T val) {
if (loc >= v.size())v.resize(loc + 1, 0);
v[loc] += val;
}
/*const int mn = 2000005;
bool isp[mn];
vector<int> ps;
void init() {
fill(isp + 2, isp + mn, true);
for (int i = 2; i < mn; i++) {
if (!isp[i])continue;
ps.push_back(i);
for (int j = 2 * i; j < mn; j += i) {
isp[j] = false;
}
}
}*/
//[,val)
template<typename T>
auto prev_itr(set<T>& st, T val) {
auto res = st.lower_bound(val);
if (res == st.begin())return st.end();
res--; return res;
}
//[val,)
template<typename T>
auto next_itr(set<T>& st, T val) {
auto res = st.lower_bound(val);
return res;
}
using mP = pair<modint, modint>;
mP operator+(mP a, mP b) {
return { a.first + b.first,a.second + b.second };
}
mP operator+=(mP& a, mP b) {
a = a + b; return a;
}
mP operator-(mP a, mP b) {
return { a.first - b.first,a.second - b.second };
}
mP operator-=(mP& a, mP b) {
a = a - b; return a;
}
LP operator+(LP a, LP b) {
return { a.first + b.first,a.second + b.second };
}
LP operator+=(LP& a, LP b) {
a = a + b; return a;
}
LP operator-(LP a, LP b) {
return { a.first - b.first,a.second - b.second };
}
LP operator-=(LP& a, LP b) {
a = a - b; return a;
}
mt19937 mt(time(0));
const string drul = "DRUL";
string senw = "SENW";
//DRUL,or SENW
//int dx[4] = { 1,0,-1,0 };
//int dy[4] = { 0,1,0,-1 };
//-----------------------------------------
void solve() {
int n; cin >> n;
vector<int> b(n);
rep(i, n)cin >> b[i];
rep(i, n)if (b[i] < 0)b[i] = 0;
vector<vector<int>> G(n);
rep(i, n) {
if (i % 2 == 0) {
if (i + 1 < n) {
G[i].push_back(i + 1);
G[i + 1].push_back(i);
}
}
}
for (int c = 2;; c++) {
bool exi = false;
for (int i = 0;; i++) {
int le = (1 << c) * i + (1 << (c - 1)) - 2;
int ri = le + (1 << c);
if (ri < n) {
G[le].push_back(ri);
G[ri].push_back(le);
exi = true;
}
else break;
}
if (!exi)break;
}
vector<bool> used(n);
vector<int> col(n);
int ans = 0;
rep(i, n) {
if (used[i])continue;
int cnt[2] = {};
queue<int> q;
q.push(i); used[i] = true;
while (!q.empty()) {
int id = q.front(); q.pop();
cnt[col[id] ^ b[id]]++;
for (int to : G[id])if (!used[to]) {
used[to] = true;
q.push(to);
col[to] = col[id] ^ 1;
}
}
ans += min(cnt[0], cnt[1]);
}
cout << ans << "\n";
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
//cout << fixed << setprecision(10);
//init_f();
//init();
//while(true)
//expr();
int t; cin >> t; rep(i, t)
solve();
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 4ms
memory: 11692kb
input:
3 4 1 1 1 1 2 1 -1 5 -1 1 1 1 -1
output:
2 0 2
result:
ok 3 number(s): "2 0 2"
Test #2:
score: 0
Accepted
time: 11ms
memory: 14856kb
input:
3 27354 -1 -1 1 -1 1 1 1 1 -1 -1 1 1 -1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 -1 1 1 1 -1 -1 1 1 1 1 -1 -1 1 -1 1 -1 1 -1 1 1 -1 1 1 1 -1 1 1 1 1 -1 -1 -1 -1 1 -1 -1 1 1 1 1 -1 -1 1 1 1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1 -1 1 1 1 -1 1 -1 -1 -1 ...
output:
13567 27879 7121
result:
ok 3 number(s): "13567 27879 7121"
Test #3:
score: 0
Accepted
time: 12ms
memory: 15264kb
input:
3 27970 1 -1 1 -1 -1 -1 1 1 1 -1 -1 1 -1 -1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1...
output:
2767 80 6378
result:
ok 3 number(s): "2767 80 6378"
Test #4:
score: 0
Accepted
time: 14ms
memory: 13516kb
input:
3 36019 -1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 1 1 1 1 -1 -1 1 -1 1 1 1 -1 1 -1 1 1 -1 1 1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 1 -1 1 -1 1 -1 1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 1 1 ...
output:
7231 6152 5290
result:
ok 3 number(s): "7231 6152 5290"
Test #5:
score: 0
Accepted
time: 17ms
memory: 13912kb
input:
9 20499 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 1 -1 1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 1 1 1 1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 1 1 -1 1 1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 1 -1 1 1 1 1 -1 -1 1 -1 -1 -1 1 1 1 1 -1 1 1 -1 -1 -1 1 1 1 1 1 -1 -...
output:
6093 6901 2328 11469 915 87 6 1331 86
result:
ok 9 numbers
Test #6:
score: 0
Accepted
time: 19ms
memory: 17296kb
input:
2 94689 1 1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 1 1 -1 -1 1 -1 1 -1 1 1 1 -1 1 -1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 -1 -1 1 1 -1 -1 -1 1 -1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 -1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 ...
output:
37779 587
result:
ok 2 number(s): "37779 587"
Test #7:
score: 0
Accepted
time: 27ms
memory: 16892kb
input:
4 90533 -1 -1 1 -1 1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 1 1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 1 1 1 -1 1 -1 1 -1 -1 -1 1 -1 1 -1 1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 1 1 -1 1 -1 1 -1 1...
output:
36192 516 2233 928
result:
ok 4 number(s): "36192 516 2233 928"
Test #8:
score: 0
Accepted
time: 22ms
memory: 15840kb
input:
2 74465 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 1 -1 1 -1 1 -1 1 1 1 1 1 -1 -1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 1 1 1 -1 1 1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 -1 -1 -1 1 1 1 1 1 1 1 1 -1 1 1 1 1 -1 1 -1 -1 1...
output:
22551 7372
result:
ok 2 number(s): "22551 7372"
Test #9:
score: 0
Accepted
time: 17ms
memory: 14336kb
input:
5 41709 -1 1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 1 -1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 1 1 -1 1 1 -1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 1 1 1 1 1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 -1 1...
output:
8311 8174 2118 148 552
result:
ok 5 number(s): "8311 8174 2118 148 552"
Test #10:
score: 0
Accepted
time: 19ms
memory: 14420kb
input:
5 47359 -1 1 1 -1 1 -1 -1 -1 1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 -1 -1 1 1 1 1 -1 1 -1 1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 1 1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 1 1 -1 1 -1 -1 1 -1 1 1 1 1 -1 -1 1 1 -1 1 -1 -1 ...
output:
4819 2783 44 287 1764
result:
ok 5 number(s): "4819 2783 44 287 1764"
Test #11:
score: 0
Accepted
time: 28ms
memory: 17424kb
input:
1 100000 -1 -1 -1 1 -1 -1 1 1 1 -1 1 1 -1 1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 1 1 1 1 -1 -1 1 1 1 -1 1 1 1 -1 1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 1 1 1 1 -1 -1 1 1 -1 1 1 1 1 1 -1 -1 -1 1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 1 1 1 -1 -1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 -1 1 -1 1 -1 1 1 -1...
output:
49773
result:
ok 1 number(s): "49773"
Test #12:
score: 0
Accepted
time: 15ms
memory: 17560kb
input:
1 100000 1 1 -1 -1 1 -1 -1 -1 1 1 1 -1 1 -1 1 1 -1 1 -1 1 1 1 -1 -1 -1 1 -1 1 1 1 -1 -1 -1 -1 1 1 1 -1 -1 1 1 1 1 -1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 1 -1 1 1 -1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 -1 1 1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 1 1 -1...
output:
30144
result:
ok 1 number(s): "30144"
Test #13:
score: 0
Accepted
time: 7ms
memory: 17644kb
input:
1 100000 -1 1 1 -1 -1 1 1 1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 ...
output:
40103
result:
ok 1 number(s): "40103"
Test #14:
score: 0
Accepted
time: 10ms
memory: 17500kb
input:
1 100000 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 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 1 -1 -1 12 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 7 1 -1 -1 1 -1 1 1 8 -1 1 -1 1 1 -1 1 -1 7 -1 1 1 -1 1 -1 1 9 -1 1 -1 1 1 -1 1 -1 -1 7 1 -1 -1 1 ...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 9595 numbers
Test #28:
score: 0
Accepted
time: 5ms
memory: 11724kb
input:
100 42 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 1 -1 -1 -1 -1 1 1 1 -1 -1 -1 1 1 1 -1 -1 -1 -1 1 1 1 -1 -1 1 -1 1 1 1 1 31 -1 1 1 1 -1 -1 -1 1 -1 1 1 1 1 1 1 -1 -1 1 1 -1 1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 35 1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 1 1 1 1 1 -1 -1 -1 -1 1 1 1 1 1 1 -1 -1 1 1 1 1 1 45 -1 -1 -1 -1 1 ...
output:
20 10 16 18 32 28 32 9 8 20 22 25 22 20 15 10 36 20 21 32 34 20 2 16 33 2 18 4 11 11 24 19 23 4 10 6 12 37 41 4 22 29 19 32 33 18 26 16 33 11 38 6 26 1 34 24 2 18 36 41 33 35 20 36 3 20 30 11 40 20 11 14 5 10 6 2 0 6 16 4 13 28 22 16 28 15 44 5 30 21 29 17 31 4 10 14 10 4 29 1
result:
ok 100 numbers
Test #29:
score: 0
Accepted
time: 6ms
memory: 11644kb
input:
100 34 -1 1 -1 1 -1 -1 1 1 -1 1 1 1 1 -1 1 1 -1 1 -1 1 1 -1 -1 -1 1 1 1 1 -1 -1 1 -1 -1 1 74 1 1 1 -1 1 1 1 -1 1 1 -1 1 1 -1 1 -1 -1 1 1 1 1 -1 -1 1 -1 1 -1 -1 -1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 1 1 -1 1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 -1 1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 -1 54 1 1 -1 -1 -1 1 1 ...
output:
8 20 14 13 13 20 26 21 1 8 6 31 24 8 18 39 1 5 9 29 6 15 7 25 7 0 17 29 3 25 36 29 14 10 16 23 9 31 31 27 28 5 17 13 7 25 11 4 1 34 15 20 23 12 11 3 4 9 20 2 20 9 14 31 10 10 1 30 20 30 11 2 17 21 1 12 2 16 6 13 22 23 7 29 39 8 19 1 13 29 24 10 4 19 20 26 12 12 12 2
result:
ok 100 numbers
Test #30:
score: 0
Accepted
time: 3ms
memory: 11720kb
input:
100 46 1 1 -1 -1 1 1 1 1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1 1 1 1 -1 1 -1 -1 -1 -1 1 60 -1 1 1 1 1 1 -1 -1 1 1 -1 -1 1 -1 -1 1 -1 1 1 1 1 -1 1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 1 1 1 1 -1 1 -1 -1 1 1 40 1 1 -1 -1 -1 1 -1 1 1 -1...
output:
15 13 11 15 19 7 1 20 4 9 18 22 5 5 11 21 35 21 21 20 8 40 15 27 2 19 18 11 2 5 23 10 0 7 26 3 3 24 19 8 2 3 11 24 11 33 23 10 0 20 12 8 8 34 26 1 17 8 11 8 17 14 21 18 28 22 6 7 14 17 26 5 22 23 16 14 23 12 19 8 22 14 3 30 25 3 9 25 16 16 0 33 15 5 21 14 14 6 9 5
result:
ok 100 numbers
Test #31:
score: 0
Accepted
time: 5ms
memory: 11568kb
input:
100 55 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 94 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 ...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 100 numbers
Test #32:
score: 0
Accepted
time: 20ms
memory: 11800kb
input:
413 254 -1 1 -1 -1 1 1 1 1 1 -1 1 -1 1 1 -1 1 -1 1 1 1 1 1 1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 1 1 1 1 1 1 -1 -1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 1 1 -1 -1 1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 -1 1 1 -1 -1 -1 -1 1 1 1 -1 -1 -1 1 -1 -1 -...
output:
120 174 202 184 52 70 186 44 191 164 4 140 53 180 199 91 118 41 157 176 193 185 209 116 59 83 201 67 38 32 133 133 220 165 30 47 84 146 219 97 228 145 19 86 115 47 54 26 62 54 1 219 144 2 18 56 88 90 110 129 112 64 72 7 120 19 17 119 0 209 86 1 89 106 150 41 17 80 34 72 81 178 20 30 41 17 154 10 107...
result:
ok 413 numbers
Test #33:
score: 0
Accepted
time: 18ms
memory: 11800kb
input:
400 43 1 1 -1 -1 -1 -1 -1 1 1 1 1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 1 -1 1 1 241 1 -1 1 1 -1 1 1 1 -1 1 1 1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 1 1 1 1 -1 1 1 -1 1 -1 -1 1 1 -1 -1 1 1 -1 -1 -1 -1 1 -1 1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 ...
output:
11 79 118 118 122 120 33 127 133 66 114 46 125 111 130 26 27 94 112 64 97 113 13 41 81 13 30 25 151 112 15 86 74 156 18 32 54 118 7 95 80 91 129 9 43 133 125 44 21 69 139 100 50 21 79 95 79 39 78 51 7 16 70 97 20 9 57 129 94 30 15 109 48 80 65 6 37 77 59 136 79 87 37 110 90 41 117 42 116 101 79 100 ...
result:
ok 400 numbers
Test #34:
score: 0
Accepted
time: 24ms
memory: 11820kb
input:
395 2 1 -1 123 1 -1 -1 1 -1 1 1 1 1 -1 1 1 1 -1 -1 1 1 1 -1 -1 1 1 1 1 1 1 1 -1 -1 1 1 1 -1 -1 1 1 -1 1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 1 1 -1 1 -1 1 -1 -1 -1 1 -1 -1 1 1 1 1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 1 1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 1 -1 1 1 -1 -1 1 1 -1 1 -1 -1 1 -...
output:
0 34 111 126 136 33 80 127 111 52 136 83 105 156 74 39 72 0 82 101 21 133 31 123 143 30 133 115 2 104 9 104 17 119 25 139 21 98 55 2 97 86 130 51 40 76 89 17 29 90 37 78 89 131 102 20 57 87 55 93 80 9 103 133 91 77 77 14 10 9 132 72 151 6 104 96 26 35 107 80 57 153 157 37 67 11 130 70 97 45 100 56 1...
result:
ok 395 numbers
Test #35:
score: 0
Accepted
time: 9ms
memory: 11736kb
input:
415 156 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 415 numbers
Test #36:
score: 0
Accepted
time: 4ms
memory: 11664kb
input:
10 180 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 ...
output:
0 0 0 0 0 0 0 0 0 0
result:
ok 10 numbers
Test #37:
score: 0
Accepted
time: 18ms
memory: 11744kb
input:
207 941 -1 1 1 1 1 1 1 -1 1 1 -1 -1 1 1 1 -1 1 -1 1 1 1 1 1 1 1 -1 1 1 1 1 1 -1 -1 -1 1 1 1 -1 1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 1 -1 1 -1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 1 -1 -1 1 1 1 1 1 -1 1 1 -1 -1 1 -1 1 1 1 1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 ...
output:
441 409 147 227 67 208 47 76 176 376 150 296 51 359 206 47 5 2 18 397 86 290 329 342 223 291 0 96 221 180 169 97 6 155 385 135 356 77 100 108 89 141 297 60 149 439 117 426 346 74 258 167 272 201 222 264 364 114 387 313 187 17 438 33 221 112 451 80 377 456 369 26 81 357 208 264 157 142 214 13 28 393 ...
result:
ok 207 numbers
Test #38:
score: 0
Accepted
time: 12ms
memory: 11680kb
input:
208 214 1 -1 -1 1 -1 1 1 1 1 1 -1 -1 -1 -1 1 1 1 -1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 1 -1 1 1 1 -1 1 1 1 1 -1 1 -1 1 1 1 -1 1 1 1 1 -1 -1 1 1 -1 1 -1 1 1 -1 1 1 -1 1 -1 -1 -1 1 1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 1 1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 1 1 1 -1 1 1 -1 1 -1 ...
output:
78 100 208 39 318 42 107 65 46 285 134 96 146 217 49 297 163 268 59 226 114 219 281 122 206 232 3 104 136 155 0 109 145 262 241 120 240 220 11 48 292 126 280 216 42 24 76 278 290 88 238 264 301 38 184 12 23 137 31 74 260 34 112 283 146 184 109 83 130 227 5 265 170 119 300 70 200 107 143 56 23 30 217...
result:
ok 208 numbers
Test #39:
score: 0
Accepted
time: 11ms
memory: 11692kb
input:
200 101 -1 1 -1 1 1 -1 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 1 -1 1 -1 -1 1 1 1 -1 -1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 -1 1 1 1 1 1 -1 1 1 -1 -1 -1 1 -1 1 -1 1 -1 1 -1 -1 -1 -1 1 -1 296 1 -1 1 1 1 -1 -1 -1 -1 1 1 1 1 ...
output:
29 100 59 269 244 171 158 108 72 313 251 103 95 304 108 150 125 142 203 201 234 246 172 48 122 117 43 45 89 171 128 222 128 73 19 35 110 57 218 25 271 25 188 295 304 84 247 164 1 35 98 84 251 111 11 98 205 162 213 113 177 159 120 40 299 80 160 45 226 224 275 165 274 61 174 14 207 198 280 5 175 93 99...
result:
ok 200 numbers
Test #40:
score: 0
Accepted
time: 10ms
memory: 11748kb
input:
196 12 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 893 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 196 numbers