QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#288039 | #7862. Land Trade | ucup-team1447# | AC ✓ | 544ms | 87392kb | C++14 | 13.9kb | 2023-12-21 16:35:30 | 2023-12-21 16:35:30 |
Judging History
answer
// dottle bot
#ifndef ONLINE_JUDGE
#define DEBUG
#endif
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <queue>
#include <vector>
#include <bitset>
#include <map>
#include <assert.h>
#include <math.h>
#include <set>
#include <random>
std::mt19937_64 rnd(586666);
#define nln puts("")
#define od(x) printf("%d",x)
#define odb(x) printf("%d ",x)
#define odl(x) printf("%d\n",x)
#define odp(x,y) printf("%d %d\n",x,y)
#define ol(x) puts("")
#define old(x) printf("%lld",x)
#define oldb(x) printf("%lld ",x)
#define oldl(x) printf("%lld\n",x)
#define oldp(x,y) printf("%lld %lld\n",x,y)
#define rg(x) for(int i=1;i<=(x);i++){
#define rg_(i,x) for(int i=1;i<=(x);i++){
#define fe(u) for(int i=h[u];i;i=e[i].nxt){int v=e[i].v;
#define gr }
#define rrg(x) for(int i=0;i<(x);i++){
#define rdln(a) a[i]=read();
#define rdln0(a,x) rrg(x) rdln(a) gr
#define rdln1(a,x) rg(x) rdln(a) gr
#define int long long
const int mod=998244353;
#ifdef int
#define inf 0x3f3f3f3f3f3f3f3fll
#else
#define inf 0x3f3f3f3f
#endif
inline int min(int a,int b){return a>b?b:a;}
inline int max(int a,int b){return a<b?b:a;}
#define cmlSEGMIN
#define cmlSEGMAX
#define cmlSEGSUM
class SegTreeAl{
#ifdef cmlSEGMIN
int minn[1000005<<2];
#endif
#ifdef cmlSEGMAX
int maxn[1000005<<2];
#endif
#ifdef cmlSEGSUM
int sum[1000005<<2];
#endif
int tag[1000005<<2];
#ifdef cmlSEGSUM
void pushdown(int o,int l,int r)
#else
void pushdown(int o)
#endif
{
int&t=tag[o];
#ifdef cmlSEGMIN
minn[o<<1]+=t;
minn[o<<1|1]+=t;
#endif
#ifdef cmlSEGMAX
maxn[o<<1]+=t;
maxn[o<<1|1]+=t;
#endif
#ifdef cmlSEGSUM
int m=l+r>>1;
sum[o<<1]+=t*(m-l+1);
sum[o<<1|1]+=t*(r-m);
#endif
tag[o<<1]+=t;
tag[o<<1|1]+=t;
t=0;
}
void add(int o,int l,int r,int L,int R,int v)
{
if(L<=l&&r<=R)
{
#ifdef cmlSEGMAX
maxn[o]+=v;
#endif
#ifdef cmlSEGMIN
minn[o]+=v;
#endif
#ifdef cmlSEGSUM
sum[o]+=v*(r-l+1);
#endif
tag[o]+=v;
return;
}
int m=l+r>>1;
#ifdef cmlSEGSUM
pushdown(o,l,r);
#else
pushdown(o);
#endif
if(L<=m)add(o<<1,l,m,L,R,v);
if(m<R)add(o<<1|1,m+1,r,L,R,v);
#ifdef cmlSEGMAX
maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
}
#ifdef cmlSEGMIN
int qmin(int o,int l,int r,int L,int R)
{
if(L<=l&&r<=R)
{
return minn[o];
}
int m=l+r>>1,res=inf;
#ifdef cmlSEGSUM
pushdown(o,l,r);
#else
pushdown(o);
#endif
if(L<=m)res=min(res,qmin(o<<1,l,m,L,R));
if(m<R)res=min(res,qmin(o<<1|1,m+1,r,L,R));
#ifdef cmlSEGMAX
maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
return res;
}
#endif
#ifdef cmlSEGMAX
int qmax(int o,int l,int r,int L,int R)
{
if(L<=l&&r<=R)
{
return maxn[o];
}
int m=l+r>>1,res=-inf;
#ifdef cmlSEGSUM
pushdown(o,l,r);
#else
pushdown(o);
#endif
if(L<=m)res=max(res,qmax(o<<1,l,m,L,R));
if(m<R)res=max(res,qmax(o<<1|1,m+1,r,L,R));
#ifdef cmlSEGMAX
maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
return res;
}
#endif
#ifdef cmlSEGSUM
int qsum(int o,int l,int r,int L,int R)
{
if(L<=l&&r<=R)
{
return sum[o];
}
int m=l+r>>1,res=0;
#ifdef cmlSEGSUM
pushdown(o,l,r);
#else
pushdown(o);
#endif
if(L<=m)res+=qsum(o<<1,l,m,L,R);
if(m<R)res+=qsum(o<<1|1,m+1,r,L,R);
#ifdef cmlSEGMAX
maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
return res;
}
#endif
};
#define newe(n) struct Edge{int v,w,nxt;}e[2*n+5];\
typedef int arr[n+5];\
arr h;\
int cnt=1;\
inline void addedge(int u,int v,int w){e[cnt]=(Edge){v,w,h[u]};h[u]=cnt++;}\
struct node{\
int u,d;\
bool operator<(const node&b)const{return d>b.d;}\
};\
void dij(int s,int *d,int N)\
{\
memset(d,0x3f,sizeof(int)*(N+3));\
d[s]=0;std::priority_queue<node>q;q.push((node){s,0});\
while(!q.empty())\
{\
int u=q.top().u,D=q.top().d;q.pop();if(D!=d[u])continue;\
for(int i=h[u];i;i=e[i].nxt){int v=e[i].v,w=e[i].w;\
if(d[u]+w<d[v])d[v]=d[u]+w,q.push((node){v,d[v]});\
}\
}\
}
#define mgs int fa[1<<22],sz[1<<22];\
inline int f(int x){return x==fa[x]?x:fa[x]=f(fa[x]);}\
inline int uf(int x,int y)\
{\
int fx=f(x),fy=f(y);\
if(fx==fy)return 0;\
if(sz[fx]>sz[fy])fx^=fy^=fx^=fy;\
fa[fx]=fy,sz[fy]+=sz[fx];\
return 1;\
}
inline int read()
{
int num=0,f=1;char c=getchar();
while(c<48||c>57){if(c=='-')f=-1;c=getchar();}
while(c>47&&c<58)num=num*10+(c^48),c=getchar();
return num*f;
}
inline int re1d()
{
char c=getchar();
while(c<48||c>49)c=getchar();
return c&1;
}
#ifdef cmlBIT
struct BIT{int a[1<<20|1],n;
void add(int x,int p){while(x<=n)a[x]+=p,x+=x&-x;}
int operator[](int x){int res=0;while(x)res+=a[x],x-=x&-x;return res;}
int operator()(int l,int r){return (*this)[r]-(*this)[l-1];}};
#endif
int rnv[1000005];
// #define COMB
#ifdef COMB
#ifndef int
#define int long long
#endif
int fac[1000005],inv[1000005];
#endif
void initprog()
{
#ifdef COMB
fac[0]=inv[0]=inv[1]=1;
rg(1000000)fac[i]=fac[i-1]*i%mod;gr
rg(1000000)if(i>1)inv[i]=inv[mod%i]*(mod-mod/i)%mod;gr
rg(1000000)rnv[i]=inv[i];gr
rg(1000000)inv[i]=inv[i]*inv[i-1]%mod;gr
#endif
}
#ifdef COMB
int C(int n,int m)
{
if(n==m||m==0)return 1;
if(n<m)return 0;
return fac[n]*inv[m]%mod*inv[n-m]%mod;
}
#endif
inline int qp(int a,int b){int c=1;while(b){if(b&1)c=c*a%mod;a=a*a%mod;b>>=1;}return c;}
inline int mae(int &a,int b){a+=b;if(a>=mod)a-=mod;return a;}
inline int mde(int &a,int b){a+=mod-b;if(a>=mod)a-=mod;return a;}
inline int mle(int &a,int b){a=a*b%mod;return a;}
inline int mve(int &a,int b){a=a*qp(b,mod-2)%mod;return a;}
inline int mxe(int &a,int b){return a=a>b?a:b;}
inline int mne(int &a,int b){return a=a<b?a:b;}
inline int ae(int a,int b){int c=a+b;return c>=mod?c-mod:c;}
inline int de(int a,int b){return ae(a,mod-b);}
inline int me(int a,int b){return a*b%mod;}
inline int mive(int &a,int b){a=a*rnv[b]%mod;return a;}
inline int ive(int a,int b){return a*rnv[b]%mod;}
inline int ve(int a,int b){return a*qp(b,mod-2)%mod;}
#ifdef cmlST
struct STmin{
int a[21][1000005],n;
void init(int N,int *b)
{
n=N;
rg(n)a[0][i]=b[i];gr
rg(20)rg_(j,n-(1<<i)+1)a[i][j]=min(a[i-1][j],a[i-1][j+(1<<i-1)]);gr gr
}
int q(int l,int r)
{
int d=std::__lg(r-l+1);
return min(a[d][l],a[d][r-(1<<d)+1]);
}
};
struct STmax{
int a[21][1000005],n;
void init(int N,int *b)
{
n=N;
rg(n)a[0][i]=b[i];gr
rg(20)rg_(j,n-(1<<i)+1)a[i][j]=max(a[i-1][j],a[i-1][j+(1<<i-1)]);gr gr
}
int q(int l,int r)
{
int d=std::__lg(r-l+1);
return max(a[d][l],a[d][r-(1<<d)+1]);
}
};
#endif
#ifdef cmlSAM
struct SAM{
int ch[1000005][26],lnk[1000005],len[1000005],lst=1,cc=1;
int sz[1000005];
void insert(int c)
{
len[++cc]=len[lst]+1;sz[cc]=1;
int p=lst;lst=cc;
while(p&&ch[p][c]==0)ch[p][c]=cc,p=lnk[p];
if(p==0)lnk[cc]=1;
else
{
int x=ch[p][c];
if(len[p]+1==len[x])lnk[cc]=x;
else
{
int q=cc;++cc;
lnk[cc]=lnk[x];
lnk[x]=lnk[q]=cc;
len[cc]=len[p]+1;
memcpy(ch[cc],ch[x],sizeof(ch[cc]));
while(p&&ch[p][c]==x)ch[p][c]=cc,p=lnk[p];
}
}
}
newe(1000005);
long long ans;
void build()
{
rg(cc)addedge(lnk[i],i,0);gr
}
void dfs(int u)
{
fe(u)dfs(v),sz[u]+=sz[v];gr
if(sz[u]>1)ans=max(ans,1ll*sz[u]*len[u]);
}
}t;
#endif
//常数定义
using namespace std;
const double eps = 1e-9;
const double PI = acos(-1.0);
int sgn(double x)//符号函数,eps使用最多的地方
{
if (fabs(x) < eps)
return 0;
if (x < 0)
return -1;
else
return 1;
}
struct Point
{
double x, y;
Point() {}
Point(double _x, double _y) : x(_x), y(_y) {}
Point operator-(const Point &b) const { return Point(x - b.x, y - b.y); }
Point operator+(const Point &b) const { return Point(x + b.x, y + b.y); }
double operator^(const Point &b) const { return x * b.y - y * b.x; } //叉积
double operator*(const Point &b) const { return x * b.x + y * b.y; } //点积
bool operator<(const Point &b) const { return x < b.x || (x == b.x && y < b.y); }
bool operator==(const Point &b) const { return sgn(x - b.x) == 0 && sgn(y - b.y) == 0; }
Point Rotate(double B, Point P) //绕着点P,逆时针旋转角度B(弧度)
{
Point tmp;
tmp.x = (x - P.x) * cos(B) - (y - P.y) * sin(B) + P.x;
tmp.y = (x - P.x) * sin(B) + (y - P.y) * cos(B) + P.y;
return tmp;
}
void print()
{
printf("%.3lf %.3lf\n",x,y);
}
};
double dist(Point a, Point b) { return sqrt((a - b) * (a - b)); } //两点间距离
double len(Point a){return sqrt(a.x * a.x + a.y * a.y);}//向量的长度
struct Line
{
Point s, e;
Line() {}
Line(Point _s, Point _e) : s(_s), e(_e) {}
//两直线相交求交点
//第一个值为0表示直线重合,为1表示平行,为2是相交
//只有第一个值为2时,交点才有意义
pair<int, Point> operator&(Line b)
{
Point res = s;
// puts("ss:");
// s.print();e.print();
// b.s.print();b.e.print();
// puts("ee");
if (sgn((s - e) ^ (b.s - b.e)) == 0)
{
if (sgn((s - b.e) ^ (b.s - b.e)) == 0)
return make_pair(0, res); //重合
else
return make_pair(1, res); //平行
}
double t = ((s - b.s) ^ (b.s - b.e)) / ((s - e) ^ (b.s - b.e));
res.x += (e.x - s.x) * t;
res.y += (e.y - s.y) * t;
return make_pair(2, res);
}
};
std::vector<Point>a[305*305];
double xl=read(),xr=read(),yl=read(),yr=read();
int cc=0;
int pd(Point x,Line y)
{
return sgn((x-y.s)^(x-y.e));
}
vector<Point>fix(vector<Point>a)
{
vector<Point>b={a[0]};
for(int i=1;i<a.size();i++)
if(dist(a[i],b.back())>eps&&dist(a[i],b[0])>eps)b.push_back(a[i]);
return b;
}
pair<vector<Point>,vector<Point>> join(vector<Point>a,Line b)
{
int l=1e9,r=-1e9,cl=0;
int L=1e9,R=-1e9,cll=0;
for(int i=0;i<a.size();i++)
{
int x=(pd(a[i],b));
if(x>=0)mne(l,i),mxe(r,i),cl++;
if(x<=0)mne(L,i),mxe(R,i),cll++;
}
if(max(cl,cll)==a.size())return {};
l=1e9,r=-1e9,cl=0;
L=1e9,R=-1e9,cll=0;
for(int i=0;i<a.size();i++)
{
int x=(pd(a[i],b));
if(x>0)mne(l,i),mxe(r,i),cl++;
if(x<0)mne(L,i),mxe(R,i),cll++;
}
if(l==0)std::swap(l,L),std::swap(r,R);
// odp(l,r);
Point A=(b&Line(a[l],a[(l+a.size()-1)%a.size()])).second;
Point B=(b&Line(a[r],a[(r+a.size()+1)%a.size()])).second;
// A.print(),B.print();
vector<Point>c,d;
c.push_back(A);for(int i=l;i<=r;i++)c.push_back(a[i]);c.push_back(B);
d.push_back(B);
for(int i=r+1;i<a.size();i++)d.push_back(a[i]);
for(int i=0;i<l;i++)d.push_back(a[i]);
d.push_back(A);
return {fix(c),fix(d)};
}
int pd2(vector<Point>a,Line b)
{
// for(int i=0;i<a.size();i++)printf("%d ",pd(a[i],b));puts("done");
for(int i=0;i<a.size();i++)
{
int x=(pd(a[i],b));
if(x<0)return 0;
}
return 1;
}
char z[1234567];
#define type tp
int type[1234567],cp,dp,lc[1234657],rc[1234567];
Line D[1234567];
int build()
{
char c=getchar();
while(c=='\n'||c=='\r')c=getchar();
if(c=='!')
{
int z=++cp;
type[z]=-(int)'!';
// printf("read !");
lc[z]=build();
return z;
}
if(c=='[')
{
double x=read(),y=read(),z=read();
++cp;++dp;
// if(x==0)D[dp]=Line({0,z/y},)
Point s=(x==0?(Point){0,-z/y}:(Point){-z/x,0});
Point e=s+(Point){-y,x};
D[dp]=Line(s,e);
type[cp]=dp;
// printf("read []");
return cp;
}
else
{
int z=++cp;
// printf("read ()");
lc[z]=build();
if(type[lc[z]]==-(int)'!')
{
type[z]=-(int)'=';
getchar();
return z;
}
type[z]=-getchar();
// printf("read %c",-type[z]);
rc[z]=build();
getchar();
return z;
}
}
std::bitset<305*305>B[305];
std::bitset<305*305>dfs(int u)
{
if(tp[u]>0)
{
std::bitset<305*305>ret;
for(int i=0;i<=cc;i++)
{
if(!pd2(a[i],D[tp[u]]))
ret.set(i);
}
// D[tp[u]].s.print();
// D[tp[u]].e.print();
// printf("tp=%d:",tp[u]);
// for(int i=0;i<=cc;i++)printf("%d",ret.test(i));puts("");
return ret;
// }
}
else
{
char s=-tp[u];
if(s=='=')return dfs(lc[u]);
if(s=='!')return ~dfs(lc[u]);
if(s=='&')return dfs(lc[u])&dfs(rc[u]);
if(s=='|')return dfs(lc[u])|dfs(rc[u]);
if(s=='^')return dfs(lc[u])^dfs(rc[u]);
}
return std::bitset<305*305>();
}
signed main()
{
initprog();
/*
A---B
|/ |
| |
| |
C---D
*/
{
Point C={xl,yl};
Point D={xr,yl};
Point B={xr,yr};
Point A={xl,yr};
a[0]={C,D,B,A};
// a[0].push_back({C,D});
// a[0].push_back({D,A});
// a[0].push_back({A,B});
// a[0].push_back({B,C});
// auto [x,y]=join(a[0],Line({0,0.5},{.5,1}));
// odp(x.size(),y.size());
// for(auto [a,b]:y)printf("%.3lf %.3lf\n",a,b);
}
// scanf("%s",z);
int R=build();
for(int i=1;i<=dp;i++)
{
// printf("s=%.3lf %.3lf e=%.3lf %.3lf\n",D[i].s.x,D[i].s.y,D[i].e.x,D[i].e.y);
int now=cc;
for(int j=0;j<=now;j++)
{
auto [A,B]=join(a[j],D[i]);
if(A.size())++cc,a[j]=A,a[cc]=B;
}
}
// rg(cp)if(tp[i]<0)putchar(-tp[i]);printf(" ");odp(lc[i],rc[i]);gr
// odl(R);
double res=0;
std::bitset<305*305>s=dfs(R);
for(int i=0;i<=cc;i++)
{
if(s.test(i))
{
double t=0;
for(int j=0;j<a[i].size();j++)
res=res+(a[i][j]^a[i][(j+1)%a[i].size()])/2;
}
// printf("%d",s.test(i));
}
printf("%.12lf\n",res);
// puts("");
// for(int i=0;i<=cc;i++)
// {
// for(auto [x,y]:a[i])printf("(%.3lf %.3lf)",x,y);puts("");
// }
// puts("");
return 0;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 14064kb
input:
0 1 0 1 ([-1,1,0]^[-1,-1,1])
output:
0.500000000000
result:
ok found '0.5000000', expected '0.5000000', error '0.0000000'
Test #2:
score: 0
Accepted
time: 0ms
memory: 14176kb
input:
-5 10 -10 5 ((!([1,2,-3]&[10,3,-2]))^([-2,3,1]|[5,-2,7]))
output:
70.451693404635
result:
ok found '70.4516934', expected '70.4516934', error '0.0000000'
Test #3:
score: 0
Accepted
time: 1ms
memory: 14264kb
input:
0 1 -1 1 ([1,1,1]&[-1,-1,-1])
output:
0.000000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #4:
score: 0
Accepted
time: 0ms
memory: 14152kb
input:
0 1000 0 1000 (([1,-1,0]&[-1000,999,999])&([1,0,-998]&[0,1,-998]))
output:
0.000499999966
result:
ok found '0.0005000', expected '0.0005000', error '0.0000000'
Test #5:
score: 0
Accepted
time: 2ms
memory: 14460kb
input:
-725 165 643 735 ((((!(([22,15,137]|(!([23,-5,-41]^(!([2,25,-515]&[-37,10,487])))))&(!(([25,24,47]^([-24,21,-114]^[19,-7,79]))^[4,20,241]))))^(!((!((!(([30,-1,474]^([14,17,155]^[-31,-6,-153]))|[-15,-15,108]))|(([-26,-11,421]&[-15,-3,-224])&[14,-3,458])))^[9,20,-404])))^(!((!((!(([14,-6,-464]^[-11,8,...
output:
47063.334852441418
result:
ok found '47063.3348524', expected '47063.3348524', error '0.0000000'
Test #6:
score: 0
Accepted
time: 2ms
memory: 14640kb
input:
767 957 738 941 ((!(((!([3,-3,507]^[-30,-10,425]))^[-6,7,643])^((!((!([-11,0,450]^[21,17,-65]))&(!([17,0,64]^[-11,0,804]))))|[-31,10,-687])))&((!(([-34,12,-527]^(!([17,-14,-219]^(!([13,-27,-105]^(!([18,-47,-110]&(!([-9,-20,-455]^[-18,26,-228])))))))))^([-4,0,144]^[10,1,396])))^((!((!([35,0,-221]&[-5...
output:
36999.058655663102
result:
ok found '36999.0586557', expected '36999.0586557', error '0.0000000'
Test #7:
score: 0
Accepted
time: 519ms
memory: 18376kb
input:
-513 213 -733 114 (!((!((!((((!([2,16,-57]|[15,40,-272]))^((!(([0,26,315]|[5,-4,-336])^(!([-12,2,218]&([17,-16,-730]&[-7,3,-263])))))^[18,-7,29]))^[5,30,-126])^((!(((!((([8,9,406]^(!([-26,6,63]^[-38,-25,108])))^(([-9,20,220]^(!([-2,-27,213]^[29,16,-269])))|[-12,-4,-586]))^([30,0,-443]|(!((!([-17,0,3...
output:
295728.608103605220
result:
ok found '295728.6081036', expected '295728.6081036', error '0.0000000'
Test #8:
score: 0
Accepted
time: 6ms
memory: 14916kb
input:
-517 -379 -789 477 (((!((!(([1,-12,191]^(!(((!([32,0,89]^[-35,6,33]))^[-3,6,-293])^[20,-39,77])))^(([16,15,-285]^[15,-7,430])^([20,3,-95]|(!((!(([-15,-27,339]^[-11,-13,221])^[33,28,596]))|([-17,21,402]^[22,16,90])))))))&(!((!((!([12,-1,-279]^[-30,-13,224]))^[-29,24,-33]))^([31,-19,288]^(!((!([-1,26,...
output:
107150.604879697101
result:
ok found '107150.6048797', expected '107150.6048797', error '0.0000000'
Test #9:
score: 0
Accepted
time: 0ms
memory: 14604kb
input:
-477 275 -266 519 (!((!((!((!([-1,3,162]|[-32,16,269]))&(!(((((([-31,7,114]^([-12,7,-163]^[23,-10,159]))|(!(([0,-16,114]^[-33,15,-190])|(!([1,-22,308]^[-31,13,316])))))^((!([-12,29,-22]^(([23,15,-8]^[0,15,46])^[6,15,356])))^[22,13,-163]))^([18,17,487]^[28,23,143]))|(!(((!((!(([7,-45,-583]&([31,2,-22...
output:
335169.310517515813
result:
ok found '335169.3105175', expected '335169.3105175', error '0.0000000'
Test #10:
score: 0
Accepted
time: 0ms
memory: 14588kb
input:
175 624 -835 683 (!(((!(([-32,30,-478]^[23,4,-120])^[28,33,413]))|(!((!((!((!([-15,-5,0]^(!((!(((!([0,-32,90]^[-9,-22,-7]))^[-10,-35,344])|(!([1,11,-235]|[-31,-6,-344]))))^(!((!([-15,0,-90]|[-17,-10,-153]))^[-1,6,-8]))))))^(!([8,-6,302]^[-2,4,91]))))|([13,28,-70]^[16,-11,-74])))^(((((!((!((([-5,8,45...
output:
411470.358504943142
result:
ok found '411470.3585049', expected '411470.3585049', error '0.0000000'
Test #11:
score: 0
Accepted
time: 58ms
memory: 19340kb
input:
-1000 1000 -1000 1000 ([1,0,-1000]^([0,1,-1000]^([1,0,-980]^([0,1,-980]^([1,0,-960]^([0,1,-960]^([1,0,-940]^([0,1,-940]^([1,0,-920]^([0,1,-920]^([1,0,-900]^([0,1,-900]^([1,0,-880]^([0,1,-880]^([1,0,-860]^([0,1,-860]^([1,0,-840]^([0,1,-840]^([1,0,-820]^([0,1,-820]^([1,0,-800]^([0,1,-800]^([1,0,-780]^...
output:
2000000.000000000000
result:
ok found '2000000.0000000', expected '2000000.0000000', error '0.0000000'
Test #12:
score: 0
Accepted
time: 59ms
memory: 19424kb
input:
-500 500 -500 500 ([2,-3,-1000]^([2,3,-1000]^([2,-3,-980]^([2,3,-980]^([2,-3,-960]^([2,3,-960]^([2,-3,-940]^([2,3,-940]^([2,-3,-920]^([2,3,-920]^([2,-3,-900]^([2,3,-900]^([2,-3,-880]^([2,3,-880]^([2,-3,-860]^([2,3,-860]^([2,-3,-840]^([2,3,-840]^([2,-3,-820]^([2,3,-820]^([2,-3,-800]^([2,3,-800]^([2,-...
output:
540000.000000004307
result:
ok found '540000.0000000', expected '540000.0000000', error '0.0000000'
Test #13:
score: 0
Accepted
time: 12ms
memory: 20900kb
input:
-1000 1000 -1000 1000 ([-57,281,0]^([478,81,0]^([-362,995,0]^([-339,614,0]^([491,769,0]^([673,486,0]^([-637,374,0]^([-204,383,0]^([-509,859,0]^([-973,757,0]^([-707,648,0]^([-792,409,0]^([-944,621,0]^([446,21,0]^([-553,473,0]^([795,704,0]^([-821,992,0]^([89,47,0]^([771,332,0]^([-845,259,0]^([271,867,...
output:
1823923.897152950289
result:
ok found '1823923.8971530', expected '1823923.8971530', error '0.0000000'
Test #14:
score: 0
Accepted
time: 2ms
memory: 14268kb
input:
-1000 1000 -1000 1000 (([-27,-20,-237]^((([31,17,247]^[-4,-23,-917])^(![8,21,-342]))^((([-17,2,-281]&[-26,-31,186])|[31,-21,-697])|[-18,8,-512])))&[-5,19,-104])
output:
420530.734540940553
result:
ok found '420530.7345409', expected '420530.7345409', error '0.0000000'
Test #15:
score: 0
Accepted
time: 253ms
memory: 17108kb
input:
-1000 1000 -1000 1000 ((((!(((([31,17,247]^[-4,-23,-917])^(![8,21,-342]))^((([-17,2,-281]&[-26,-31,186])|[31,-21,-697])|[-18,8,-512]))^((!((!(!((([12,23,237]|[913,22,925])^[-14,11,-956])^[-9,-10,818])))|((([3,1,-213]^[-296,-13,171])&(!(!((!((!([-10,6,636]^[17,19,-546]))^([28,28,-698]|[-14,-4,-295]))...
output:
1479667.440785947023
result:
ok found '1479667.4407859', expected '1479667.4407860', error '0.0000000'
Test #16:
score: 0
Accepted
time: 544ms
memory: 20396kb
input:
-1000 1000 -1000 1000 (((((((((((([-15,-2,9]^[-168,-28,507])^[-31,-23,293])^[23,-1,-290])^(([26,-4,869]^(([24,2,522]^[-10,5,-918])^[-22,5,50]))^[16,-827,-276]))^(([-1,-24,-651]^([16,15,-332]^[-722,29,-330]))^([-19,-23,14]^[12,-18,289])))^(((([6,-29,803]^[8,-8,50])^((([9,-7,-112]^([23,-29,-827]^[-12,...
output:
1945479.957439885940
result:
ok found '1945479.9574399', expected '1945479.9574399', error '0.0000000'
Test #17:
score: 0
Accepted
time: 0ms
memory: 14304kb
input:
0 1000 0 1000 (((((((([85,-100,0]^[21,-100,0])^[55,-100,0])^([29,-100,0]^([47,-100,0]^([78,-100,0]^([13,-100,0]^([100,-11,0]^[86,-100,0]))))))^(([48,-100,0]^[35,-100,0])^((([39,-100,0]^[98,-100,0])^([9,-100,0]^[100,-14,0]))^[100,-79,0])))^([12,-100,0]^[100,-100,0]))^((([20,-100,0]^([100,-64,0]^([100...
output:
500000.000000000000
result:
ok found '500000.0000000', expected '500000.0000000', error '0.0000000'
Test #18:
score: 0
Accepted
time: 62ms
memory: 15192kb
input:
0 100 0 100 (((([-85,1,0]^((([-21,1,0]^([-55,1,0]^(([-29,1,0]^[-47,1,0])^([-78,1,0]^[-13,1,0]))))^(([11,1,-100]^[-86,1,0])^[-48,1,0]))^([-35,1,0]^((((([-39,1,0]^([-98,1,0]^[-9,1,0]))^((([14,1,-100]^[79,1,-100])^[-12,1,0])^[100,1,-100]))^((([-20,1,0]^[64,1,-100])^(([60,1,-100]^([-1,1,0]^[41,1,-100]))...
output:
4987.314854974267
result:
ok found '4987.3148550', expected '4987.3148550', error '0.0000000'
Test #19:
score: 0
Accepted
time: 276ms
memory: 16808kb
input:
-500 1000 -500 1000 ((((((([2,-1,37]^[2,-1,1])^(([2,1,-55]^(([2,1,-29]^[2,1,-47])^[2,1,-78]))^([2,1,-13]^[0,1,-11])))^(((([2,1,-86]^([2,1,-48]^[2,-1,100]))^[2,-1,95])^[2,1,-98])^([2,1,-9]^([0,1,-14]^[0,1,-79]))))^([2,-1,88]^[0,1,-100]))^(([2,1,-20]^(([0,1,-64]^([2,-1,85]^[2,1,-1]))^(([2,-1,65]^([0,1...
output:
145000.000000000000
result:
ok found '145000.0000000', expected '145000.0000000', error '0.0000000'
Test #20:
score: 0
Accepted
time: 11ms
memory: 87392kb
input:
0 1000 0 1000 (!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!(!...
output:
623640.000000000000
result:
ok found '623640.0000000', expected '623640.0000000', error '0.0000000'
Test #21:
score: 0
Accepted
time: 63ms
memory: 15504kb
input:
-300 300 -300 300 ((([-199,200,0]&[299,-300,0])&([-1,-300,300]&[1,200,-200]))&([-1,-215,215]^((((([-1,-279,279]^[-1,-245,245])^(((((([-1,-271,271]^[-1,-253,253])^([-1,-222,222]^([-1,-287,287]^[289,-290,0])))^([-1,-214,214]^[-1,-252,252]))^(([-1,-265,265]^[-1,-261,261])^([-1,-202,202]^((([-1,-291,291...
output:
0.000001388917
result:
ok found '0.0000014', expected '0.0000014', error '0.0000000'
Test #22:
score: 0
Accepted
time: 2ms
memory: 14316kb
input:
0 1000 0 1000 (([-998,999,0]&[999,-1000,0])&[-1,-1,3])
output:
0.000001127254
result:
ok found '0.0000011', expected '0.0000011', error '0.0000000'
Extra Test:
score: 0
Extra Test Passed