QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#208835 | #6767. Hourly Coding Problem | 275307894a | AC ✓ | 2909ms | 48424kb | C++14 | 2.6kb | 2023-10-09 21:17:06 | 2023-10-09 21:17:06 |
Judging History
answer
#include<bits/stdc++.h>
#define Gc() getchar()
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;using LL=__int128;
const int N=3e5+5,M=N*4,K=600+5,mod=1e9+7,Mod=mod-1;const db eps=1e-6;const ll INF=1e15+7;mt19937 rnd(263082);
int n,k;ll A[N],l[N],r[N];
struct BIT{
ll f[N];
void Cl(){fill(f+1,f+n+2,-INF);}
void add(int x,ll y){while(x<=n+1) f[x]=max(f[x],y),x+=x&-x;}
int qry(ll y){int x=0;for(int i=18;~i;i--) if(x+(1<<i)<=n+1&&f[x+(1<<i)]<y) x+=(1<<i);return x+1;}
}f1,f2;
int CK(ll mid){
l[0]=r[0]=0;int i,j;
f1.Cl();f2.Cl();f1.add(1,A[0]);f2.add(n+1,A[0]);
for(i=1;i<=n;i++){
l[i]=f1.qry(A[i]-mid);r[i]=n+1-f2.qry(A[i]-mid)+1;
if(l[i]<=n) f1.add(l[i]+1,A[i]),f2.add(n+1-r[i],A[i]);
// for(j=0;j<i;j++) if(A[i]-mid<=A[j]) l[i]=min(l[i],l[j]+1),r[i]=max(r[i],r[j]+1);
}
return l[n]<=k&&k<=r[n];
}
vector<int> I1[N],I2[N];
namespace Tree{
#define ls v<<1
#define rs v<<1|1
ll f[M];void Up(int v){f[v]=max(f[ls],f[rs]);}
void Cl(){fill(f+1,f+4*(n+1)+1,-INF);}
void Add(int x,ll y,int l=0,int r=n,int v=1){
if(l==r) {f[v]=y;return;}int m=l+r>>1;
x<=m?Add(x,y,l,m,ls):Add(x,y,m+1,r,rs);Up(v);
}
int qry(ll z,int l=0,int r=n,int v=1){
if(f[v]<z) return -1;if(l==r) return l;
int m=l+r>>1;int p=qry(z,l,m,ls);return ~p?p:qry(z,m+1,r,rs);
}
}
void build(){
for(int i=0;i<=n;i++) I1[i].clear(),I2[i].clear();
for(int i=0;i<=n;i++) if(l[i]<=n) l[i]&&(I1[l[i]-1].emplace_back(i),0),I2[r[i]].emplace_back(i);
Tree::Cl();
for(int i=0;i<=n;i++) if(l[i]<=k&&k<=r[i]) Tree::Add(i,A[i]);
}
void find(int x,int y,ll mid){
if(!x){assert(!y);return;}if(!y) assert(0);
for(int i:I2[y-1]) Tree::Add(i,A[i]);for(int i:I1[y-1]) Tree::Add(i,-INF);
int p=Tree::qry(A[x]-mid);assert(p<x);printf("%d%c",x-p," \n"[y==1]);find(p,y-1,mid);
// for(int i=0;i<x;i++) if(A[x]-A[i]<=mid&&l[i]<=y-1&&y-1<=r[i]) {printf("%d%c",x-i," \n"[y==1]);find(i,y-1,mid);return;}
// assert(0);
}
void Solve(){
int i,j;scanf("%d%d",&n,&k);
for(i=1;i<=n;i++) scanf("%lld",&A[n-i+1]);for(i=1;i<=n;i++) A[i]+=A[i-1];
ll l=-INF,r=INF,mid;while(l+1<r) mid=l+r>>1,(CK(mid)?r:l)=mid;
CK(r);build();
find(n,k,r);
}
int main(){
int t=1;
scanf("%d",&t);
while(t--) Solve();
cerr<<clock()*1.0/CLOCKS_PER_SEC<<'\n';
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 28424kb
input:
3 7 3 5 1 0 2 7 -3 4 6 4 -1 3 -2 4 -3 5 6 2 0 -2 0 -1 -1 0
output:
3 3 1 1 1 2 2 3 3
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 909ms
memory: 28344kb
input:
200178 2 1 5 -1 4 3 4 -7 -4 10 2 1 -6 -2 4 1 8 10 -9 10 4 2 10 -4 10 1 4 1 7 -1 4 3 4 1 7 -5 10 10 2 1 -7 9 3 2 3 3 4 4 4 -1 4 -9 -8 3 1 10 6 7 2 2 3 8 4 4 0 -9 -2 -9 2 1 9 -3 1 1 -3 3 3 -8 -7 -3 4 3 -2 -3 3 1 4 4 7 -5 4 0 3 2 2 6 3 5 1 7 -3 2 3 0 4 1 10 -8 -8 -4 1 1 -2 1 1 -2 3 2 1 -9 -5 2 1 -6 4 1...
output:
2 1 1 2 2 4 1 3 4 4 2 2 1 1 1 1 1 3 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 1 2 1 5 4 1 1 2 1 2 1 1 3 1 1 1 1 1 1 1 2 1 1 2 3 1 1 2 1 1 1 1 1 2 1 4 5 1 1 1 1 1 1 1 2 2 1 1 5 1 2 1 3 1 5 1 1 2 1 4 4 1 3 1 1 1 1 1 1 3 1 1 1 1 1 1 1 3 2 1 1 1 1 1 1 4 1 1 1 2 2 1 2 1 1 1 1 1 3 1 3 1 1 1 1 1 1 2 1 2 2 2 3 2 3 ...
result:
ok 200178 lines
Test #3:
score: 0
Accepted
time: 960ms
memory: 28420kb
input:
199772 5 3 -46052578 659867356 -845691509 354080848 495499331 3 2 -723935257 710677961 444019907 2 2 -630160659 -152028149 2 1 588799363 -240251692 1 1 -194483310 3 3 374813337 273066639 -351814252 3 2 -730564958 797633747 637128587 4 4 -307084294 -676969505 558588609 -844837130 2 2 223904090 -50221...
output:
3 1 1 2 1 1 1 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 2 2 1 1 1 2 1 1 1 1 1 5 3 2 1 1 1 1 3 1 4 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 5 1 2 1 2 3 3 1 1 1 1 4 1 1 1 1 1 2 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 3 1 1 1 1 1 1 1 2 1 2 3 4 1 2 2 1 1 2 1 ...
result:
ok 199772 lines
Test #4:
score: 0
Accepted
time: 877ms
memory: 28440kb
input:
46211 17 3 6 3 0 5 -10 6 -4 10 5 -9 -7 9 8 0 3 1 -4 12 1 -6 -2 -10 10 5 5 5 7 6 -10 4 2 1 1 1 3 3 8 6 1 21 4 3 10 10 0 -5 -3 -1 -9 -10 -4 1 -5 -8 -8 -4 8 9 -4 -7 -6 3 21 1 0 2 8 5 -8 -8 3 -1 6 1 -7 4 2 3 8 -3 -8 5 -6 7 1 1 1 -9 25 1 0 -3 -3 5 6 -4 -1 -8 -9 0 4 5 4 9 -5 -9 -5 -1 -8 1 3 6 9 -7 -1 17 5...
output:
7 5 5 12 1 1 1 1 11 1 6 3 21 1 25 7 7 1 1 1 2 1 11 9 1 1 1 1 1 1 1 6 1 1 3 6 3 1 17 3 6 3 1 3 4 1 5 2 10 5 1 6 9 1 1 11 1 2 1 1 1 1 1 1 1 1 1 2 8 5 8 1 13 4 1 1 9 11 1 2 3 5 3 1 6 19 1 4 1 2 1 16 9 1 1 1 1 15 6 20 6 7 7 3 3 17 1 2 14 4 4 7 8 1 10 2 6 1 1 1 5 2 4 1 1 1 7 2 2 4 3 1 7 1 1 3 1 10 1 2 3 ...
result:
ok 46211 lines
Test #5:
score: 0
Accepted
time: 896ms
memory: 28404kb
input:
46128 15 3 -76 84 71 66 5 12 -34 82 50 -70 -96 80 -99 42 67 6 1 -93 78 -68 -97 -31 7 10 2 49 -46 -80 -36 -36 -42 -17 35 36 -81 12 4 80 -6 81 -17 -56 88 12 56 62 -79 84 7 22 1 32 13 5 100 37 -36 47 -73 -99 9 -46 27 68 1 -70 -30 -5 74 97 6 50 -29 20 2 -22 9 -77 -66 -28 36 54 34 32 55 9 -85 -94 -29 14 ...
output:
13 1 1 6 4 6 2 1 5 4 22 15 5 1 5 4 1 8 1 2 2 4 3 1 3 12 18 7 4 2 10 1 2 1 1 1 2 5 2 8 3 6 1 5 9 6 2 5 4 1 14 3 1 19 3 1 9 1 2 2 2 21 2 6 2 10 3 7 1 4 1 1 3 1 3 2 4 10 4 4 10 1 1 1 2 2 11 10 2 1 5 10 6 2 19 2 20 3 1 1 1 1 1 1 3 7 2 8 1 1 1 1 3 1 3 1 1 21 19 4 2 2 1 2 7 3 8 3 1 5 6 1 1 1 1 9 2 25 4 4 ...
result:
ok 46128 lines
Test #6:
score: 0
Accepted
time: 932ms
memory: 26356kb
input:
46275 8 3 46093769 -773754553 -392699827 -541568835 749997067 173070491 194887177 -791837957 10 3 -399615581 -974676777 572713394 -115419320 269846582 65640637 415752922 734872927 -935606077 -460599602 14 5 -272962438 -201008512 -221240850 914999800 -819437270 -35566423 709695488 -191248867 80608304...
output:
2 1 5 1 5 4 1 3 5 2 3 7 2 1 7 12 1 7 4 6 1 12 1 2 1 3 3 2 2 2 11 1 3 1 1 12 9 1 6 2 11 1 3 13 6 2 1 2 14 9 11 5 3 1 1 5 2 1 2 5 4 8 2 3 7 1 1 2 8 1 8 1 4 11 1 9 1 2 1 17 1 5 1 4 1 1 1 4 1 1 1 4 4 4 1 1 18 9 1 4 3 11 3 3 1 1 1 13 1 16 1 3 2 1 1 1 4 2 6 8 1 1 3 11 4 1 1 1 1 11 1 1 2 1 4 1 2 1 1 1 12 6...
result:
ok 46275 lines
Test #7:
score: 0
Accepted
time: 961ms
memory: 28404kb
input:
46255 20 7 1 1 -8 -3 1 -1 -4 -2 -7 -3 7 -9 -10 10 -10 -3 2 10 -4 7 22 10 -4 -3 0 -8 -8 6 10 -4 6 8 -7 5 1 0 6 6 -6 -10 -3 -9 -9 -6 8 4 6 9 -10 -6 9 -6 10 9 12 6 4 -7 -4 -7 -3 -10 -1 0 4 -1 10 8 8 6 4 10 2 -2 5 7 -8 -10 17 1 10 -5 -6 7 -4 -7 6 -10 7 -5 -9 -10 1 4 7 8 -3 9 7 6 -6 3 0 4 -8 -6 1 2 22 5 ...
output:
3 2 1 1 1 3 9 2 1 4 2 2 7 1 1 1 1 4 1 2 1 2 1 1 1 6 1 1 3 1 1 1 1 17 2 1 1 2 1 1 1 2 7 11 1 1 1 1 1 1 1 1 2 2 1 1 2 1 3 1 3 3 1 2 1 3 3 13 2 3 4 11 4 4 6 2 3 1 1 2 1 4 2 1 2 6 2 2 1 1 3 10 4 1 1 6 1 2 1 1 1 7 1 1 1 1 3 1 5 1 1 1 2 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1...
result:
ok 46255 lines
Test #8:
score: 0
Accepted
time: 957ms
memory: 28404kb
input:
46177 24 20 25 14 -46 -61 -64 10 53 -80 -11 91 -59 43 48 -90 -82 -12 -25 72 99 -44 99 21 -92 5 13 12 58 24 -35 93 3 -96 42 6 -43 71 -12 -22 -8 2 1 -1 0 2 1 -93 80 14 3 -86 72 -65 14 -56 -2 -39 43 -87 29 -39 -15 -58 -33 20 4 50 -56 -5 13 -36 -18 73 -64 19 4 44 -58 -98 -44 14 93 63 56 -12 27 2 2 -32 -...
output:
1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 3 1 1 1 2 1 1 1 1 1 1 1 1 1 2 2 8 3 3 7 4 7 2 1 1 1 2 1 1 1 2 1 3 1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 3 2 1 1 1 1 1 1 1 1 1 1 3 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 4 1 1 4 2 2 2 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 5 1 1 1 1 1 3 2 1 4 2 2 1 1 1 1 1 1 1 1 1 1 8 2 2 1 ...
result:
ok 46177 lines
Test #9:
score: 0
Accepted
time: 975ms
memory: 28368kb
input:
46053 7 2 805503116 -146327397 724584190 939057367 563892810 -321631878 772845285 11 8 -912954459 832035093 613578959 117809616 -850489232 -122333651 247540838 -724606797 -942073171 656161804 14899908 3 2 615417815 642804724 -313818109 20 14 451783792 -731819844 180260358 -9034098 -798871547 2308456...
output:
3 4 3 1 1 1 1 1 2 1 1 2 2 1 1 3 1 1 1 3 2 1 1 1 1 1 9 2 1 2 1 13 1 2 1 6 5 1 1 4 1 5 1 2 1 1 1 1 1 1 1 2 4 1 6 7 1 2 1 2 1 3 4 1 1 3 1 9 11 4 3 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 5 2 3 2 2 13 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 5 1 1 4 1 1 2 1 1 2 1 3 1 1 1 4 1 1 1 1 1 1 4 2 1 2 2 1...
result:
ok 46053 lines
Test #10:
score: 0
Accepted
time: 1151ms
memory: 28608kb
input:
1484 224 6 -1 5 6 -6 2 -3 9 -7 5 -5 10 -9 -7 5 -5 3 -8 10 -10 -10 -9 -6 10 -10 8 0 -7 -2 -8 10 10 3 -9 -3 -6 -9 0 7 2 -3 4 -3 9 8 9 -1 10 4 0 -3 -4 -6 -4 -5 0 -8 -5 7 0 1 6 -9 -2 -4 0 -5 -10 -5 -5 -6 -10 2 4 -5 6 7 -8 4 -7 -5 -2 -9 -3 -3 4 7 6 -10 -10 9 5 4 9 3 -6 -6 4 -9 -10 9 6 4 6 2 7 -5 4 -9 6 1...
output:
13 2 35 158 15 1 1 1 1 2 75 1 1 1 1 1 2 5 2 86 52 1 12 383 1 3 3 1 1 8 1 4 5 23 2 14 2 7 6 1 15 1 69 1 8 49 18 1 1 4 4 15 7 150 12 91 10 1 2 1 3 2 13 6 2 58 9 52 10 10 299 22 105 3 67 82 1 1 3 18 9 1 3 3 1 4 20 5 2 2 1 2 1 190 19 19 17 95 9 1 19 5 25 4 4 2 1 2 2 1 1 1 2 1 8 3 1 1 1 1 1 1 1 135 4 8 2...
result:
ok 1484 lines
Test #11:
score: 0
Accepted
time: 1187ms
memory: 28472kb
input:
1465 606 1 39 59 87 5 9 -41 -57 60 -100 -10 98 27 -12 32 70 -35 -42 90 70 -19 81 99 -95 11 -37 0 -24 -37 -97 -35 94 33 -34 -11 -52 -4 -79 90 -96 -71 63 56 -15 85 -100 -18 3 44 -98 -7 100 -12 -23 -9 47 14 60 45 45 31 90 52 17 -66 33 -44 -90 41 21 88 77 -67 -20 -1 31 71 -14 -35 17 63 77 -74 67 28 -10 ...
output:
606 42 1 2 1 1 1 1 1 2 1 2 1 2 2 2 7 53 2 10 352 4 18 18 29 5 2 45 155 23 1 2 17 188 8 2 2 15 5 19 23 3 10 2 1 5 61 39 50 36 22 17 2 1 153 2 1 1 2 24 13 1 1 21 19 59 169 26 172 181 3 3 1 1 1 4 5 4 2 1 1 2 2 1 1 1 1 1 6 1 498 6 50 71 2 5 17 1 1 50 3 43 135 38 57 7 70 7 117 44 45 76 8 96 1 1 2 1 1 1 1...
result:
ok 1465 lines
Test #12:
score: 0
Accepted
time: 1275ms
memory: 28448kb
input:
1460 546 3 658046175 -153056819 993594004 -307492377 783530689 -920895317 421336842 -551546676 726055988 405820903 397691023 583404123 407016259 -466043024 521449185 581996267 -987957699 -590939939 419390615 107781512 9270849 -8289046 -747348994 -565218247 -484175938 406091392 -45695774 710403629 -6...
output:
385 151 10 134 6 1 1 31 6 12 1 9 6 6 2 14 1 4 43 1 3 12 1 7 2 1 6 2 56 14 35 139 56 16 46 265 279 6 85 2 19 25 1 8 2 81 6 1 1 2 7 2 5 1 4 567 3 1 1 1 1 1 1 2 1 2 411 2 1 3 1 5 17 1 5 1 21 7 22 2 1 1 9 11 2 2 1 2 1 1 1 180 13 7 18 1 2 5 14 19 10 1 1 1 1 1 2 3 1 1 1 1 1 3 1 1 2 27 1 1 1 1 1 18 8 4 10 ...
result:
ok 1460 lines
Test #13:
score: 0
Accepted
time: 1463ms
memory: 28504kb
input:
1506 297 273 1 6 10 -9 -4 3 7 5 9 -5 -1 8 -1 -2 6 8 4 -9 7 10 -3 6 -9 -3 9 5 8 0 -4 10 -2 -10 -10 8 -6 -9 8 -8 9 9 -8 -4 -10 9 0 4 -3 1 8 6 3 5 5 -7 7 2 7 -5 -7 3 -7 -5 0 2 0 0 6 -3 10 3 -10 -6 6 -4 7 0 3 10 1 -9 -8 -7 3 8 9 0 10 6 5 6 10 -10 6 -7 -10 -1 -9 2 -2 -9 2 1 -8 -9 -2 7 -9 3 -10 -6 5 7 9 -...
output:
6 1 4 3 4 6 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok 1506 lines
Test #14:
score: 0
Accepted
time: 1481ms
memory: 26452kb
input:
1487 324 141 76 -83 -28 -6 -22 12 -57 -68 -32 -58 15 -99 64 78 -83 -23 -100 0 7 -9 37 -8 -58 9 71 70 -18 80 81 -59 12 -54 98 -64 -23 -66 61 95 -86 -70 -9 -36 -9 83 -100 78 -22 -87 -100 -73 -65 18 77 36 62 -56 16 -4 -67 46 84 91 -97 19 25 13 -8 -7 -1 -11 69 -22 97 61 8 -20 -35 79 25 -66 -2 29 22 85 -...
output:
2 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 3 2 9 4 1 3 2 27 3 2 1 1 1 1 1 2 2 35 2 1 1 1 1 1 1 1 1 1 3 1 1 2 1 1 1 1 1 1 1 2 2 1 1 1 2 1 1 1 1 3 1 1 1 4 1 2 1 1 1 1 1 9 1 20 2 10 1 3 1 6 1 1 1 1 20 2 1 1 1 1 1 3 1 1 2 3 2 1 2 1 1 2 1 2 1 1 8 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 1 1 2 1 1 2 1 1 1 5 9 3 4 1 9...
result:
ok 1487 lines
Test #15:
score: 0
Accepted
time: 1470ms
memory: 28504kb
input:
1499 36 24 -197283523 -786183498 -96271709 813345380 71616465 132254580 523459299 825723706 -576026433 -422692207 717919262 -883763793 122617446 -736834473 -58061051 -186261661 -132285261 -441378540 -688446748 487454379 -534261510 109982914 -407316090 105208594 822771874 -735690635 979546693 -998459...
output:
6 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 2 2 2 1 3 2 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok 1499 lines
Test #16:
score: 0
Accepted
time: 2421ms
memory: 44968kb
input:
3 85841 2 4 -3 -10 -3 10 -9 7 8 7 -1 -2 4 -3 6 -8 -4 -2 0 4 1 4 -6 -5 3 5 10 2 4 -6 -1 1 4 3 3 1 -7 9 1 -8 0 5 -6 -1 8 10 9 -10 -4 -2 -2 -4 -6 -10 7 -9 8 -8 -10 5 -6 5 3 6 -10 8 8 9 2 -4 -4 3 -6 -7 -10 10 7 -7 -4 -9 -4 0 8 -1 10 4 4 0 -7 6 3 4 9 1 1 -1 8 7 -5 -3 -1 -1 0 3 -3 7 10 8 -10 -3 -10 1 7 4 ...
output:
51863 33978 299626 21 161894 31643 20975
result:
ok 3 lines
Test #17:
score: 0
Accepted
time: 2354ms
memory: 46596kb
input:
4 155974 1 -670046085 -196008889 -276816567 383377567 970736455 -530893342 -661855609 224610574 -109018708 429237258 353157867 -443423219 -552104003 -34440914 801963567 119494858 -633476070 -731506153 99144325 -389654181 -844114921 323953069 263661902 570241383 486233788 -991436569 577252463 -974448...
output:
155974 38042 89335 7376 270939 12455 18074 1992 3239 2574
result:
ok 4 lines
Test #18:
score: 0
Accepted
time: 2671ms
memory: 48424kb
input:
4 23897 717 3 2 0 -2 -3 7 10 -1 7 -4 0 -7 -6 0 -6 -7 -2 5 8 6 -4 10 10 7 5 0 2 6 -1 8 -2 -6 5 -9 10 -6 -9 9 9 3 6 -3 6 0 5 -6 4 0 -2 3 8 9 -6 9 -2 -7 2 2 3 -8 6 3 -4 -8 10 -8 5 -5 -3 10 8 3 -2 -2 -9 10 0 5 3 0 10 -10 4 -9 4 7 2 10 1 -2 -8 5 -5 -10 -9 3 5 9 -7 -2 -5 -3 -3 4 -10 9 -2 -1 -6 10 0 10 -3 ...
output:
10430 2 8 1 80 1 16 10 5 2 1 1 2 2 4 2 1 1 1 56 4 1 54 1 3 86 2 72 3 2 568 3976 1 8 1 1 1 2 2 5 33 1 2 86 14 13 2 8 3 1 1 1 2 6 1 1 32 3 1 1 1 1 1 34 4 1 1 1 10 2 3 58 5 2 1 8 1 23 6 1 18 1 8 33 2 3 4 82 1 2 8 1 18 3 1 1 6 11 8 14 1 3 1 1 1 30 1 3 1 3 1 4 2 6 3 9 1 1 1 55 2 2 1 8 11 4 1 1 8 17 2 3 1...
result:
ok 4 lines
Test #19:
score: 0
Accepted
time: 1725ms
memory: 40080kb
input:
5 66730 699 865044436 474989266 132755733 -278281164 -628933055 63040291 -616180983 -655737596 -295621145 -75099077 -850787597 5986544 981615950 128221712 873238479 -780315503 -947580091 -590116988 853909818 735238320 361938409 -405620346 -189465687 622662875 753661965 21015735 161824150 51294711 61...
output:
252 191 2703 9 26 3 19 23 174 5254 2 243 1439 27 2 14 462 27 16 41 40 3 1 150 1 8 8 2 1551 10 8 4 5 27 17 17 79 3 66 24 22 42 17 2 8 4 78 4 2 4 1 2 1 7 1 1 2 3 2 22 6 1 2 16 5 91 1 1 2 1 13 3 12 15 5 19 23 1 1 1 12 3 4 1 1 1 17 5 5 11 4 14 15 2 1 12 2 1 3 1 5 1 1 1 3 2 47 7 2 8 2 1 1 2 3 1 1 1 156 3...
result:
ok 5 lines
Test #20:
score: 0
Accepted
time: 2779ms
memory: 47628kb
input:
4 28675 26960 5 -6 3 6 6 0 3 1 7 8 -9 8 -6 4 -10 0 2 -9 -1 -6 8 -10 -7 9 3 -2 4 2 -8 4 -10 4 -6 -6 6 -3 9 -2 8 -10 10 -5 -1 5 -2 -10 5 7 -10 3 9 -7 6 -5 -9 -6 -6 -8 -7 -6 -5 0 10 -10 2 -9 -10 3 9 -6 6 1 -3 10 -7 7 7 -7 2 0 -3 -8 5 -2 8 8 -2 5 7 1 -1 5 5 -8 1 -3 -1 5 7 4 5 -2 3 8 -10 6 10 0 -6 -5 -5 ...
output:
1716 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
result:
ok 4 lines
Test #21:
score: 0
Accepted
time: 2909ms
memory: 46360kb
input:
3 207832 21340 -52 49 -86 -47 -25 -22 96 60 43 -100 94 -50 -38 5 -19 -90 70 -98 -43 48 52 30 -12 -58 -67 70 -62 37 -8 -35 -59 50 -100 -55 -50 -19 -60 -85 -3 -22 -21 51 -13 -52 63 18 -76 -19 -44 88 76 -7 -18 38 60 -49 69 -73 56 34 84 -66 93 -21 -38 93 -90 -48 -3 -77 -63 73 69 89 42 8 -38 -1 89 51 -94...
output:
958 19 1 1 2 1 1 6 2 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 1 1 1 18 2 2 26 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 3 2 2 2 1 1 1 2 2 1 1 3 2 2 2 1 2 1 1 1 1 1 2 1 2 1 1 5 4 2 1 1 1 4 3 1 1 1 1 1 4 1 1 1 1 1 3 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 2 6 1 1 3 2 1 1 1 1 1 2 1 2 1 1 1 1 1 3 6 2 13 1 1 ...
result:
ok 3 lines
Test #22:
score: 0
Accepted
time: 2813ms
memory: 46000kb
input:
3 277788 111853 414 -93 -282 734 -752 -49 -775 -263 258 -565 277 282 -866 -137 -485 -756 424 919 -132 -95 -916 -284 309 -48 -27 576 328 661 431 -836 -40 91 -100 -101 -110 449 -284 926 982 249 886 351 -936 -563 -437 -813 242 -575 -998 -14 -636 -994 -119 754 -981 -830 404 -555 -377 644 84 557 -194 360...
output:
16060 43 8 22 6 5 2 5 104 2 18 6 13 6 41 1 16 2 1 1 3 1 1 1 5 72 2 1 263 25 13 8 141 4 14 7 6 3 10 4 1 2 3 1 1 2 6 2 3 21 3 4 1 1 6 5 5 14 1 1 7 187 1 2 3 44 139 2 3250 1 8 92 14 689 33 4 7 5 95 3 2 7 9 4 1 1 1 11 108 20 3 2 15 3 7 6 37 1 29 1 4 15 1 5 2 3 1 12 120 7 1 2 1 61 2 62 3 5 5 1 6 6 2 22 1...
result:
ok 3 lines
Test #23:
score: 0
Accepted
time: 2796ms
memory: 45868kb
input:
3 174819 90915 7502 1507 -9777 8748 9128 5479 -4851 3671 8540 -1589 -4877 4483 9031 -7716 3386 5293 -2857 -6416 -5450 5541 -8187 -7472 -2639 -263 -6989 9279 44 2083 -3294 6928 -2823 -4592 7589 9145 -138 2391 3779 8520 1193 -1318 -8245 2979 -4950 -7895 9269 1557 4265 9247 668 -9346 9437 4047 9972 -10...
output:
10289 4 17 3 2 2 3 2 3 2 25 5 2 1 6123 22 3 1 30 233 243 4 2 2 20 52 1 6 13 4 1 32 19 3 79 5 92 25 14 1308 3 10 1 8 16 2 4 4 1 8 7 9 3 2 2 1 7 4 1 1 4 4 2 5 1 2 1 1 1 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 20 1 1 1 1 2 1 1 1 1 1 1 2 2 2 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 ...
result:
ok 3 lines
Test #24:
score: 0
Accepted
time: 2774ms
memory: 46532kb
input:
3 180336 6485 -356928140 -425067459 -685832519 -413712418 998263625 898704878 602372966 654340115 398008420 -356941737 -222943449 -649878865 -766953265 619092484 33890085 852173635 461359066 -361636935 -866063300 40406065 -944249253 668107833 -729568536 -644283360 449753915 965683656 445991851 97283...
output:
34189 2 3 1 1 1 12 12 1 7 2 2 665 1 1 3 1 6 2 7 1 3 1 21 561 1995 1 657 1 10 501 6 4 3 18 2 4 5 9 2 24 4 19 101 2 1 31 3 44 10 7 110 59 2 19 1 85 1 153 14 1 28 7 1 304 141 95 11 30 6 132 1 51 6 1 3 201 5 3 117 4 9 1 2 24 1 1 2 15 7 1 4 1 3 859 1 2 2 4 394 5350 3 55 1 1 8 950 1 2 1 25 16 1 10 9 7 6 2...
result:
ok 3 lines