QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#836235 | #9924. Reconstruction | ucup-team112# | AC ✓ | 880ms | 210888kb | C++20 | 17.4kb | 2024-12-28 17:30:49 | 2024-12-28 17:30:57 |
Judging History
你现在查看的是测评时间为 2024-12-28 17:30:57 的历史记录
- [2024-12-31 17:12:54]
- hack成功,自动添加数据
- (/hack/1320)
- [2024-12-28 17:30:49]
- 提交
answer
//#define _GLIBCXX_DEBUG
//#pragma GCC target("avx2")
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include <debug_print.hpp>
#define OUT(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#define OUT(...) (static_cast<void>(0))
#endif
#define endl '\n'
#define lfs cout<<fixed<<setprecision(15)
#define ALL(a) (a).begin(),(a).end()
#define ALLR(a) (a).rbegin(),(a).rend()
#define UNIQUE(a) (a).erase(unique((a).begin(),(a).end()),(a).end())
#define spa << " " <<
#define fi first
#define se second
#define MP make_pair
#define MT make_tuple
#define PB push_back
#define EB emplace_back
#define rep(i,n,m) for(ll i = (n); i < (ll)(m); i++)
#define rrep(i,n,m) for(ll i = (ll)(m) - 1; i >= (ll)(n); i--)
namespace template_tute{
using ll = long long;
using ld = long double;
const ll MOD1 = 1e9+7;
const ll MOD9 = 998244353;
const ll INF = 4.1e18;
using P = pair<ll, ll>;
template<typename T> using PQ = priority_queue<T>;
template<typename T> using QP = priority_queue<T,vector<T>,greater<T>>;
template<typename T1, typename T2>bool chmin(T1 &a,T2 b){if(a>b){a=b;return true;}else return false;}
template<typename T1, typename T2>bool chmax(T1 &a,T2 b){if(a<b){a=b;return true;}else return false;}
ll median(ll a,ll b, ll c){return a+b+c-max<ll>({a,b,c})-min<ll>({a,b,c});}
void ans1(bool x){if(x) cout<<"Yes"<<endl;else cout<<"No"<<endl;}
void ans2(bool x){if(x) cout<<"YES"<<endl;else cout<<"NO"<<endl;}
void ans3(bool x){if(x) cout<<"Yay!"<<endl;else cout<<":("<<endl;}
template<typename T1,typename T2>void ans(bool x,T1 y,T2 z){if(x)cout<<y<<endl;else cout<<z<<endl;}
template<typename T1,typename T2,typename T3>void anss(T1 x,T2 y,T3 z){ans(x!=y,x,z);};
template<typename T>void debug(const T &v,ll h,ll w,string sv=" "){for(ll i=0;i<h;i++){cout<<v[i][0];for(ll j=1;j<w;j++)cout<<sv<<v[i][j];cout<<endl;}};
template<typename T>void debug(const T &v,ll n,string sv=" "){if(n!=0)cout<<v[0];for(ll i=1;i<n;i++)cout<<sv<<v[i];cout<<endl;};
template<typename T>void debug(const vector<T>&v){debug(v,v.size());}
template<typename T>void debug(const vector<vector<T>>&v){for(auto &vv:v)debug(vv,vv.size());}
template<typename T>void debug(stack<T> st){while(!st.empty()){cout<<st.top()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(queue<T> st){while(!st.empty()){cout<<st.front()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(deque<T> st){while(!st.empty()){cout<<st.front()<<" ";st.pop_front();}cout<<endl;}
template<typename T>void debug(PQ<T> st){while(!st.empty()){cout<<st.top()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(QP<T> st){while(!st.empty()){cout<<st.top()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(const set<T>&v){for(auto z:v)cout<<z<<" ";cout<<endl;}
template<typename T>void debug(const multiset<T>&v){for(auto z:v)cout<<z<<" ";cout<<endl;}
template<typename T,size_t size>void debug(const array<T, size> &a){for(auto z:a)cout<<z<<" ";cout<<endl;}
template<typename T,typename V>void debug(const map<T,V>&v){for(auto z:v)cout<<"["<<z.first<<"]="<<z.second<<",";cout<<endl;}
template<typename T>vector<vector<T>>vec(ll x, ll y, T w){vector<vector<T>>v(x,vector<T>(y,w));return v;}
vector<ll>dx={1,-1,0,0,1,1,-1,-1};vector<ll>dy={0,0,1,-1,1,-1,1,-1};
template<typename T>vector<T> make_v(size_t a,T b){return vector<T>(a,b);}
template<typename... Ts>auto make_v(size_t a,Ts... ts){return vector<decltype(make_v(ts...))>(a,make_v(ts...));}
template<typename T1, typename T2>ostream &operator<<(ostream &os, const pair<T1, T2>&p){return os << "(" << p.first << "," << p.second << ")";}
template<typename T>ostream &operator<<(ostream &os, const vector<T> &v){os<<"[";for(auto &z:v)os << z << ",";os<<"]"; return os;}
template<typename T>void rearrange(vector<int>&ord, vector<T>&v){
auto tmp = v;
for(int i=0;i<tmp.size();i++)v[i] = tmp[ord[i]];
}
template<typename Head, typename... Tail>void rearrange(vector<int>&ord,Head&& head, Tail&&... tail){
rearrange(ord, head);
rearrange(ord, tail...);
}
template<typename T> vector<int> ascend(const vector<T>&v){
vector<int>ord(v.size());iota(ord.begin(),ord.end(),0);
sort(ord.begin(),ord.end(),[&](int i,int j){return make_pair(v[i],i)<make_pair(v[j],j);});
return ord;
}
template<typename T> vector<int> descend(const vector<T>&v){
vector<int>ord(v.size());iota(ord.begin(),ord.end(),0);
sort(ord.begin(),ord.end(),[&](int i,int j){return make_pair(v[i],-i)>make_pair(v[j],-j);});
return ord;
}
template<typename T> vector<T> inv_perm(const vector<T>&ord){
vector<T>inv(ord.size());
for(int i=0;i<ord.size();i++)inv[ord[i]] = i;
return inv;
}
ll FLOOR(ll n,ll div){assert(div>0);return n>=0?n/div:(n-div+1)/div;}
ll CEIL(ll n,ll div){assert(div>0);return n>=0?(n+div-1)/div:n/div;}
ll digitsum(ll n){ll ret=0;while(n){ret+=n%10;n/=10;}return ret;}
ll modulo(ll n,ll d){return (n%d+d)%d;};
template<typename T>T min(const vector<T>&v){return *min_element(v.begin(),v.end());}
template<typename T>T max(const vector<T>&v){return *max_element(v.begin(),v.end());}
template<typename T>T acc(const vector<T>&v){return accumulate(v.begin(),v.end(),T(0));};
template<typename T>T reverse(const T &v){return T(v.rbegin(),v.rend());};
//mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
int popcount(ll x){return __builtin_popcountll(x);};
int poplow(ll x){return __builtin_ctzll(x);};
int pophigh(ll x){return 63 - __builtin_clzll(x);};
template<typename T>T poll(queue<T> &q){auto ret=q.front();q.pop();return ret;};
template<typename T>T poll(priority_queue<T> &q){auto ret=q.top();q.pop();return ret;};
template<typename T>T poll(QP<T> &q){auto ret=q.top();q.pop();return ret;};
template<typename T>T poll(stack<T> &s){auto ret=s.top();s.pop();return ret;};
ll MULT(ll x,ll y){if(LLONG_MAX/x<=y)return LLONG_MAX;return x*y;}
ll POW2(ll x, ll k){ll ret=1,mul=x;while(k){if(mul==LLONG_MAX)return LLONG_MAX;if(k&1)ret=MULT(ret,mul);mul=MULT(mul,mul);k>>=1;}return ret;}
ll POW(ll x, ll k){ll ret=1;for(int i=0;i<k;i++){if(LLONG_MAX/x<=ret)return LLONG_MAX;ret*=x;}return ret;}
std::ostream &operator<<(std::ostream &dest, __int128_t value) {
std::ostream::sentry s(dest);
if (s) {
__uint128_t tmp = value < 0 ? -value : value;
char buffer[128];
char *d = std::end(buffer);
do {
--d;
*d = "0123456789"[tmp % 10];
tmp /= 10;
} while (tmp != 0);
if (value < 0) {
--d;
*d = '-';
}
int len = std::end(buffer) - d;
if (dest.rdbuf()->sputn(d, len) != len) {
dest.setstate(std::ios_base::badbit);
}
}
return dest;
}
namespace converter{
int dict[500];
const string lower="abcdefghijklmnopqrstuvwxyz";
const string upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string digit="0123456789";
const string digit1="123456789";
void regi_str(const string &t){
for(int i=0;i<t.size();i++){
dict[t[i]]=i;
}
}
void regi_int(const string &t){
for(int i=0;i<t.size();i++){
dict[i]=t[i];
}
}
vector<int>to_int(const string &s,const string &t){
regi_str(t);
vector<int>ret(s.size());
for(int i=0;i<s.size();i++){
ret[i]=dict[s[i]];
}
return ret;
}
vector<int>to_int(const string &s){
auto t=s;
sort(t.begin(),t.end());
t.erase(unique(t.begin(),t.end()),t.end());
return to_int(s,t);
}
vector<vector<int>>to_int(const vector<string>&s,const string &t){
regi_str(t);
vector<vector<int>>ret(s.size(),vector<int>(s[0].size()));
for(int i=0;i<s.size();i++){
for(int j=0;j<s[0].size();j++){
ret[i][j]=dict[s[i][j]];
}
}
return ret;
}
vector<vector<int>>to_int(const vector<string>&s){
string t;
for(int i=0;i<s.size();i++){
t+=s[i];
}
sort(t.begin(),t.end());t.erase(unique(t.begin(),t.end()),t.end());
return to_int(s,t);
}
string to_str(const vector<int>&s,const string &t){
regi_int(t);
string ret;
for(auto z:s)ret+=dict[z];
return ret;
}
vector<string> to_str(const vector<vector<int>>&s,const string &t){
regi_int(t);
vector<string>ret(s.size());
for(int i=0;i<s.size();i++){
for(auto z:s[i])ret[i]+=dict[z];
}
return ret;
}
}
template< typename T = int >
struct edge {
int to;
T cost;
int id;
edge():to(-1),id(-1){};
edge(int to, T cost = 1, int id = -1):to(to), cost(cost), id(id){}
operator int() const { return to; }
};
template<typename T>
using Graph = vector<vector<edge<T>>>;
template<typename T>
Graph<T>revgraph(const Graph<T> &g){
Graph<T>ret(g.size());
for(int i=0;i<g.size();i++){
for(auto e:g[i]){
int to = e.to;
e.to = i;
ret[to].push_back(e);
}
}
return ret;
}
template<typename T>
Graph<T> readGraph(int n,int m,int indexed=1,bool directed=false,bool weighted=false){
Graph<T> ret(n);
for(int es = 0; es < m; es++){
int u,v;
T w=1;
cin>>u>>v;u-=indexed,v-=indexed;
if(weighted)cin>>w;
ret[u].emplace_back(v,w,es);
if(!directed)ret[v].emplace_back(u,w,es);
}
return ret;
}
template<typename T>
Graph<T> readParent(int n,int indexed=1,bool directed=true){
Graph<T>ret(n);
for(int i=1;i<n;i++){
int p;cin>>p;
p-=indexed;
ret[p].emplace_back(i);
if(!directed)ret[i].emplace_back(p);
}
return ret;
}
}
using namespace template_tute;
template< typename sum_t, typename key_t >
struct ReRooting {
struct Edge {
int to;
key_t data;
sum_t dp, ndp;
};
using F = function< sum_t(sum_t, sum_t) >;
using G = function< sum_t(sum_t, key_t) >;
vector< vector< Edge > > g;
vector< sum_t > subdp, dp;
vector< sum_t > init;
const sum_t ident;
const F f;
const G gg;
ReRooting(int V, const F f, const G g, const sum_t &ident)
: g(V), f(f), gg(g), ident(ident), subdp(V, ident), dp(V, ident), init(V, ident) {}
void add_edge(int u, int v, const key_t &d) {
g[u].emplace_back((Edge) {v, d, ident, ident});
g[v].emplace_back((Edge) {u, d, ident, ident});
}
void add_edge_bi(int u, int v, const key_t &d, const key_t &e) {
g[u].emplace_back((Edge) {v, d, ident, ident});
g[v].emplace_back((Edge) {u, e, ident, ident});
}
void add_edge_single(int u, int v, const key_t &d) {
g[u].emplace_back((Edge) {v, d, ident, ident});
}
void set(int idx, sum_t s){
subdp[idx] = s;
init[idx] = s;
}
void dfs_sub(int idx, int par) {
for(auto &e : g[idx]) {
if(e.to == par) continue;
dfs_sub(e.to, idx);
subdp[idx] = f(subdp[idx], gg(subdp[e.to], e.data));
}
}
void dfs_all(int idx, int par, const sum_t &top) {
sum_t buff{init[idx]};
for(int i = 0; i < (int) g[idx].size(); i++) {
auto &e = g[idx][i];
e.ndp = buff;
e.dp = gg(par == e.to ? top : subdp[e.to], e.data);
buff = f(buff, e.dp);
}
dp[idx] = buff;
buff = ident;
for(int i = (int) g[idx].size() - 1; i >= 0; i--) {
auto &e = g[idx][i];
if(e.to != par) dfs_all(e.to, idx, f(e.ndp, buff));
e.ndp = f(e.ndp, buff);
buff = f(buff, e.dp);
}
}
vector< sum_t > build() {
dfs_sub(0, -1);
dfs_all(0, -1, ident);
return dp;
}
};
template<typename T>
struct HLD{
using D=long long;
int n;
vector<int>sz;//部分木サイズ
vector<D>dep;
vector<int>par;
vector<int>head;
Graph<T> &g;//隣接リスト
vector<edge<T>>edges;//データ構造に乗せるedge列
vector<int>in,out;//[in,out)で部分木、[ina,inb]でa~bのパス(aが上)
vector<int>comp;//連結成分の根
//inは頂点のindexを表す。また、edge列の下側の頂点である
HLD(Graph<T> &g,int r=-1):g(g),n(g.size()){
hld_build(r);
}
void hld_build(int root = -1){
in.assign(n,-1);out.assign(n,-1);dep.assign(n,0);
par.assign(n,-1);head.assign(n,-1);sz.assign(n,-1);comp.assign(n,-1);
edges.assign(n,edge<T>());
if(root == -1){//根がどこでも良い場合(森でも可)
for(int i=0;i<n;i++){
if(sz[i] == -1){
head[i] = i;
dfs_sz(i, 0, i);
dfs_hld(i);
}
}
}
else{
head[root] = root;
dfs_sz(root, 0, root);
dfs_hld(root);
}
}
void dfs_sz(int k, D d,int r){
sz[k] = 1;
comp[k] = r;
dep[k] = d;
for(auto &e: g[k]){
if(e.to == par[k])continue;
par[e.to] = k;
dfs_sz(e.to, d+e.cost, r);
sz[k] += sz[e.to];
if(g[k][0].to==par[k]||sz[e.to] > sz[g[k][0].to])swap(e, g[k][0]);
}
}
int time = 0;
void dfs_hld(int k){
in[k] = time++;
for(auto e:g[k]){
if(e.to == par[k])continue;
head[e.to] = (e.to == g[k][0].to ? head[k]: e.to);
edges[time] = e;
dfs_hld(e.to);
}
out[k] = time;
}
int lca(int p,int q){
while(1){
if(in[p] < in[q])swap(p,q);
if(head[p] == head[q])return q;
p = par[head[p]];
}
}
vector<pair<int,int>>query_path(int p,int q,bool isEdge){
int r=lca(p,q);
vector<pair<int,int>>ret;
for(int i=0;i<2;i++){
if(i == 1)swap(p,q);
while(1){
if(isEdge&&p==r)break;
if(head[p]==head[r]){
ret.emplace_back(in[r]+(isEdge?1:i),in[p]+1);
break;
}
ret.emplace_back(in[head[p]],in[p]+1);
p = par[head[p]];
}
}
return ret;
}
vector<vector<pair<int,int>>>query_order_path(int p,int q,bool isEdge){
//非可換クエリ用、配列0を順番を反転したデータ構造に、配列1を通常のデータ構造に
vector<vector<pair<int,int>>>ret(2);
int r=lca(p,q);
for(int i=0;i<2;i++){
if(i == 1)swap(p,q);
while(1){
if(isEdge&&p==r)break;
if(head[p]==head[r]){
if(i==0) ret[i].emplace_back(n-(in[p]+1),n-(in[r]+(isEdge?1:i)));
else ret[i].emplace_back(in[r]+(isEdge?1:i),in[p]+1);
break;
}
if(i==0) ret[i].emplace_back(n-(in[p]+1),n-(in[head[p]]));
else ret[i].emplace_back(in[head[p]],in[p]+1);
p = par[head[p]];
}
}
reverse(ret[1].begin(), ret[1].end());
return ret;
}
pair<int,int>query_subtree(int p,bool isEdge){
return make_pair(in[p]+isEdge,out[p]);
}
//uのv方向の子 子孫関係は前もって確認すること(in,outを見る)
int child(int u,int v)const{
while(1){
if(head[u]==head[v]){
v=g[u][0].to;
break;
}
v=head[v];
if(par[v]==u)break;
v=par[v];
}
return v;
}
//uをv方向に一つ進めた頂点
int move(int u,int v)const{
assert(u!=v);
if(in[u]<in[v]&&in[v]<out[u])return child(u,v);
else return par[u];
}
D dist(int u,int v){
return dep[u]+dep[v]-2*dep[lca(u,v)];
}
vector<int>rev_in;
int climb(int u,int k){
if(rev_in.empty()){
rev_in.resize(n);
for(int i=0;i<n;i++)rev_in[in[i]]=i;
}
int nd=max<int>(dep[u]-k, 0);
while(dep[u]>nd){
if(dep[head[u]]>nd){
u=par[head[u]];
}
else{
u=rev_in[in[head[u]]+nd-dep[head[u]]];
}
}
return u;
}
int jump(int from,int to, int k){
int r = lca(from, to);
int d1 = dep[from] - dep[r];
int d2 = dep[to] - dep[r];
if(d1 + d2 < k)return -1;
else if(k <= d1)return climb(from, k);
else return climb(to, d1 + d2 - k);
}
template<typename I>
Graph<T>lca_tree(vector<I>&v){
auto compare=[&](int x,int y){return in[x]<in[y];};
sort(v.begin(),v.end(),compare);
int sz1=v.size();
for(int i=0;i<sz1-1;i++)v.push_back(lca(v[i],v[i+1]));
sort(v.begin(),v.end(),compare);
v.erase(unique(v.begin(),v.end()),v.end());
int sz2=v.size();
Graph<T>ret(sz2);
stack<int>st;
for(int i=0;i<sz2;i++){
while(!st.empty()&&out[v[st.top()]]<=in[v[i]])st.pop();
if(!st.empty()){
ret[st.top()].emplace_back(i,dep[v[i]]-dep[v[st.top()]]);
ret[i].emplace_back(st.top(),dep[v[i]]-dep[v[st.top()]]);
}
st.push(i);
}
return ret;
}
};
void solve(){
ll res=0,buf=0;
bool judge = true;
ll n;cin>>n;
auto g1=readGraph<ll>(n,n-1);
auto g2=readGraph<ll>(n,n-1);
auto f1=[&](int x,int y){return x&y;};
auto f2=[&](int x,int w){return x&w;};
ReRooting<int,int>rr(n,f1,f2,1);
HLD hld(g2);
vector<pair<int,int>>ets;
rep(i,0,n){
for(auto to:g1[i]){
int par=i;
int ch=hld.move(i,to);
ets.EB(par,ch);
}
}
sort(ALL(ets));
rep(i,0,n){
for(auto to:g2[i]){
int t=binary_search(ALL(ets),pair<int,int>(i,to));
rr.add_edge_single(i,to,t);
}
}
auto ret=rr.build();
string s;
rep(i,0,n)s+=(ret[i]?'1':'0');
cout<<s<<endl;
}
int main(){
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
ll res=0,buf=0;
bool judge = true;
int T = 1;
//cin>>T;
while(T--){
solve();
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3796kb
input:
3 1 2 2 3 2 1 1 3
output:
001
result:
ok single line: '001'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
6 1 3 3 4 3 6 4 5 5 2 1 3 1 4 4 5 5 2 3 6
output:
010110
result:
ok single line: '010110'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
1
output:
1
result:
ok single line: '1'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
2 1 2 1 2
output:
11
result:
ok single line: '11'
Test #5:
score: 0
Accepted
time: 831ms
memory: 171532kb
input:
500000 321614 78209 64619 204431 81539 336200 128603 201377 132521 391792 41587 137224 174146 381680 341915 451206 493371 256005 259794 168656 161914 462290 105839 333679 377214 267008 283062 457340 219692 196741 123276 321510 473789 410796 498171 203543 178249 456921 255509 449152 294196 457566 277...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #6:
score: 0
Accepted
time: 731ms
memory: 173844kb
input:
500000 36024 87195 108586 421467 431172 367732 493985 46886 213597 28307 211267 46590 362114 441339 277065 115859 103713 161698 349213 41745 185934 19274 490316 496516 475711 279386 296442 146503 89733 449936 197415 385594 325021 418416 335226 171591 201788 138457 60931 108388 58772 112816 371138 14...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #7:
score: 0
Accepted
time: 742ms
memory: 173812kb
input:
500000 310317 190907 69501 399906 150116 313251 246687 111703 184096 396547 53772 260805 227586 215088 36494 125548 378767 252795 276318 297811 427118 345684 249477 42722 228070 490399 180663 323186 354634 11504 263905 232028 236183 306162 272415 455913 375552 467155 430114 476865 461198 4954 329182...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #8:
score: 0
Accepted
time: 701ms
memory: 173508kb
input:
500000 452851 19638 27265 237427 26968 275079 452156 83840 332697 93577 466755 20005 348018 178526 64265 14018 378010 176281 388553 147130 294415 395043 143559 6383 279517 164842 96091 142314 220338 172667 5727 375365 473038 398633 93702 338887 290595 353499 228872 259575 439511 454445 437231 201278...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #9:
score: 0
Accepted
time: 697ms
memory: 173968kb
input:
500000 60928 107647 235760 497822 304252 117620 105711 179233 203340 377898 155972 416233 478313 397136 281935 101102 321117 469553 23853 66761 446952 107534 441875 265132 26312 196083 477635 287906 39638 187977 376375 334164 7510 321386 56303 439673 166824 327050 56421 464413 163256 254605 420933 4...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #10:
score: 0
Accepted
time: 880ms
memory: 210888kb
input:
500000 133454 88585 44667 353827 280459 188270 354784 26487 59928 473772 90470 153344 469518 134293 465532 367839 206155 219620 5921 261069 413040 75688 349642 314325 187507 192838 249832 392425 211451 225725 441947 29595 166233 454731 289716 486004 466294 62062 427321 130791 89032 184003 427010 462...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #11:
score: 0
Accepted
time: 624ms
memory: 164732kb
input:
500000 167897 133130 105650 167897 210511 291114 167897 462679 344180 167897 167897 458809 167897 76305 167897 124960 64535 239234 167897 286004 167897 247571 180738 244382 167897 18787 226792 167897 107623 167897 347463 38779 337154 167897 77712 167897 189184 39539 167897 102046 167897 292650 16789...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #12:
score: 0
Accepted
time: 677ms
memory: 164832kb
input:
499999 161910 405465 176243 214115 161910 393078 161910 174157 448600 112022 133961 469029 398832 161910 161910 179054 374081 266412 50467 235815 161910 200357 212580 161910 257831 188909 386115 161910 161910 259180 177533 360956 199521 210629 291927 161910 35549 161910 29040 161910 307767 161910 16...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
4 4 2 4 3 1 4 3 2 4 3 1 3
output:
0000
result:
ok single line: '0000'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
5 5 2 2 1 4 3 2 3 3 5 4 3 2 3 1 2
output:
00001
result:
ok single line: '00001'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
5 1 2 3 2 4 5 5 3 5 4 2 5 1 3 1 2
output:
00000
result:
ok single line: '00000'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
6 6 2 2 5 5 1 5 3 6 4 1 4 5 3 4 6 6 2 5 2
output:
100000
result:
ok single line: '100000'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
6 4 3 6 2 4 5 1 6 4 6 6 4 5 3 3 1 5 2 6 5
output:
000000
result:
ok single line: '000000'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
6 2 5 3 1 5 3 6 2 4 5 3 6 4 2 1 5 2 5 1 3
output:
000000
result:
ok single line: '000000'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
6 1 2 5 3 6 4 1 5 5 4 2 5 3 1 5 4 2 6 1 4
output:
000000
result:
ok single line: '000000'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
10 9 2 1 5 6 4 8 5 2 1 7 2 3 8 5 10 5 4 2 1 1 7 5 10 5 6 3 1 4 10 1 5 9 1 8 7
output:
0000000000
result:
ok single line: '0000000000'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
10 9 10 8 4 7 2 8 7 4 6 1 3 4 3 5 6 4 9 10 8 9 7 8 9 6 2 9 4 1 8 3 6 1 5 8 6
output:
0000000000
result:
ok single line: '0000000000'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
10 9 5 2 3 1 7 2 8 2 10 4 2 9 10 2 1 6 3 7 2 7 5 8 10 3 6 6 8 8 9 6 2 2 4 2 1
output:
0000000000
result:
ok single line: '0000000000'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
10 7 3 4 3 8 4 7 1 5 6 4 2 4 10 5 4 4 9 3 5 5 10 5 9 7 3 6 7 5 4 8 4 1 3 5 2
output:
0000000000
result:
ok single line: '0000000000'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
10 5 4 4 10 10 3 2 6 9 8 8 10 6 1 10 1 7 10 7 5 1 7 10 1 10 6 9 5 4 7 3 1 6 2 8 1
output:
0000000000
result:
ok single line: '0000000000'
Test #25:
score: 0
Accepted
time: 707ms
memory: 173548kb
input:
500000 449813 382048 267805 409476 197021 142943 96520 14286 190014 29290 99779 205030 448520 397521 268137 275440 496824 335557 16533 145194 312001 288682 216668 141561 412086 264971 8513 23395 249165 57914 236009 266421 478739 117971 378416 334959 30 103303 190090 265064 77784 425899 8527 7260 190...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #26:
score: 0
Accepted
time: 746ms
memory: 173184kb
input:
500000 436359 153184 32329 245730 128439 94252 481002 164655 417808 461117 293685 420500 194999 195958 280286 312282 446105 64214 160786 313954 441934 232342 217798 17452 381699 240754 172009 261706 138562 497017 54835 71129 260680 242928 221836 99517 319330 405859 92116 178949 348302 78763 412522 3...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #27:
score: 0
Accepted
time: 719ms
memory: 173676kb
input:
500000 383544 231141 285165 154570 122599 89711 46649 305329 398481 286225 419333 167044 266408 16517 157370 342641 172616 100599 451993 33673 159972 316911 123808 441854 48681 185685 1689 404615 25385 492198 187713 81217 18819 286913 330555 195588 395991 142350 53980 186664 349053 41494 115371 4848...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #28:
score: 0
Accepted
time: 758ms
memory: 173392kb
input:
500000 437813 323962 324213 393428 83291 203367 444398 289380 443031 481209 69006 370164 382855 266949 249819 418632 142657 198142 227961 248299 245051 260019 331799 376496 436608 352312 306698 65006 297667 209503 282247 439175 92723 132762 66063 445253 159315 61140 344595 383848 488186 111442 36311...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #29:
score: 0
Accepted
time: 573ms
memory: 174652kb
input:
500000 443481 69310 81987 31083 350373 433156 63308 244157 61628 309800 435781 107127 217715 425206 361237 429146 232558 223217 439350 90619 417524 147338 284888 67603 94896 70841 236698 425487 388632 276131 316983 51040 162034 56727 335486 77859 148246 173062 39657 436405 68722 276656 358284 69076 ...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #30:
score: 0
Accepted
time: 664ms
memory: 173976kb
input:
500000 216800 474916 255518 400474 434284 115244 1985 432478 398197 184716 278162 414983 262912 427124 168526 291145 162657 405850 372423 487503 98249 412887 177396 200269 164161 200294 232588 118959 76868 1511 459335 399309 182103 360926 104187 75557 494416 168425 14894 230053 376283 372973 379449 ...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #31:
score: 0
Accepted
time: 547ms
memory: 174772kb
input:
500000 129908 181285 247972 254107 21450 32185 484769 242965 355740 188535 207085 446844 360620 29318 402339 196327 148137 482471 339184 147698 53648 245350 381348 97244 349385 423200 421510 243468 485318 297421 338674 307850 95730 316255 85531 361113 238665 217923 436371 467095 253039 496000 407840...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #32:
score: 0
Accepted
time: 760ms
memory: 173516kb
input:
500000 400687 155492 144221 323468 218204 494237 391809 256925 317411 459870 295418 336450 398270 344329 296440 113027 287397 201370 16825 495696 23487 157882 313549 276131 168897 116830 183472 454694 316758 403067 68845 495888 124531 451565 424366 248526 431464 205058 317235 494211 326062 159714 41...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #33:
score: 0
Accepted
time: 520ms
memory: 173700kb
input:
500000 203829 75411 55235 389414 316162 427357 497415 386988 473462 434719 58669 273215 123197 304988 493876 461323 116153 420890 306075 477844 31279 274564 460706 115100 360768 458006 322608 406908 38993 367071 130497 443709 248473 220283 372992 98644 44225 284213 336644 283299 346314 406997 123738...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #34:
score: 0
Accepted
time: 677ms
memory: 172300kb
input:
500000 242660 386154 211753 485343 169536 327281 23018 58601 227943 213529 397224 100882 107969 164965 30078 434321 302391 144865 489002 484336 287165 5922 433048 416246 8224 171798 400682 74417 220479 148166 396156 173297 493955 466764 408490 44671 318635 89875 128971 328174 369258 350792 415068 16...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #35:
score: 0
Accepted
time: 685ms
memory: 170216kb
input:
500000 89729 46453 89729 424405 89729 329263 199363 33750 241918 89729 218219 407035 471196 208242 89729 138544 141501 89729 357638 430194 267888 475362 22301 148916 151438 33994 89729 67567 273456 89729 295901 105524 89729 174177 386293 89729 310494 315600 413870 89729 305099 15716 172120 89729 433...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #36:
score: 0
Accepted
time: 712ms
memory: 173676kb
input:
500000 309046 252194 26438 269868 78029 71623 344570 482371 299357 422976 283413 425913 109831 237090 215143 431957 387346 175831 392962 305721 144311 447338 10433 295636 496389 82512 214301 27396 428526 256442 156885 417933 226324 467008 63772 231947 372519 315863 271722 73684 416963 144880 405132 ...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #37:
score: 0
Accepted
time: 731ms
memory: 173568kb
input:
500000 154742 362700 249796 380579 343241 430847 203442 426995 208672 476398 472634 322655 34994 138240 26094 159521 273982 230077 215552 484406 113983 402463 152320 177450 488085 161505 40897 486917 113128 377855 85153 46165 253035 378379 217427 495474 337629 394187 467754 84631 442543 170716 26872...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #38:
score: 0
Accepted
time: 785ms
memory: 173260kb
input:
500000 294939 98470 123572 226636 347853 11379 455233 202037 243638 320418 393785 331286 300769 207161 80569 282006 479859 315983 192069 348609 182404 32032 414545 86258 345510 246087 358966 307452 4760 222693 265012 237233 390449 40740 435199 428657 266940 171970 312060 149345 347938 385068 89298 2...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #39:
score: 0
Accepted
time: 808ms
memory: 173364kb
input:
500000 307432 202629 350787 400008 16883 491569 34659 238967 404678 42356 179527 197278 54900 319482 73711 188958 401250 119884 366201 245592 373181 282921 94363 370708 113082 434366 457916 426229 490815 79969 69452 441608 247966 63286 106235 479147 272332 494732 305700 324575 441227 283760 275913 2...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #40:
score: 0
Accepted
time: 685ms
memory: 173784kb
input:
500000 15441 18568 259726 366832 264928 175081 52077 145361 161351 427299 47701 28170 158914 95743 419569 40715 349110 176016 444143 94984 289536 174368 462310 68218 236049 458207 466569 400108 334015 416032 358211 211153 73614 272890 484008 158464 470082 295738 178449 440558 284236 67449 328481 243...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #41:
score: 0
Accepted
time: 571ms
memory: 174712kb
input:
500000 462511 381811 82472 81072 348472 463850 140915 156132 468971 297063 475783 39853 129712 395836 63266 22184 254250 49959 450221 449632 225968 110530 332004 6409 484358 409642 128194 495922 422963 85607 325303 35034 511 492246 371610 61593 209978 485360 265099 360956 59005 95891 104103 42673 20...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #42:
score: 0
Accepted
time: 594ms
memory: 174168kb
input:
500000 485018 15595 262485 400522 88152 202067 455312 129743 374203 458079 38223 384763 347741 375692 406410 221101 233704 352513 109719 141326 311274 263877 126979 352921 273519 177278 398198 293369 114465 472255 13912 21341 379334 32141 479475 131858 265346 331020 314130 383591 237218 213584 21863...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #43:
score: 0
Accepted
time: 775ms
memory: 173784kb
input:
500000 250235 99043 400339 110638 318866 449363 331553 188412 283626 151970 50023 326986 102521 105339 37585 465383 11291 258043 199301 388633 32019 238982 137661 246919 413511 82494 27850 99121 460066 329206 236389 439711 469446 360167 335431 36582 32263 474765 235799 168731 424190 141560 320080 23...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #44:
score: 0
Accepted
time: 755ms
memory: 173692kb
input:
500000 39428 220768 189015 353934 78186 161401 207558 214428 266690 49692 326880 331407 161173 181226 29301 497562 137803 436969 93503 400515 171816 29914 255528 141042 463121 28721 23390 160493 167767 380473 266117 248116 75642 122676 241132 313009 259850 477344 183271 288811 420313 284912 197240 1...
output:
000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #45:
score: 0
Accepted
time: 774ms
memory: 173504kb
input:
500000 332577 426401 192819 338661 20558 122387 94578 22821 493076 364911 368323 255641 275102 6358 38499 287184 95274 407987 168963 70037 477272 369464 132277 281535 402830 364033 431681 65290 604 34593 391415 7699 419824 236349 467390 171511 463333 309088 224315 60579 317782 200770 144813 130840 3...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #46:
score: 0
Accepted
time: 796ms
memory: 173472kb
input:
500000 362878 114735 240248 342000 361627 69082 276173 14336 108121 400609 242374 332580 190530 81061 497373 373049 29145 434044 273345 384588 253669 315085 100657 478968 56574 171467 231405 186027 277362 399622 177850 168677 137501 96343 428534 87805 138068 197755 309838 460717 361989 238506 116044...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #47:
score: 0
Accepted
time: 796ms
memory: 173828kb
input:
500000 141217 308222 250778 139292 4782 371766 302160 260688 173357 340792 214870 48497 216597 387073 196900 171289 183941 265915 48712 334045 131041 172651 53732 383112 321841 334406 446819 392605 122282 192692 270879 409003 31348 477356 208066 377825 170144 269037 8381 423779 172774 330394 76258 3...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #48:
score: 0
Accepted
time: 778ms
memory: 173400kb
input:
500000 159636 181518 200146 121753 898 144485 69205 406509 428051 220748 346629 209488 472125 465317 97674 362769 471110 342123 5774 89768 365165 262948 79350 140213 95977 301067 84252 345207 431358 379143 478436 177077 294884 457486 469460 404980 154895 234776 481666 163689 278434 34906 382745 2032...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #49:
score: 0
Accepted
time: 781ms
memory: 173316kb
input:
500000 355722 188817 227041 14392 352879 309125 453647 110163 263695 325865 101910 62436 276193 411997 243244 360164 216490 32788 282624 71159 104358 213329 386983 486189 189806 80801 349577 293458 222450 107972 157046 231996 201019 310199 450557 31128 496918 376942 186180 109174 412405 144942 19191...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #50:
score: 0
Accepted
time: 793ms
memory: 173868kb
input:
500000 432826 214768 156504 61815 365647 302181 314788 432909 200799 389496 305131 364634 446089 153594 56632 285077 40732 393339 81824 487290 165272 120414 314059 435005 203862 403394 450085 491715 77511 398124 20732 451245 235685 176538 39405 228082 325576 268480 314203 341691 83922 38110 330495 1...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #51:
score: 0
Accepted
time: 790ms
memory: 173248kb
input:
500000 381566 188928 197453 181104 472696 213433 124749 220771 58328 319626 34444 433380 340490 84119 485667 39842 71627 261695 3393 388988 404487 87277 338005 304286 337774 299304 259757 444254 438815 415490 299722 101846 285445 196164 142707 429460 240118 180097 309910 84234 253244 339842 478783 1...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #52:
score: 0
Accepted
time: 765ms
memory: 173408kb
input:
500000 29670 90845 292476 457435 1812 248775 56746 35644 90721 78120 171401 393218 280567 348023 262466 388560 156219 55921 118626 486576 171619 397465 445839 389408 208328 313511 85618 183403 473442 430498 286203 34901 309236 300275 323510 486591 152247 68030 69983 266681 339743 381641 326458 10796...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #53:
score: 0
Accepted
time: 672ms
memory: 173388kb
input:
500000 314207 298991 115915 128373 344110 447347 335663 247774 99223 491077 429109 428162 378740 64913 296354 404895 72694 66223 476945 59644 36297 346669 461727 219463 482491 174825 232966 78393 304459 178811 409666 310524 433202 421426 487581 161420 12739 175984 459624 62960 254334 453554 10234 37...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #54:
score: 0
Accepted
time: 697ms
memory: 173908kb
input:
500000 494220 44897 351375 210922 108194 31736 109836 145437 284435 92420 197599 31664 398728 83768 316130 161457 244040 271488 208664 39826 149052 234342 442005 275307 11832 450067 16165 293910 465790 204455 349285 377399 124111 298628 251883 12457 441911 47829 274419 4509 473484 119140 53733 32306...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #55:
score: 0
Accepted
time: 607ms
memory: 174008kb
input:
500000 306730 6836 179555 174629 230737 430910 475093 456318 345169 264000 171451 315855 121961 242703 425787 4897 264364 284961 444004 404451 230646 19351 498763 170595 139880 302997 83972 203824 6790 14141 451327 337745 281163 441258 147910 429812 69097 151170 454702 456299 430691 28316 102926 125...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #56:
score: 0
Accepted
time: 597ms
memory: 174500kb
input:
499988 387621 111519 272494 313144 235482 281936 216306 411621 189499 43854 243757 12441 91328 208739 326766 273436 404313 1705 56468 347997 2040 280868 295943 426695 352805 20039 399460 224185 38831 135968 292883 342212 217265 420990 303132 213913 63546 199234 56214 494058 191927 337729 211680 9292...
output:
111010111111011101111110111111110110000111111111101111111111011111011011111111011111111111110101111010011111101011111111111111111101111111111110111110011110111111111111100111111111101111111111111111111111111110110110111111110111100111111010111111101111111111111001111111110100101110110110100111111101...
result:
ok single line: '111010111111011101111110111111...1100101101011111101101101110101'
Test #57:
score: 0
Accepted
time: 595ms
memory: 174508kb
input:
500000 22449 41720 55635 275185 281523 163690 193173 404956 331918 176019 109563 470220 204477 281393 82422 300660 187763 245838 480169 251007 103442 378533 2773 216773 47740 135571 383951 4156 269874 418625 368937 261502 71744 68153 267587 214357 408802 105357 201546 230606 124009 215573 412196 356...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110111111111111111111111111110111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110111111111111101111111111111111111111111111110111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Test #58:
score: 0
Accepted
time: 716ms
memory: 178880kb
input:
500000 30056 101713 375042 311732 143113 68275 344886 224943 208248 88159 302233 427581 289749 36883 231810 270849 231050 312025 140673 442169 193298 296015 172854 456678 142272 443983 349899 93787 389177 490443 355849 117415 454989 490267 474386 76345 125051 12353 300972 302640 227147 414518 101476...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #59:
score: 0
Accepted
time: 574ms
memory: 174400kb
input:
500000 113309 72508 390403 120955 269616 306472 42932 308197 150963 11273 360103 473883 124251 331998 24986 49652 25223 120207 88049 412789 412044 8345 17338 234454 12386 237311 249428 380516 418155 3714 289208 287911 47330 275862 266804 315950 389316 277095 465778 227186 86215 156164 238196 53119 4...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #60:
score: 0
Accepted
time: 561ms
memory: 174260kb
input:
500000 396897 348370 251702 183790 136483 293644 267209 62570 443127 271767 62401 269912 372169 274969 376279 204415 182636 419941 4314 373618 97967 464256 167582 319155 432878 242759 482099 463006 62954 73697 785 467966 194792 320050 489082 15234 40077 224347 345012 221887 203706 388232 5305 61283 ...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #61:
score: 0
Accepted
time: 550ms
memory: 173968kb
input:
500000 335833 352904 355493 330443 375674 143465 106942 357292 26286 478206 415162 326517 107941 215926 265573 52492 80605 264985 281568 395097 49079 262051 113467 244477 299239 300240 273159 474579 25781 343993 8099 325234 268543 165282 459341 125105 236501 476213 114717 233087 57181 4849 426558 27...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111110111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111101'
Test #62:
score: 0
Accepted
time: 810ms
memory: 172556kb
input:
500000 317886 63841 409560 244385 42397 130543 125804 499977 448482 341535 359965 443120 170656 283061 359488 96775 490888 54661 281729 83102 235729 238427 185762 5390 491463 178330 362649 180451 372558 278603 160425 233368 168180 316541 470574 206089 20059 362819 97411 423504 293597 427638 62376 11...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #63:
score: 0
Accepted
time: 805ms
memory: 171604kb
input:
500000 352488 101054 280926 203015 392984 105040 369793 73336 352895 328132 380988 265905 472175 489968 191510 364642 137393 30426 401331 483351 11744 325305 400223 194679 293501 221668 375162 19085 459373 322626 490162 53791 107557 279031 295166 381373 144179 398360 119260 369182 184364 92391 4772 ...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #64:
score: 0
Accepted
time: 807ms
memory: 171968kb
input:
500000 362944 278045 274171 333394 83850 35871 51750 449632 344613 121576 147081 418330 308975 111412 21144 385192 357987 160512 442631 239364 226445 215367 346410 363728 488364 346857 256362 101777 499940 478137 333181 197903 104331 334246 113907 319084 266185 456272 147804 151338 245567 420096 170...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #65:
score: 0
Accepted
time: 777ms
memory: 174440kb
input:
500000 198523 190964 277123 391930 346471 405922 17122 139447 431813 485838 219348 261683 116039 334038 476149 424501 162909 482058 74735 484852 279613 147924 224117 69332 4572 248214 393652 146467 100415 400867 95907 176331 14134 119082 6988 40824 368918 292859 24145 26647 114070 237964 360337 2441...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #66:
score: 0
Accepted
time: 606ms
memory: 166052kb
input:
500000 348954 229176 372930 470694 377257 415766 469213 497227 71013 248434 469213 432420 469213 443320 135549 469213 334586 474996 43704 274895 193980 446449 20787 485378 252740 273354 270639 461999 142624 469213 104223 492881 469213 367420 469213 406637 65957 54782 469213 320717 89362 24707 469213...
output:
100110110110111010100111111111100111011111001101000001110110100111011101111100010001110010111011010111100111100000101011110111001111110101011101000001111111110010011000011111101110100110111110111101101110111010110101010101010111111011101011110111111101011001110001111110110011010111011110111010011011...
result:
ok single line: '100110110110111010100111111111...1111011010111111010111110010001'
Test #67:
score: 0
Accepted
time: 610ms
memory: 165384kb
input:
500000 61595 301409 265689 409756 193019 255403 1530 299644 9097 265689 176901 351310 329289 294835 160532 282203 127999 265689 129388 106714 118203 262542 8353 47957 265689 230799 323196 265689 452482 300385 265689 396077 265689 288786 207051 265689 34169 309082 265689 445742 367878 25967 265689 83...
output:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok single line: '000000000000000000000000000000...0000000000000000000000000000000'
Test #68:
score: 0
Accepted
time: 629ms
memory: 165024kb
input:
500000 113002 386607 250773 170055 43518 339481 85430 288682 248634 409861 83541 371725 386607 233070 178773 386607 185003 456782 135439 386607 318391 453876 252335 388354 225915 12652 386607 304928 186277 233922 386607 304940 471393 248082 143425 386607 492575 428081 101384 386607 386607 285533 339...
output:
011111111111111111111111111111101111111111111110111111111110111111101111101111111111111011111111111111111111111111111111111111111111110111111111111111111101110111111111111111111111111111111111111111111111111111111111110111110111111111111111011111101111111011111110111111111111111111110111111111111111...
result:
ok single line: '011111111111111111111111111111...1111111111111111111111111111111'
Test #69:
score: 0
Accepted
time: 630ms
memory: 164908kb
input:
500000 32852 91684 91684 258120 103830 91684 154007 294482 262023 329088 91684 182293 138586 91684 91684 183323 414855 196306 6640 307572 350311 91684 241794 51080 91684 105232 51165 218126 91684 69262 173355 91684 314301 91684 91684 405309 300266 91684 27359 473622 91684 84530 7499 173430 91684 302...
output:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101111111111111111111111111111111111111111111111111...
result:
ok single line: '111111111111111111111111111111...1111111111111111111111111111111'
Extra Test:
score: 0
Extra Test Passed