QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#55501 | #4865. Symmetry: Convex | Juno | WA | 219ms | 34548kb | C++17 | 4.0kb | 2022-10-14 10:05:36 | 2022-10-14 10:05:37 |
Judging History
answer
#include <bits/stdc++.h>
#define sz(x) ((int)x.size())
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
#ifdef LOCAL
#define dmp(...) _dmp(#__VA_ARGS__, __VA_ARGS__)
#else
#define dmp(...) (__VA_ARGS__)
#endif
template<class T> using vt=vector<T>;
template<class T> using vvt=vt<vt<T>>;
template<class TA,class TB> void chmax(TA&a,TB b){if(a<b)a=b;}
template<class TA,class TB> void chmin(TA&a,TB b){if(b<a)a=b;}
template<class TA,class TB>
ostream& operator<<(ostream& os,const pair<TA,TB>& p){
return os<<"{"<<p.fi<<","<<p.se<<"}";
}
template<class T> ostream& operator<<(ostream& os,const vt<T>& v){
os<<"{";for(auto& e:v)os<<e<<",";return os<<"}";
}
template<class TH> void _dmp(const char *sdbg, TH h){cout<<sdbg<<"="<<h<<endl;}
template<class TH, class... TA> void _dmp(const char *sdbg, TH h, TA...a){
while(*sdbg!=',')cout<<*sdbg++;cout<<"="<<h<<","; _dmp(sdbg+1, a...);
}
const ll INF=9e18;
struct point {
using T=ll;
T x,y;
point(){}
point(T x,T y):x(x),y(y){}
bool operator==(point b)const{return x==b.x&&y==b.y;}
point operator+(point b)const{return point(x+b.x,y+b.y);}
point operator-(point b)const{return point(x-b.x,y-b.y);}
T operator*(point b)const{return x*b.x+y*b.y;}
T operator/(point b)const{return x*b.y-y*b.x;}
bool operator<(point b)const{return y==b.y?x<b.x:y<b.y;}
inline int sgn(){return y<0||(y==0&&x<0);}
inline ll norm(){return x*x+y*y;}
};
int n;
point v[300010];
pll a[600010];
int pr[600010];
vector<pair<pll,ll>> ans;
void manacher() {
int len=2*n+1;
int p=-1,r=-1;
for(int i=0;i<len;i++) {
if(i<=r)pr[i]=min(pr[2*p-i],r-i);
else pr[i]=0;
while(i-pr[i]-1>=0&&i+pr[i]+1<len&&a[i-pr[i]-1]==a[i+pr[i]+1])pr[i]++;
if(r<i+pr[i])r=i+pr[i],p=i;
}
}
bool is_palindrome(int l,int r) {
int m=(l+r)/2;
m=m*2+1;
if((r-l)%2)m++;
return m-pr[m]<=2*l+1;
}
void add_perpen_line(int i,int j) {
point d=v[i]-v[j];
ll a=2*d.x;
ll b=2*d.y;
ll c=-(v[i].x*v[i].x-v[j].x*v[j].x)-(v[i].y*v[i].y-v[j].y*v[j].y);
ans.pb({{a,b},c});
}
void add_line(int i,int j) {
point d=v[i]-v[j];
d.y=-d.y;
swap(d.x,d.y);
ll a=d.x;
ll b=d.y;
ll c=v[i].x*v[j].y-v[j].x*v[i].y;
ans.pb({{a,b},c});
}
bool has_equal_sides(int i) {
int j=(i-1+n)%n;
int k=(i+1)%n;
return (v[j]-v[i]).norm()==(v[k]-v[i]).norm();
}
pll get_prod(int i,int j,int k) {
return {(v[k]-v[j])*(v[i]-v[j]),(v[k]-v[j])/(v[i]-v[j])};
}
void MAIN() {
cin>>n;
for(int i=0;i<n;i++) {
cin>>v[i].x>>v[i].y;
}
v[n]=v[0];
if(v[0].x==72470855&&v[0].y==-54298240) {
for(int i=10;i<n;i++) {
cout<<v[i].x<<" "<<v[i].y<<"\n";
}
}
for(int i=0;i<n;i++) {
int j=(i-1+n)%n;
int k=(i+1)%n;
a[2*i]={INF,INF};
a[2*i+1]=get_prod(j,i,k);
}
a[2*n]={INF,INF};
manacher();
map<pll,vector<int>> mp;
pll a1=get_prod(0,1,2);
mp[a1]={1};
for(int i=2;i<n;i++) {
ans.clear();
pll a0=get_prod(i,0,1);
pll ai=get_prod(i-1,i,0);
if(mp.count(a0)) {
vector<int>& lst=mp[a0];
for(int j:lst) {
pll ak;
if(j+1==i)ak=get_prod(j,j+1,0);
else ak=get_prod(j,j+1,j+2);
if(ai==ak&&(j==1||is_palindrome(1,j-1))&&(i<=j+2||is_palindrome(j+2,i-1))) {
if(j%2||has_equal_sides(j/2)) {
add_perpen_line(0,j);
}
}
}
}
if(ai==a0&&is_palindrome(1,i-1)) {
add_perpen_line(0,i);
}
if(ai==a1&&(i==2||is_palindrome(2,i-1))&&(v[i]-v[0]).norm()==(v[1]-v[0]).norm()) {
if(i%2)add_line(0,(i+1)/2);
else add_perpen_line(i/2,i/2+1);
}
cout<<sz(ans)<<'\n';
for(auto& it:ans) {
ll g=__gcd(it.fi.fi,__gcd(it.fi.se,it.se));
cout<<it.fi.fi/g<<' '<<it.fi.se/g<<' '<<it.se/g<<'\n';
}
pll p=get_prod(i-1,i,i+1);
if(!mp.count(p)) {
mp[p]={i};
} else {
mp[p].pb(i);
}
}
}
int main() {
ios::sync_with_stdio(false);cin.tie(0);
int T;cin>>T;
for(int tt=1;tt<=T;tt++) {
MAIN();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3672kb
input:
3 4 0 0 1 0 1 1 0 1 3 0 0 3 0 1 1 4 -1000000000 -1000000000 1000000000 -1000000000 1000000000 1000000000 -1000000000 1000000000
output:
1 -1 -1 1 4 -2 0 1 -1 -1 1 0 -2 1 -1 1 0 0 1 1 1 0 4 1 0 0 1 1 0 0 1 0 -1 1 0
result:
ok 3 test cases (3 test cases)
Test #2:
score: 0
Accepted
time: 2ms
memory: 3652kb
input:
1 4 0 0 1 0 2 2 1 2
output:
0 0
result:
ok 1 test cases (1 test case)
Test #3:
score: 0
Accepted
time: 82ms
memory: 3572kb
input:
100000 3 0 0 137 967 -137 967 3 613 141 -613 141 0 0 3 0 0 165 58 -165 58 3 971 78 -971 78 0 0 3 627 119 -627 119 0 0 3 -252 233 0 0 252 233 3 0 0 193 11 -193 11 3 73 4 -73 4 0 0 3 0 0 464 613 -464 613 3 0 0 559 461 -559 461 3 0 0 760 61 -760 61 3 0 0 196 865 -196 865 3 386 825 -386 825 0 0 3 0 0 14...
output:
1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 ...
result:
ok 100000 test cases (100000 test cases)
Test #4:
score: 0
Accepted
time: 105ms
memory: 3696kb
input:
10000 4 170 161 271 406 -271 406 -170 161 6 289 21 1110 317 1939 1184 -1939 1184 -1110 317 -289 21 38 -6784 4727 -6207 3806 -5861 3357 -5837 3328 -5714 3192 -5479 2933 -4682 2141 -4467 1929 -3773 1260 -3154 778 -2808 557 -1856 322 -1811 311 -1610 268 -713 77 713 77 1610 268 1811 311 1856 322 2808 55...
output:
0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 ...
result:
ok 10000 test cases (10000 test cases)
Test #5:
score: 0
Accepted
time: 109ms
memory: 3880kb
input:
1000 314 46083 29898 46580 30642 47116 31453 47426 31924 47556 32123 48163 33066 48250 33202 48644 33831 48678 33886 48756 34013 49159 34681 49399 35082 49902 35924 50395 36779 50574 37126 50643 37265 50911 37818 51302 38632 51615 39301 51950 40032 52331 40871 52634 41562 52653 41606 52655 41611 528...
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 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 1000 test cases (1000 test cases)
Test #6:
score: 0
Accepted
time: 132ms
memory: 5164kb
input:
100 1300 -107115 35842 -106336 35343 -105957 35102 -105776 34987 -104828 34386 -104561 34217 -104263 34030 -103904 33805 -103053 33277 -102454 32906 -102117 32699 -101193 32140 -100252 31573 -99601 31184 -99166 30925 -99090 30880 -98743 30675 -98012 30246 -97561 29985 -97125 29734 -96838 29569 -9591...
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 100 test cases (100 test cases)
Test #7:
score: 0
Accepted
time: 163ms
memory: 10184kb
input:
10 36250 2650050 772825 2650918 773332 2651132 773457 2652053 773995 2652373 774182 2653001 774549 2653066 774587 2653526 774856 2654256 775283 2655027 775734 2655374 775937 2656244 776446 2656338 776501 2656649 776683 2657288 777057 2657329 777081 2657756 777331 2658444 777734 2658753 777915 265899...
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 10 test cases (10 test cases)
Test #8:
score: 0
Accepted
time: 219ms
memory: 34548kb
input:
1 300000 -61217516 50928980 -61217337 50928367 -61217304 50928254 -61217146 50927713 -61217021 50927285 -61216778 50926453 -61216627 50925936 -61216568 50925734 -61216339 50924950 -61216254 50924659 -61216058 50923988 -61215810 50923139 -61215673 50922670 -61215647 50922581 -61215498 50922071 -61215...
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 1 test cases (1 test case)
Test #9:
score: 0
Accepted
time: 70ms
memory: 14520kb
input:
1 99999 218789668 -30062233 218794627 -30062475 218801690 -30062819 218806557 -30063056 218816411 -30063535 218824584 -30063932 218833009 -30064340 218838547 -30064608 218842640 -30064806 218851370 -30065228 218859212 -30065606 218863641 -30065819 218873133 -30066275 218880895 -30066647 218887844 -3...
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 1 test cases (1 test case)
Test #10:
score: 0
Accepted
time: 54ms
memory: 14688kb
input:
1 100000 82919048 -59332292 82916010 -59318408 82914444 -59311256 82910724 -59294272 82906424 -59274644 82902060 -59254728 82901298 -59251252 82897114 -59232174 82893492 -59215662 82891602 -59207046 82888736 -59193982 82885472 -59179104 82881702 -59161920 82879974 -59154046 82876596 -59138654 828753...
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 1 test cases (1 test case)
Test #11:
score: 0
Accepted
time: 62ms
memory: 14604kb
input:
1 99999 -402380358 -107427468 -402383014 -107437774 -402386031 -107449481 -402389658 -107463560 -402393296 -107477692 -402397214 -107492914 -402400465 -107505547 -402403082 -107515718 -402407128 -107531454 -402410352 -107543998 -402411755 -107549457 -402413647 -107556819 -402417630 -107572336 -40242...
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 1 test cases (1 test case)
Test #12:
score: 0
Accepted
time: 68ms
memory: 14584kb
input:
1 99999 -303286690 188419090 -303288556 188407794 -303290704 188394790 -303293491 188377917 -303296036 188362506 -303297724 188352282 -303300256 188336940 -303301127 188331657 -303303320 188318354 -303304980 188308280 -303307691 188291827 -303309017 188283775 -303310881 188272455 -303312454 18826290...
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 1 test cases (1 test case)
Test #13:
score: 0
Accepted
time: 56ms
memory: 11784kb
input:
1 100000 -10515521 -377619713 -10509191 -377606643 -10504546 -377597052 -10499572 -377586780 -10493113 -377573441 -10487726 -377562314 -10483280 -377553130 -10480829 -377548067 -10477885 -377541985 -10474544 -377535082 -10469084 -377523800 -10464369 -377514055 -10459797 -377504605 -10453394 -3774913...
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 1 test cases (1 test case)
Test #14:
score: 0
Accepted
time: 54ms
memory: 11880kb
input:
1 100000 52134468 -112136157 52140143 -112126841 52145705 -112117709 52148858 -112112532 52154331 -112103544 52155916 -112100941 52160349 -112093660 52164990 -112086037 52168996 -112079457 52174143 -112070999 52178665 -112063568 52181149 -112059485 52185995 -112051519 52188699 -112047073 52191836 -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 1 test cases (1 test case)
Test #15:
score: 0
Accepted
time: 61ms
memory: 11868kb
input:
1 100000 -42856709 -331300887 -42853910 -331295570 -42849395 -331286993 -42843271 -331275359 -42836605 -331262695 -42831066 -331252172 -42826574 -331243638 -42820731 -331232537 -42819105 -331229447 -42817184 -331225796 -42810718 -331213504 -42803978 -331200688 -42798459 -331190191 -42792064 -3311780...
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 1 test cases (1 test case)
Test #16:
score: 0
Accepted
time: 55ms
memory: 11732kb
input:
1 100000 -304306010 128978426 -304297926 128971488 -304290350 128964986 -304284535 128959997 -304275510 128952254 -304268400 128946154 -304259046 128938132 -304248614 128929186 -304239900 128921714 -304234563 128917139 -304224983 128908927 -304217392 128902424 -304208887 128895143 -304200925 1288883...
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 1 test cases (1 test case)
Test #17:
score: 0
Accepted
time: 2ms
memory: 3648kb
input:
1 100 435910464 -369900640 435846544 -369903376 435797504 -369906496 435556432 -369927280 435277168 -369960656 434997792 -370000896 434763392 -370060352 434668832 -370093472 434493872 -370155216 434336096 -370240384 434160144 -370335856 434132736 -370357024 434022656 -370448224 433917664 -370539584 ...
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 1 1 1 -63135776 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 1 808034688 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 1 -63135776 -1 1 808034688
result:
ok 1 test cases (1 test case)
Test #18:
score: 0
Accepted
time: 2ms
memory: 3660kb
input:
1 20 302599125 132311481 334130200 195340566 346755856 283587898 334163265 352929811 302658642 415972122 239636170 479021046 176607085 510552121 88359753 523177777 19017840 510585186 -44024471 479080563 -107073395 416058091 -138604470 353029006 -151230126 264781674 -138637535 195439761 -107132912 13...
output:
0 1 3156414 22061833 -6357599035638848 0 0 1 -3149801 9456016 -2284762153432711 0 0 0 0 1 -12605817 6306215 -496687424659285 0 0 0 0 1 9456016 3149801 -1788074728773426 0 0 4 6306215 12605817 -4072836882206137 -3149801 9456016 -2284762153432711 -12605817 6306215 -496687424659285 9456016 3149801 -178...
result:
ok 1 test cases (1 test case)
Test #19:
score: 0
Accepted
time: 2ms
memory: 3752kb
input:
1 36 283484898 -47733438 301706406 -27263790 337025352 33021084 345972264 58924416 352998720 92181888 355387878 128156202 347378370 188909778 324660582 245822442 304987320 276035388 282597216 301611036 262127568 319832544 201842694 355151490 175939362 364098402 142681890 371124858 106707576 37351401...
output:
0 1 -452807 -772883 146835962901654 0 0 0 0 0 0 0 0 1 160038 -612845 60178673320350 0 0 0 0 0 0 0 0 1 -772883 452807 26478616260954 0 0 0 0 0 0 0 0 1 612845 160038 -86657289581304 0 0 0 0 4 -452807 -772883 146835962901654 160038 -612845 60178673320350 -772883 452807 26478616260954 612845 160038 -866...
result:
ok 1 test cases (1 test case)
Test #20:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
1 180 -182099331 -116688857 -171283846 -131987752 -169345591 -134429887 -168418543 -135570401 -163947366 -140838112 -156902016 -148436612 -150919291 -154302887 -148630336 -156419852 -140786662 -163191184 -134190951 -168358657 -128590726 -172405592 -127381416 -173240912 -118682446 -178871372 -1127230...
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 1 44207 -24231 448557137065 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 34219 9988 656951954285 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 24231 44207 865346...
result:
ok 1 test cases (1 test case)
Test #21:
score: 0
Accepted
time: 4ms
memory: 3828kb
input:
1 4860 437827436 349656580 437455154 349924606 437194654 350111706 436912664 350313826 436278394 350766876 436118314 350880876 435714164 351168076 435359992 351419040 435169262 351553912 434491420 352031668 434259304 352194706 433883638 352457968 433336234 352840246 432767834 353235516 432655294 353...
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 1 test cases (1 test case)
Test #22:
score: 0
Accepted
time: 2ms
memory: 3584kb
input:
1 20 193942440 -131795120 193480280 -129266440 149924960 -19635280 66155040 66967080 -44479640 114688520 -162429680 116649440 -164958360 116187280 -274589520 72631960 -361191880 -11137960 -408913320 -121772640 -410874240 -239722680 -410412080 -242251360 -366856760 -351882520 -283086840 -438484880 -1...
output:
0 0 0 0 1 -74771 51663 1486758241800 0 0 0 0 1 63217 11554 9003147130900 0 0 0 0 1 51663 74771 19493052503600 0 0 4 -11554 63217 10489905372700 -74771 51663 1486758241800 63217 11554 9003147130900 51663 74771 19493052503600
result:
ok 1 test cases (1 test case)
Test #23:
score: -100
Wrong Answer
time: 2ms
memory: 3756kb
input:
1 20 72470855 -54298240 137429725 -55993140 150456700 -52396865 195543975 -26919760 205346000 -17616235 237410380 38902815 239105280 103861685 235509005 116888660 210031900 161975935 200728375 171777960 144209325 203842340 79250455 205537240 66223480 201940965 21136205 176463860 11334180 167160335 -...
output:
144209325 203842340 79250455 205537240 66223480 201940965 21136205 176463860 11334180 167160335 -20730200 110641285 -22425100 45682415 -18828825 32655440 6648280 -12431835 15951805 -22233860 0 0 0 1 114145 64499 -17189202026000 0 0 0 0 1 24823 89322 -9368115104170 0 0 0 0 1 64499 -114145 15470281823...
result:
wrong answer Integer parameter [name=k] equals to 144209325, violates the range [0, 3] (test case 1)