QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#274747 | #4941. Tree Beauty | anhduc2701 | WA | 380ms | 106756kb | C++23 | 2.9kb | 2023-12-03 21:06:47 | 2023-12-03 21:06:47 |
Judging History
answer
#include<bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define int long long
using namespace std;
typedef long long ll;
const int maxn=5e5+5;
int n,q;
vector<int>G[maxn];
int p[maxn];
struct segtree{
int N;
vector<ll>st;
vector<ll>lazy;
void init(int _n){
N=_n;
st.assign(4*N+5,0);
lazy.assign(4*N+5,0);
}
void push(int id,int l,int mid,int r){
if(lazy[id]){
st[id*2]+=lazy[id]*(mid-l+1);
st[id*2+1]+=lazy[id]*(r-mid);
lazy[id*2]+=lazy[id];
lazy[id*2+1]+=lazy[id];
lazy[id]=0;
}
}
void update(int id,int l,int r,int u,int v,ll val){
if(r<u || v<l)return;
if(u<=l && r<=v){
st[id]+=val*(r-l+1);
lazy[id]+=val;
return;
}
int mid=(l+r)/2;
push(id,l,mid,r);
update(id*2,l,mid,u,v,val);
update(id*2+1,mid+1,r,u,v,val);
st[id]=st[id*2]+st[id*2+1];
}
ll get(int id,int l,int r,int u,int v){
if(r<u || v<l)return 0;
if(u<=l && r<=v){
return st[id];
}
int mid=(l+r)/2;
push(id,l,mid,r);
return get(id*2,l,mid,u,v)+get(id*2+1,mid+1,r,u,v);
}
void upd(int l,int r,ll val){
if(l<=r){
update(1,1,N,l,r,val);
}
}
ll get(int l,int r){
if(l>r)return 0;
return get(1,1,N,l,r);
}
}A[maxn],B;
int tin[maxn];
int eu[maxn];
int tout[maxn];
int h[maxn];
int ma=0;
int s=0;
vector<int>D[maxn];
void dfs(int u){
tin[u]=++s;
eu[s]=u;
ma=max(ma,h[u]);
D[h[u]].pb(tin[u]);
for(auto v:G[u]){
h[v]=h[u]+1;
dfs(v);
}
tout[u]=s;
}
ll value[maxn];
signed main(){
// freopen("input.inp","r",stdin);
// freopen("output.out","w",stdout);
cin.tie(0),cout.tie(0)->sync_with_stdio(0);
cin >> n >> q;
for(int i=2;i<=n;i++){
cin >> p[i];
G[p[i]].pb(i);
}
dfs(1);
for(int i=0;i<=ma;i++){
A[i].init(D[i].size());
}
// cout << ma << '\n';
B.init(n);
for(int ti=1;ti<=q;ti++){
int type;
cin >> type;
if(type==1){
int x,y,k;
cin >> x >> y >> k;
if(k==1){
B.upd(tin[x],tout[x],y);
}
else{
int d=1;
int he=h[x];
ll ans=0;
vector<ll>con;
while(y/d>0){
int l=lower_bound(D[he].begin(),D[he].end(),tin[x])-D[he].begin()+1;
int r=upper_bound(D[he].begin(),D[he].end(),tout[x])-D[he].begin();
A[he].upd(l,r,y/d);
con.pb((r-l+1)*(y/d));
d*=k;
he++;
}
for(int i=1;i<=500-(int)con.size();i++){
x=p[x];
}
while(p[x]!=0 && con.size()){
ans+=con.back();
con.pop_back();
x=p[x];
value[x]+=ans;
}
if(p[x]!=1){
B.upd(tin[p[x]],tin[p[x]],ans);
}
}
}
else{
int x;
cin >> x;
int he=h[x];
ll ans=0;
for(int i=0;i<500;i++){
int l=lower_bound(D[he].begin(),D[he].end(),tin[x])-D[he].begin()+1;
int r=upper_bound(D[he].begin(),D[he].end(),tout[x])-D[he].begin();
ans+=A[he].get(l,r);
he++;
}
ans+=B.get(tin[x],tout[x]);
cout << ans+value[x] << '\n';
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 11ms
memory: 63868kb
input:
5 5 1 1 3 3 1 1 99 2 2 1 2 3 1 3 2 3 2 3
output:
245 97 99
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 8ms
memory: 66632kb
input:
1 1 2 1
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 260ms
memory: 82016kb
input:
100000 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 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:
1818724600 1818724600 1818724600 672469600 2920352548 1987509504 2920352548 2782801948 2920352548 2920352548 7518672977 11295020015 7543062544 4383229800 19258702398 22947288874 15221147536 15428570536 14322314536 9119623396 12969783379 26872020588 25039643385 22398749036 27923029652 31534374661 745...
result:
ok 49891 lines
Test #4:
score: 0
Accepted
time: 269ms
memory: 84008kb
input:
100000 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 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 3263594046 72619 5712340246 12739206070 204573 14707483656 1298627484 24138783814 23788929814 30227334148 5567896640 11058006328 3665885033 24043448788 34341130004 33724575302 29212687634 38608818187 36995597194 34686046871 24686989457 13506261897 37279670571 39473230370 35944243911 70877768...
result:
ok 50054 lines
Test #5:
score: 0
Accepted
time: 267ms
memory: 81888kb
input:
100000 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 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 852481000 5140394500 5140394500 12763733400 1064250600 7675602000 10154232600 217194 12763733400 0 10688839200 5974581000 11847787800 14471583000 12763498900 7939616800 11366248900 21089515900 1354792000 20983206400 13531986400 18686842173 21417145094 21672288196 1135096000 21672288196 214001513...
result:
ok 50101 lines
Test #6:
score: 0
Accepted
time: 272ms
memory: 89448kb
input:
100000 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 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 2609835941 60408 8874354237 8874354237 992035000 4709576810 346279 17996872796 439437 5976525610 160030 424962 22313311132 518120 17873793770 9420136264 29515070242 28755008868 29253743320 31010525920 160209 370458 30408120831 17775879923 31619335669 9711754505 40004496047 39029180203 2718421907...
result:
ok 50079 lines
Test #7:
score: 0
Accepted
time: 206ms
memory: 88452kb
input:
100000 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 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:
1114953000 1114953000 870210000 0 4364660669 3871006152 3871006152 3021383652 5316836492 5356387445 5355275724 5900365152 2158922152 8789107652 2400186152 24175969012 26767485073 8838549952 539587 40002151707 48882894050 4744238283 42260305063 52556979541 323013 59142787639 327990 42567395253 599163...
result:
ok 50072 lines
Test #8:
score: 0
Accepted
time: 219ms
memory: 81392kb
input:
100000 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 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 13522878 13522878 0 13522878 2177106214 1924749597 1128089097 2129455432 34 5229518221 3470642097 8555976721 7049971097 4843730097 8129395721 8576751784 69510 17065932056 19882142649 21391663799 6835058013 16891077122 19189944244 21944719287 19053462513 20376825117 11259038508 18578260008 800651...
result:
ok 49934 lines
Test #9:
score: 0
Accepted
time: 208ms
memory: 84580kb
input:
100000 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 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:
36008880 75795298 8472207432 11434443432 12251061129 4643385867 12515757289 326625 10914948627 11512172627 265454 7014291415 934265172 29935956747 27652996619 11012757487 40774943964 632129 52044712511 55737362888 24162966715 56477142477 43446094167 46390596500 1000924 22660809817 9407913047 6434237...
result:
ok 50168 lines
Test #10:
score: 0
Accepted
time: 222ms
memory: 83848kb
input:
100000 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 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:
1170765000 3798482000 2913904000 2393713234 130085000 3602806649 414022103 8842438664 14947788901 16803715123 24748546078 25886842078 7002353717 8548538822 28181025342 28181025344 28110597764 26300751809 25180134452 26257113717 12018504698 427129 10083788568 32041043452 25426300766 14247498993 16370...
result:
ok 49970 lines
Test #11:
score: 0
Accepted
time: 170ms
memory: 78960kb
input:
100000 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 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 82463388 10302298 1002 5140643388 8353247388 6046007388 2435379000 29552146089 12955436095 19194633204 46795038005 49232999049 2894773177 24047971062 47738746994 36847869803 57780761606 970436 60973175426 64592555099 36008848330 46225645413 935545 11303862792 142615 78118838856 37032566340 7719783...
result:
ok 49801 lines
Test #12:
score: 0
Accepted
time: 173ms
memory: 88380kb
input:
100000 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 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:
133196080 133196080 133196080 133196080 0 1331488257 3354937053 1013553038 2629474127 5985463321 66962 12481351072 14867998772 3401860964 12150785402 21891294516 5399749432 25527615601 26288619030 412402 445526 26204543428 12373916783 8086123137 510138096 10635931137 19486038326 31548848582 21267426...
result:
ok 49634 lines
Test #13:
score: 0
Accepted
time: 255ms
memory: 102284kb
input:
100000 100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
output:
0 0 0 0 8695956226 11186091719 11981932614 3818185104 20738340538 4220736780 16102817878 6468547176 38966274938 15466367968 46667347136 39815300485 6880661934 36907372905 52232568197 55524442921 63210406483 78314289216 113985657200 69569759400 22308422255 107294316067 83129030631 110584216911 229045...
result:
ok 50121 lines
Test #14:
score: 0
Accepted
time: 174ms
memory: 83908kb
input:
100000 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 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 6308651023 328942000 9383121000 9383121000 14808554000 1518012000 12463710405 25464433876 7572417858 8549661251 26748249656 936595786 13781294251 26349716656 17729462279 243532 35866816337 35866816337 22046489251 1366123786 46871339702 44024607656 661842 3306924974 46318818425 29289962650 77830216...
result:
ok 50139 lines
Test #15:
score: 0
Accepted
time: 179ms
memory: 88192kb
input:
100000 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 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 1296984000 1296984000 1344679212 1421298762 1421298762 3445506658 229938000 3586545577 3655325291 1034757080 3690130774 0 53410 7255513269 53411 13107523143 11470333844 8301305372 9349612478 12822825898 4707577508 11189999896 108855 12387887785 13743961918 19482168065 7975061253 13004949549 3923...
result:
ok 50097 lines
Test #16:
score: 0
Accepted
time: 143ms
memory: 79128kb
input:
100000 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 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:
10544372535 9454862535 9454862535 8742445429 14363079699 26931828446 13228738397 22985085068 22439969927 15343005879 5981188038 357530 33202147348 37708347926 304486 15446260181 27861269330 28810684753 35992395967 26479817018 4091551495 54993913632 54993913632 55758161607 49637038544 9685332933 3597...
result:
ok 49988 lines
Test #17:
score: 0
Accepted
time: 157ms
memory: 79104kb
input:
100000 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 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:
64674621 78039 78222 2206391540 1092438022 6827638128 4212159706 5503554594 4691175142 6047011799 1387230002 10542622201 9027102551 277446000 3935252977 4592200934 7807373069 14680112632 79384 171261 25076420412 36080738811 17600751788 39888494964 48327505458 47955358375 47575993741 48893155564 4575...
result:
ok 50141 lines
Test #18:
score: 0
Accepted
time: 148ms
memory: 84516kb
input:
100000 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 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:
5418114003 507948000 5868381802 2031792000 10034298000 110373 581110000 17656140079 11549744074 5361034000 11008370039 270660 23638445294 24430887520 20741831612 8249842460 21905619126 31057578979 18512122304 22632832045 30298848924 591927 31484361691 2367482003 273257 23354157609 25325915881 257502...
result:
ok 50197 lines
Test #19:
score: 0
Accepted
time: 162ms
memory: 82752kb
input:
100000 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 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 2680944000 3255432000 16863990000 10704752000 3383868100 16994112021 19193968215 10342117184 5224672111 30710642782 33099429670 464811 609702 21033292330 24356214433 39472996269 35818291622 13840135214 37566363893 16206553981 19491738263 40143580200 6107255720 428863 23308663277 37694549975 427969...
result:
ok 50085 lines
Test #20:
score: 0
Accepted
time: 148ms
memory: 88392kb
input:
100000 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 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:
5126265904 805024011 5038891269 3256699245 5965142772 6434586402 19797957307 415801 15104326285 15459995284 32091810760 23654376575 15578429900 32624627568 19348034472 25042104455 18557729791 219665 9890390120 25683379453 386530 13503926120 3597877462 11189759394 3598429701 47514696722 29905664140 2...
result:
ok 49932 lines
Test #21:
score: 0
Accepted
time: 155ms
memory: 86140kb
input:
100000 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 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 5867872851 3505822552 11568344851 11568344851 11568344851 2562350795 210198 9023816009 9525329193 6550325817 14361643364 14224837828 5046994095 7259310592 7611314592 14955976046 11492540134 23725287401 9171455044 26045980887 30152743287 13246312333 29628390050 27579515503 29600490873 35349600261 1...
result:
ok 49963 lines
Test #22:
score: 0
Accepted
time: 136ms
memory: 88744kb
input:
100000 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 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:
1902276812 3153022608 5858484180 158501 3385625339 8788222583 14540223877 15172532943 14914727212 8404425715 28476852835 32862090834 277980 22512570905 34163009125 39634661855 17424878747 44422793573 17424878747 12743425514 44949328037 10339847455 21656349130 19627590874 45132293014 43261888040 4326...
result:
ok 49919 lines
Test #23:
score: 0
Accepted
time: 152ms
memory: 79340kb
input:
100000 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 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:
106935470 509909762 546340 4967830 15146 329519648 328193204 210151866 624189909 371861450 328118175 343691605 95189 7794415384 14595018392 16382749709 7985029320 188591 377765472 187220 17903265290 13065377428 1813403544 7980443126 21359694450 20586723304 25517708945 22421651353 26719718523 254513 ...
result:
ok 49861 lines
Test #24:
score: 0
Accepted
time: 298ms
memory: 102048kb
input:
100000 100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
output:
1276415006 608569250 1285102099 3643720335 2181494256 3554311113 1025256690 2503820073 4286234344 906253487 4618908868 1217295955 2920359075 837941980 2820652041 2239022661 4686260702 4741704087 1136867354 8598479426 2515552386 2024666204 893933836 8765925295 124286036 2159430688 8883715717 22166738...
result:
ok 49728 lines
Test #25:
score: 0
Accepted
time: 291ms
memory: 100208kb
input:
94841 97038 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
0 95178 95178 95178 4343848770 272006625 4343848770 5423741737 1975221938 5423723207 631242320 810847040 5423816793 5423798263 5423816793 9613374293 9613395857 3587400750 1308707700 9441259278 9008613083 4563293653 13794406176 14378162040 4146256808 14378051193 14225612770 18601564800 7915815388 264...
result:
ok 48409 lines
Test #26:
score: 0
Accepted
time: 109ms
memory: 87220kb
input:
90709 92118 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 46067 lines
Test #27:
score: 0
Accepted
time: 121ms
memory: 88204kb
input:
94512 92777 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 ...
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 46340 lines
Test #28:
score: 0
Accepted
time: 131ms
memory: 84848kb
input:
96709 92617 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 ...
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 46071 lines
Test #29:
score: 0
Accepted
time: 219ms
memory: 79552kb
input:
95035 93941 1 2 2 4 5 3 4 3 8 9 5 10 9 7 11 13 1 12 17 14 18 17 7 22 18 16 19 8 25 23 29 16 28 32 34 36 25 32 37 37 21 39 31 40 41 24 44 24 42 48 20 33 31 47 26 27 30 35 43 49 27 33 40 58 51 21 47 59 29 63 57 6 69 6 23 20 59 72 43 80 64 11 51 75 19 39 84 77 72 46 15 46 28 55 42 45 12 81 53 45 97 13 ...
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 96940 0 0 0 0 0 0 0 0 0 0 0 0 0 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 46978 lines
Test #30:
score: 0
Accepted
time: 186ms
memory: 79428kb
input:
92237 95118 1 2 1 4 1 4 2 8 8 8 9 1 13 10 14 14 10 18 8 19 14 11 14 2 6 2 1 22 5 13 17 14 15 31 19 2 13 2 29 24 11 23 16 37 31 26 47 31 33 20 33 37 27 14 45 23 6 34 32 23 33 4 35 54 33 4 1 46 16 57 6 68 42 10 12 75 39 41 47 33 63 5 65 4 2 69 3 14 21 11 58 64 43 49 85 4 23 84 77 55 1 8 81 102 37 71 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 104340 0 0 0 0 75571 0 0 0 0 0 83693 0 0...
result:
ok 47471 lines
Test #31:
score: 0
Accepted
time: 230ms
memory: 91364kb
input:
91784 94102 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
0 7787119924 8497517834 8400014886 180289 11841444805 12169934519 180289 12854878469 180289 17586881102 17484416786 279940 279940 15152543337 279940 13255117465 12141569884 16052628892 279940 9004582957 279940 11204631417 16419797822 279940 279940 16659570363 17097522648 22418917192 25084093787 4345...
result:
ok 47107 lines
Test #32:
score: 0
Accepted
time: 262ms
memory: 106756kb
input:
99735 96706 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
553539606 8600111657 745960765 9995227721 9227186498 15855856751 17350089239 10152049892 21845680803 22453044623 43197082986 24122489202 23307519808 45531171200 42551371842 13685463346 39401664938 48851191132 8580060359 14250897091 57014051765 38065773748 12468258868 20182179174 27274550700 54541974...
result:
ok 48261 lines
Test #33:
score: 0
Accepted
time: 325ms
memory: 104472kb
input:
97411 99620 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
0 0 130765 130765 500636 62101656 61731785 62021190 1352275263 4594017571 5938082083 5938381981 1196066126 1171984439 5938210483 2254652686 5938397895 5392004191 2686673159 5060958389 6822885619 2230454062 1470534900 4056298241 6823358771 103355665 3310333268 2440785514 6823294458 6823332732 3815037...
result:
ok 49804 lines
Test #34:
score: 0
Accepted
time: 278ms
memory: 104160kb
input:
98447 98409 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
58573512 58573512 58573512 296092933 2847997982 8146990237 11211260215 6851571133 13836064231 12161588631 20036260315 16786042579 5774649044 33438611874 30327169728 4581523430 34721000868 30343824972 1948702081 40508238272 38356378501 52989712033 27422872778 36605165636 52753949191 62217773301 68815...
result:
ok 49395 lines
Test #35:
score: 0
Accepted
time: 147ms
memory: 83356kb
input:
100000 100000 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 5...
output:
372624 53232 53232 159696 159696 53232 6760508 53232 159696 159696 62380 77262 540835 77264 540847 77264 540860 77265 540873 77265 540873 77268 231798 77265 503952 167983 167987 167983 167983 503954 167983 503954 4794083 969585 323183 969556 323190 323183 5018887 334591 1003788 1059732 480225 720340...
result:
ok 39816 lines
Test #36:
score: 0
Accepted
time: 303ms
memory: 95176kb
input:
90479 95383 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
246750 0 0 480719 50942 570457 157621 157130 534347 635910 212866786 39054960 213215801 212973465 1487888356 4830943634 2145900652 6249303420 308704853 3705946031 8238134525 8097586596 4402476289 2100180537 3916625789 4204585045 6449679365 861398394 3339892880 9078411607 6392901040 5465756298 848161...
result:
ok 47783 lines
Test #37:
score: 0
Accepted
time: 85ms
memory: 78852kb
input:
97970 91190 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 45729 lines
Test #38:
score: 0
Accepted
time: 155ms
memory: 80484kb
input:
91123 97465 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 48701 lines
Test #39:
score: 0
Accepted
time: 95ms
memory: 87992kb
input:
97912 97859 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 48898 lines
Test #40:
score: 0
Accepted
time: 156ms
memory: 83176kb
input:
94951 99073 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 49795 lines
Test #41:
score: 0
Accepted
time: 116ms
memory: 79300kb
input:
97305 92043 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 ...
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 72670 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80660 2610486 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 226650 0 0 0...
result:
ok 46079 lines
Test #42:
score: 0
Accepted
time: 204ms
memory: 88500kb
input:
97304 98355 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 ...
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 2981 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 45746 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 309210 0 0 0 0 0 0 0 ...
result:
ok 49208 lines
Test #43:
score: 0
Accepted
time: 121ms
memory: 80872kb
input:
95767 95294 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 ...
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 13029 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 78208 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 47666 lines
Test #44:
score: 0
Accepted
time: 191ms
memory: 83956kb
input:
97202 98584 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 ...
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 4879 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 49327 lines
Test #45:
score: 0
Accepted
time: 112ms
memory: 88252kb
input:
94109 93647 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 ...
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 87446 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 68790 0 0 0 0 0 ...
result:
ok 46690 lines
Test #46:
score: 0
Accepted
time: 144ms
memory: 82688kb
input:
100000 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 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:
2 2 2 2 2 2 2 2 2 3 3 3 11 11 11 11 11 11 11 12 12 15 15 15 21 21 21 24 57 104 104 119 119 122 122 122 122 122 123 123 128 131 131 131 131 131 134 134 134 134 136 170 173 174 174 174 174 174 174 191 191 193 194 194 194 195 195 195 195 195 195 195 197 212 212 213 214 214 214 215 219 221 228 228 230 2...
result:
ok 42890 lines
Test #47:
score: 0
Accepted
time: 164ms
memory: 83232kb
input:
90757 92423 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 ...
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 83234 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 45945 lines
Test #48:
score: 0
Accepted
time: 100ms
memory: 82332kb
input:
93554 91095 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 ...
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 45700 lines
Test #49:
score: 0
Accepted
time: 168ms
memory: 80784kb
input:
93860 92426 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 24 24 24 25 25 25 26 26 26 27 27 27 28 28 28 29 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 ...
output:
0 0 0 0 43664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 48240 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10444 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 96541 0 104445 0 0 0 0 0 0 0...
result:
ok 46318 lines
Test #50:
score: 0
Accepted
time: 182ms
memory: 89456kb
input:
98204 93931 1 2 1 4 5 4 7 6 3 9 7 11 12 13 8 9 13 5 16 2 11 18 22 18 22 17 20 17 23 19 20 24 32 3 29 25 8 36 10 25 35 27 41 30 14 36 40 30 40 46 51 37 34 45 44 50 32 16 57 48 53 58 23 14 10 61 54 48 31 51 46 39 71 24 66 50 15 27 63 38 68 76 21 31 35 33 85 55 49 62 65 85 38 28 29 28 34 66 39 59 98 98...
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 296001 0 0 62433 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 46805 lines
Test #51:
score: 0
Accepted
time: 286ms
memory: 87092kb
input:
98441 97486 1 2 1 3 2 5 6 7 5 8 10 4 3 13 11 11 7 17 13 18 10 8 22 22 19 4 18 16 25 28 14 19 23 32 31 15 15 31 34 25 36 34 43 27 24 23 37 36 6 20 51 40 43 38 21 52 28 12 24 46 21 12 33 9 52 37 59 29 55 50 51 70 35 49 50 74 48 78 68 79 59 58 20 73 80 61 71 72 87 14 66 74 69 27 65 46 48 47 94 67 26 41...
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 74482 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 48603 lines
Test #52:
score: 0
Accepted
time: 186ms
memory: 82764kb
input:
92474 93614 1 1 2 4 5 2 5 3 6 8 9 12 3 11 13 7 17 17 4 8 20 12 10 7 14 22 13 18 16 28 20 29 21 30 35 11 23 37 25 18 23 21 43 24 32 30 15 35 36 36 43 51 45 14 16 39 24 37 33 25 34 56 40 47 10 22 9 55 64 34 26 49 68 6 41 40 57 28 48 72 58 19 66 56 46 72 44 46 65 49 19 59 52 39 60 33 77 83 99 96 73 55 ...
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 105648 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 52230 0 0 0 0 0 0 0 0 0 92519 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 142180 0 ...
result:
ok 47228 lines
Test #53:
score: 0
Accepted
time: 284ms
memory: 87308kb
input:
96542 93983 1 1 2 2 4 4 7 6 9 5 3 8 9 13 3 16 16 13 8 19 6 18 5 12 20 19 18 23 20 26 12 26 28 31 31 11 21 37 17 23 38 40 29 25 45 46 10 43 11 30 24 10 40 54 17 7 42 30 29 28 48 55 53 44 44 56 38 51 65 15 33 32 59 57 56 59 50 48 58 70 64 33 15 77 42 67 86 74 32 50 34 58 70 61 49 96 64 75 78 78 74 22 ...
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 25215 103 0 0 0 0 0 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 46866 lines
Test #54:
score: 0
Accepted
time: 182ms
memory: 88172kb
input:
92116 92761 1 2 2 3 4 1 3 5 7 3 10 9 3 2 7 5 4 9 13 20 15 20 18 21 13 1 5 3 3 6 9 23 11 6 8 25 15 17 25 30 17 20 36 27 36 13 29 24 44 13 3 7 47 26 2 53 17 14 44 47 3 19 15 39 11 61 8 46 53 4 51 68 56 66 41 54 8 66 34 53 68 26 65 65 24 63 57 16 41 69 37 57 73 92 63 40 27 79 95 57 101 81 50 65 99 6 56...
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 67832 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 46097 lines
Test #55:
score: 0
Accepted
time: 280ms
memory: 89484kb
input:
98083 91416 1 1 1 1 5 3 7 4 7 7 5 10 8 9 8 8 10 13 5 15 7 4 15 10 17 11 19 7 12 14 6 12 12 7 10 3 15 3 33 4 22 15 36 33 3 5 7 41 41 26 1 2 9 1 51 13 11 3 17 7 57 7 25 64 46 19 13 32 52 53 24 10 33 52 25 5 29 8 62 37 37 15 32 50 47 26 73 68 65 49 52 38 9 39 83 9 37 42 14 25 34 38 81 45 66 42 87 104 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 20422 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 78169 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 45616 lines
Test #56:
score: 0
Accepted
time: 173ms
memory: 82720kb
input:
92024 99972 1 1 2 4 5 2 6 6 8 3 2 8 11 2 8 15 12 11 7 2 5 12 13 23 7 26 2 18 18 30 2 21 6 21 6 27 2 2 8 33 14 41 36 20 15 11 26 46 49 46 46 35 53 22 8 33 44 52 54 57 11 36 47 15 18 48 31 3 51 63 52 18 19 50 30 60 54 57 50 67 71 39 83 13 10 33 7 73 45 58 36 29 20 89 89 79 50 59 85 14 58 30 6 73 18 86...
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 43399 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 49991 lines
Test #57:
score: -100
Wrong Answer
time: 380ms
memory: 80164kb
input:
100000 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 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 ...
output:
0 0 0 0 3094773341 2746150341 3121506557 2899638216 7989982557 178004 22398338751 18005921616 5140213120 7535080320 175471 26937357710 16693258355 33962241748 33173804348 18742479755 4090258135 41139407188 6859059520 6059201120 2483296698 38083440788 9107176320 36334379019 57684144956 57491773756 74...
result:
wrong answer 2428th lines differ - expected: '4387926440846', found: '4387916533845'