QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#557053#4688. Window ManagerAllSolvedin1557WA 1ms3848kbC++177.5kb2024-09-11 01:28:412024-09-11 01:28:43

Judging History

你现在查看的是最新测评结果

  • [2024-09-11 01:28:43]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3848kb
  • [2024-09-11 01:28:41]
  • 提交

answer

#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef long double ld;

struct dat{
    ll x,y,w,h,time;
    bool in(ll a,ll b) { return (x<=a&&a<x+w&&y<=b&&b<y+h); }
    bool inter(dat d) { return d.in(x,y)||d.in(x,y+h-1)||d.in(x+w-1,y)||d.in(x+w-1,y+h-1)||in(d.x,d.y)||in(d.x,d.y+d.h-1)||in(d.x+d.w-1,d.y)||in(d.x+d.w-1,d.y+d.h-1); }
    bool inc(dat d) { return in(d.x,d.y)&&in(d.x,d.y+d.h-1)&&in(d.x+d.w-1,d.y)&&in(d.x+d.w-1,d.y+d.h-1); }
    bool interx(dat d) { return (y<d.y+d.h&&d.y<y+h); }
    bool intery(dat d) { return (x<d.x+d.w&&d.x<x+w); }
    bool operator==(const dat &d)
    {
        return x==d.x&&y==d.y&&h==d.h&&w==d.w;
    }
};

vector<dat>W;

void notfit(ll cnt, string &comm)
{ cout<<"Command "<<cnt<<": "<<comm<<" - window does not fit\n"; }

void notpos(ll cnt, string &comm)
{ cout<<"Command "<<cnt<<": "<<comm<<" - no window at given position\n"; }

void notmov(ll cnt, string &comm, ll real, ll fact)
{ cout<<"Command "<<cnt<<": "<<comm<<" - moved "<<real<<" instead of "<<fact<<"\n"; }

int main()
{
    ios::sync_with_stdio(0); cin.tie(0);
    ll X,Y,cnt=0; cin>>X>>Y;
    bool debug = 0;
    dat S={0,0,X,Y};
    while(1)
    {
        string s;
        cin>>s;
        cnt++;

        if(cin.eof()) break;
        if(s=="OPEN")
        {
            ll x,y,w,h; cin>>x>>y>>w>>h;
            dat now={x,y,w,h,cnt};
            if(!S.inc(now))
            {
                notfit(cnt,s);
                continue;
            }
            bool flag=1;
            for(auto d:W)
                if(d.inter(now)) flag=0;
            if(flag)
                W.push_back(now);
            else notfit(cnt,s);
        }
        if(s=="RESIZE")
        {
            ll x,y,w,h; cin>>x>>y>>w>>h;

            ll ex=-1;
            for(int i=0;i<W.size();i++) if(W[i].in(x,y)) ex=i;
            if(ex==-1)
            {
                notpos(cnt,s);
                continue;
            }
            dat prv=W[ex];
            W.erase(W.begin()+ex);
            dat now=prv; now.w=w; now.h=h;

            if(!S.inc(now))
            {
                W.push_back(prv);
                notfit(cnt,s);
                continue;
            }
            bool flag=1;
            for(auto d:W)
                if(d.inter(now)) flag=0;
            if(flag)
                W.push_back(now);
            else W.push_back(prv), notfit(cnt,s);
        }
        if(s=="CLOSE")
        {
            ll x,y; cin>>x>>y;
            ll ex=-1;
            for(int i=0;i<W.size();i++) if(W[i].in(x,y)) ex=i;
            if(ex==-1)
            {
                notpos(cnt,s);
                continue;
            }
            W.erase(W.begin()+ex);
        }
        if(s=="MOVE")
        {
            ll x,y,dx,dy; cin>>x>>y>>dx>>dy;
            ll ex=-1;
            for(int i=0;i<W.size();i++) if(W[i].in(x,y)) ex=i;
            if(ex==-1)
            {
                notpos(cnt,s);
                continue;
            }
            dat now=W[ex];
            if(dx>0)
            {
                sort(W.begin(),W.end(),[](dat a,dat b){ return a.x<b.x; });
                int pos;
                for(int i=0;i<W.size();i++) if(W[i]==now) pos=i;
                vector<ll>dist(W.size(),0);
                ll over=0;
                for(ll i=pos;i<W.size();i++)
                {
                    if(i==pos) dist[i]=dx;
                    else
                    {
                        for(ll j=pos;j<i;j++)
                        {
                            if(W[i].interx(W[j]))
                                dist[i]=max(dist[i],dist[j]-abs(W[i].x-W[j].x-W[j].w));
                        }
                    }
                    over=max(over,dist[i]-(X-W[i].x-W[i].w));
                }
                if(over>0) notmov(cnt,s,dx-over,dx);
                for(ll i=pos;i<W.size();i++)
                {
                    W[i].x+=max(0LL,dist[i]-over);
                }
            }
            if(dx<0)
            {
                sort(W.begin(),W.end(),[](dat a,dat b){ return a.x>b.x; });
                dx*=-1;
                int pos;
                for(int i=0;i<W.size();i++) if(W[i]==now) pos=i;
                vector<ll>dist(W.size(),0);
                ll over=0;
                for(ll i=pos;i<W.size();i++)
                {
                    if(i==pos) dist[i]=dx;
                    else
                    {
                        for(ll j=pos;j<i;j++)
                        {
                            if(W[i].interx(W[j]))
                                dist[i]=max(dist[i],dist[j]-abs(W[i].x-W[j].x+W[i].w));
                        }
                    }
                    over=max(over,dist[i]-(W[i].x));
                }
                if(over>0) notmov(cnt,s,dx-over,dx);
                for(ll i=pos;i<W.size();i++)
                {
                    W[i].x-=max(0LL,dist[i]-over);
                }
            }
            if(dy>0)
            {
                sort(W.begin(),W.end(),[](dat a,dat b){ return a.y<b.y; });
                int pos;
                for(int i=0;i<W.size();i++) if(W[i]==now) pos=i;
                vector<ll>dist(W.size(),0);
                ll over=0;
                for(ll i=pos;i<W.size();i++)
                {
                    if(i==pos) dist[i]=dy;
                    else
                    {
                        for(ll j=pos;j<i;j++)
                        {
                            if(W[i].intery(W[j]))
                                dist[i]=max(dist[i],dist[j]-abs(W[i].y-W[j].y-W[j].h));
                        }
                    }
                    over=max(over,dist[i]-(Y-W[i].y-W[i].h));
                }
                if(over>0) notmov(cnt,s,dy-over,dy);
                for(ll i=pos;i<W.size();i++)
                {
                    W[i].y+=max(0LL,dist[i]-over);
                }
            }
            if(dy<0)
            {
                sort(W.begin(),W.end(),[](dat a,dat b){ return a.y>b.y; });
                dy*=-1;
                int pos;
                for(int i=0;i<W.size();i++) if(W[i]==now) pos=i;
                if(debug)
                {
                    cout<<cnt<<'\n';
                    cout<<"-------\n";
                    for(auto [x,y,w,h,t]:W) cout<<x<<' '<<y<<' '<<w<<' '<<h<<' '<<t<<'\n';
                    cout<<"-------\n";
                }
                vector<ll>dist(W.size(),0);
                ll over=0;
                for(ll i=pos;i<W.size();i++)
                {
                    if(i==pos) dist[i]=dy;
                    else
                    {
                        for(ll j=pos;j<i;j++)
                        {
                            if(W[i].intery(W[j]))
                                dist[i]=max(dist[i],dist[j]-abs(W[i].y-W[j].y+W[i].h));
                        }
                    }
                    over=max(over,dist[i]-(W[i].y));
                }
                if(over>0) notmov(cnt,s,dy-over,dy);
                for(ll i=pos;i<W.size();i++)
                {
                    W[i].y-=max(0LL,dist[i]-over);
                }
            }
        }

    }
    sort(W.begin(),W.end(),[](dat a,dat b){ return a.time<b.time; });
    cout<<W.size()<<" window(s):\n";
    for(auto [x,y,w,h,t]:W) cout<<x<<' '<<y<<' '<<w<<' '<<h<<'\n';

    return 0;
}



詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3560kb

input:

320 200
OPEN 50 50 10 10
OPEN 70 55 10 10
OPEN 90 50 10 10
RESIZE 55 55 40 40
RESIZE 55 55 15 15
MOVE 55 55 40 0
CLOSE 55 55
CLOSE 110 60
MOVE 95 55 0 -100

output:

Command 4: RESIZE - window does not fit
Command 7: CLOSE - no window at given position
Command 9: MOVE - moved 50 instead of 100
2 window(s):
90 0 15 15
115 50 10 10

result:

ok 6 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

10 10
OPEN 0 0 8 8
MOVE 0 0 5 0

output:

Command 2: MOVE - moved 2 instead of 5
1 window(s):
2 0 8 8

result:

ok 3 lines

Test #3:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

10 10
OPEN 2 2 8 8
MOVE 3 3 -5 0

output:

Command 2: MOVE - moved 2 instead of 5
1 window(s):
0 2 8 8

result:

ok 3 lines

Test #4:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

10 10
OPEN 2 2 8 8
MOVE 3 3 0 -5

output:

Command 2: MOVE - moved 2 instead of 5
1 window(s):
2 0 8 8

result:

ok 3 lines

Test #5:

score: 0
Accepted
time: 0ms
memory: 3492kb

input:

10 10
OPEN 0 0 8 8
MOVE 0 0 0 5

output:

Command 2: MOVE - moved 2 instead of 5
1 window(s):
0 2 8 8

result:

ok 3 lines

Test #6:

score: 0
Accepted
time: 1ms
memory: 3788kb

input:

6000 6000
OPEN 5000 5000 5 5
OPEN 5000 4990 5 5
OPEN 5000 4980 5 5
OPEN 5000 4970 5 5
OPEN 5000 4960 5 5
OPEN 5000 4950 5 5
OPEN 5000 4940 5 5
OPEN 5000 4930 5 5
OPEN 5000 4920 5 5
OPEN 5000 4910 5 5
OPEN 5000 4900 5 5
OPEN 5000 4890 5 5
OPEN 5000 4880 5 5
OPEN 5000 4870 5 5
OPEN 5000 4860 5 5
OPEN ...

output:

200 window(s):
5000 1000 5 5
5000 995 5 5
5000 990 5 5
5000 985 5 5
5000 980 5 5
5000 975 5 5
5000 970 5 5
5000 965 5 5
5000 960 5 5
5000 955 5 5
5000 950 5 5
5000 945 5 5
5000 940 5 5
5000 935 5 5
5000 930 5 5
5000 925 5 5
5000 920 5 5
5000 915 5 5
5000 910 5 5
5000 905 5 5
5000 900 5 5
5000 895 5 ...

result:

ok 201 lines

Test #7:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

1000 1000
OPEN 0 0 10 10
OPEN 10 0 10 10
OPEN 20 0 10 10
OPEN 0 10 10 10
OPEN 10 10 10 10
OPEN 20 10 10 10
OPEN 0 20 10 10
OPEN 10 20 10 10
OPEN 20 20 10 10
CLOSE 19 19
CLOSE 20 20
CLOSE 0 10

output:

6 window(s):
0 0 10 10
10 0 10 10
20 0 10 10
20 10 10 10
0 20 10 10
10 20 10 10

result:

ok 7 lines

Test #8:

score: 0
Accepted
time: 0ms
memory: 3496kb

input:

1000 1000
OPEN 500 500 10 10
CLOSE 499 499
CLOSE 499 500
CLOSE 500 499
CLOSE 510 509
CLOSE 509 510
CLOSE 510 510
CLOSE 499 510
CLOSE 500 510
CLOSE 499 509
CLOSE 510 499
CLOSE 510 500
CLOSE 509 499

output:

Command 2: CLOSE - no window at given position
Command 3: CLOSE - no window at given position
Command 4: CLOSE - no window at given position
Command 5: CLOSE - no window at given position
Command 6: CLOSE - no window at given position
Command 7: CLOSE - no window at given position
Command 8: CLOSE -...

result:

ok 14 lines

Test #9:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

320 200

output:

0 window(s):

result:

ok single line: '0 window(s):'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

1048576 1048576
OPEN 0 0 100 1048576
OPEN 1000 0 100 524288
OPEN 1000 524288 100 524288
OPEN 2000 0 100 262144
OPEN 2000 262144 100 262144
OPEN 2000 524288 100 262144
OPEN 2000 786432 100 262144
OPEN 3000 0 100 131072
OPEN 3000 131072 100 131072
OPEN 3000 262144 100 131072
OPEN 3000 393216 100 13107...

output:

Command 128: MOVE - moved 1047876 instead of 1048576
127 window(s):
1047876 0 100 1048576
1047976 0 100 524288
1047976 524288 100 524288
1048076 0 100 262144
1048076 262144 100 262144
1048076 524288 100 262144
1048076 786432 100 262144
1048176 0 100 131072
1048176 131072 100 131072
1048176 262144 10...

result:

ok 129 lines

Test #11:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

1000 1000
OPEN 0 0 1 1
MOVE 0 0 100000 0
MOVE 999 0 0 100000
MOVE 999 999 -100000 0
MOVE 0 999 0 -100000

output:

Command 2: MOVE - moved 999 instead of 100000
Command 3: MOVE - moved 999 instead of 100000
Command 4: MOVE - moved 999 instead of 100000
Command 5: MOVE - moved 999 instead of 100000
1 window(s):
0 0 1 1

result:

ok 6 lines

Test #12:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

1000000000 1000000000
OPEN 843863694 500000001 20 20
OPEN 766187149 500000004 20 20
OPEN 13035129 500000000 20 20
OPEN 798317341 499999996 20 20
OPEN 483704743 500000004 20 20
OPEN 922731855 500000003 20 20
OPEN 931133659 500000001 20 20
OPEN 160148701 499999995 20 20
OPEN 343043291 499999995 20 20
...

output:

Command 101: MOVE - moved 998944099 instead of 1000000000
100 window(s):
999999640 500000001 20 20
999999560 500000004 20 20
999998100 500000000 20 20
999999580 499999996 20 20
999999060 500000004 20 20
999999840 500000003 20 20
999999860 500000001 20 20
999998500 499999995 20 20
999998860 499999995...

result:

ok 102 lines

Test #13:

score: 0
Accepted
time: 0ms
memory: 3848kb

input:

1000000000 1000000000
OPEN 8095 50000030 1000 1000
OPEN 56873 355000042 1000 1000
OPEN 14421 90000036 1000 1000
OPEN 16813 105000063 1000 1000
OPEN 1625 10000002 1000 1000
OPEN 19287 120000007 1000 1000
OPEN 64021 400000022 1000 1000
OPEN 79236 495000076 1000 1000
OPEN 73600 460000092 1000 1000
OPEN...

output:

Command 101: MOVE - moved 999899990 instead of 1000000000
100 window(s):
8095 899971001 1000 1000
56873 999971000 1000 1000
14421 899979001 1000 1000
16813 899982001 1000 1000
1625 899963001 1000 1000
19287 899985001 1000 1000
64021 999980000 1000 1000
29236 899999001 1000 1000
73600 999992000 1000 ...

result:

ok 102 lines

Test #14:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

1000 1000
OPEN 0 0 10 10
OPEN 0 999 10 10
OPEN 0 991 10 10
OPEN 0 990 10 10
OPEN 999 0 10 10
OPEN 991 0 10 10
OPEN 990 0 10 10
OPEN 999 999 10 10
OPEN 991 991 10 10
OPEN 990 990 10 10
OPEN 990 500 20 20
OPEN 500 990 20 20
OPEN 10 10 980 980

output:

Command 2: OPEN - window does not fit
Command 3: OPEN - window does not fit
Command 5: OPEN - window does not fit
Command 6: OPEN - window does not fit
Command 8: OPEN - window does not fit
Command 9: OPEN - window does not fit
Command 11: OPEN - window does not fit
Command 12: OPEN - window does no...

result:

ok 14 lines

Test #15:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

1000 500
OPEN 0 0 500 1000
OPEN 0 0 1000 500
OPEN 10 10 10 10

output:

Command 1: OPEN - window does not fit
Command 3: OPEN - window does not fit
1 window(s):
0 0 1000 500

result:

ok 4 lines

Test #16:

score: 0
Accepted
time: 0ms
memory: 3496kb

input:

57 15
OPEN 28 2 26 3
OPEN 31 6 9 3
OPEN 24 10 7 3
OPEN 41 9 9 5
OPEN 6 2 12 11
MOVE 6 2 100 0

output:

Command 6: MOVE - moved 13 instead of 100
5 window(s):
31 2 26 3
31 6 9 3
31 10 7 3
41 9 9 5
19 2 12 11

result:

ok 7 lines

Test #17:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

1000 1000
OPEN 0 0 10 10
OPEN 10 10 10 10
RESIZE 5 5 11 11
RESIZE 5 5 20 10
RESIZE 5 5 10 20
OPEN 10 0 10 10
RESIZE 5 5 10 30
OPEN 30 30 20 20
RESIZE 10 10 25 25
RESIZE 10 10 20 20
RESIZE 10 10 99 20
RESIZE 10 10 20 99

output:

Command 3: RESIZE - window does not fit
Command 9: RESIZE - window does not fit
4 window(s):
0 0 10 30
10 10 20 99
10 0 10 10
30 30 20 20

result:

ok 7 lines

Test #18:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

1000 1000
OPEN 1 1 9 9
RESIZE 10 10 4 5
RESIZE 9 10 4 5
RESIZE 10 9 4 5
RESIZE 0 0 4 5
RESIZE 9 9 10000 10000
RESIZE 9 9 1 1
RESIZE 9 9 10 10
RESIZE 1 1 999 999
MOVE 999 999 -100 0
MOVE 999 999 0 -100
MOVE 998 999 0 -100
RESIZE 0 0 1000 1000
RESIZE 0 0 1000 1000

output:

Command 2: RESIZE - no window at given position
Command 3: RESIZE - no window at given position
Command 4: RESIZE - no window at given position
Command 5: RESIZE - no window at given position
Command 6: RESIZE - window does not fit
Command 8: RESIZE - no window at given position
Command 10: MOVE - m...

result:

ok 11 lines

Test #19:

score: 0
Accepted
time: 0ms
memory: 3492kb

input:

1000 1000
OPEN 35 73 10 10
RESIZE 40 80 2 3

output:

1 window(s):
35 73 2 3

result:

ok 2 lines

Test #20:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

1000000000 1000000000
OPEN 381124069 717531090 148580 449700
OPEN 108986324 452510833 52683 565268
OPEN 284819270 489545047 773319 285498
OPEN 935851845 556303966 325424 370385
OPEN 640435993 698077893 322101 82692
OPEN 589838034 532505723 365403 170336
OPEN 293117250 41354928 233320 684643
OPEN 873...

output:

Command 102: MOVE - moved 998322302 instead of 1000000000
101 window(s):
381124069 998322303 148580 449700
108986324 998322303 52683 565268
284819270 998322303 773319 285498
935851845 998322303 325424 370385
640435993 998322303 322101 82692
589838034 998322303 365403 170336
293117250 998322303 23332...

result:

ok 103 lines

Test #21:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

50 75
OPEN 20 10 20 5
OPEN 10 25 12 10
OPEN 30 20 10 25
OPEN 20 55 15 10
MOVE 20 10 0 50

output:

Command 5: MOVE - moved 25 instead of 50
4 window(s):
20 35 20 5
10 40 12 10
30 40 10 25
20 65 15 10

result:

ok 6 lines

Test #22:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

1024 1024
OPEN 258 112 512 4
OPEN 130 104 256 4
OPEN 642 104 256 4
OPEN 66 96 128 4
OPEN 322 96 128 4
OPEN 578 96 128 4
OPEN 834 96 128 4
OPEN 34 88 64 4
OPEN 162 88 64 4
OPEN 290 88 64 4
OPEN 418 88 64 4
OPEN 546 88 64 4
OPEN 674 88 64 4
OPEN 802 88 64 4
OPEN 930 88 64 4
OPEN 18 80 32 4
OPEN 82 80 ...

output:

Command 256: MOVE - moved 84 instead of 1000
255 window(s):
258 28 512 4
130 24 256 4
642 24 256 4
66 20 128 4
322 20 128 4
578 20 128 4
834 20 128 4
34 16 64 4
162 16 64 4
290 16 64 4
418 16 64 4
546 16 64 4
674 16 64 4
802 16 64 4
930 16 64 4
18 12 32 4
82 12 32 4
146 12 32 4
210 12 32 4
274 12 32...

result:

ok 257 lines

Test #23:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

999893418 783298482
OPEN 924766677 743041465 2974461 218151
OPEN 591964127 331920701 1766772 340221
OPEN 191976694 348233805 736719 1188089
OPEN 24764327 67186711 2366442 1099877
OPEN 512579286 575104856 1196527 150275
OPEN 783018891 461459529 2192809 1621405
OPEN 970631764 284174829 2532353 962632
...

output:

256 window(s):
924766677 743041465 2974461 218151
591964127 331920701 1766772 340221
191976694 348233805 736719 1188089
24764327 67186711 2366442 1099877
512579286 575104856 1196527 150275
783018891 461459529 2192809 1621405
970631764 284174829 2532353 962632
571985811 517393798 1047859 223857
47401...

result:

ok 257 lines

Test #24:

score: 0
Accepted
time: 0ms
memory: 3500kb

input:

999893418 783298482
CLOSE 293424659 282708926
CLOSE 161680107 226982613
CLOSE 132845898 500823419
CLOSE 20524984 190102284
CLOSE 807862546 667346938
CLOSE 339642117 575481581
CLOSE 809881907 509265520
CLOSE 621024935 590461927
CLOSE 319542856 259271671
CLOSE 256312889 180878739
CLOSE 513246561 42243...

output:

Command 1: CLOSE - no window at given position
Command 2: CLOSE - no window at given position
Command 3: CLOSE - no window at given position
Command 4: CLOSE - no window at given position
Command 5: CLOSE - no window at given position
Command 6: CLOSE - no window at given position
Command 7: CLOSE -...

result:

ok 257 lines

Test #25:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

999893418 783298482
RESIZE 462394324 162006560 1365073 2586212
RESIZE 887269382 283523794 1135729 474985
RESIZE 882138525 725365748 153796 1168456
RESIZE 399952346 187311323 2215674 2159171
RESIZE 368130932 768885579 2029397 632131
RESIZE 684080488 104416496 1376034 1512240
RESIZE 184542352 83561003...

output:

Command 1: RESIZE - no window at given position
Command 2: RESIZE - no window at given position
Command 3: RESIZE - no window at given position
Command 4: RESIZE - no window at given position
Command 5: RESIZE - no window at given position
Command 6: RESIZE - no window at given position
Command 7: R...

result:

ok 257 lines

Test #26:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

999893418 783298482
MOVE 256369210 755765088 452342770 0
MOVE 519941351 318189721 556562130 0
MOVE 834434438 50314769 0 746266310
MOVE 912448693 540617848 417186154 0
MOVE 974184964 67113924 715952459 0
MOVE 9101426 37972237 0 78958534
MOVE 868944101 482088183 0 242691446
MOVE 161327541 741240188 96...

output:

Command 1: MOVE - no window at given position
Command 2: MOVE - no window at given position
Command 3: MOVE - no window at given position
Command 4: MOVE - no window at given position
Command 5: MOVE - no window at given position
Command 6: MOVE - no window at given position
Command 7: MOVE - no win...

result:

ok 257 lines

Test #27:

score: -100
Wrong Answer
time: 0ms
memory: 3800kb

input:

999893418 783298482
OPEN 868307650 123976895 95021050 232215237
OPEN 918720409 429876285 302665445 67744121
OPEN 378750213 578878113 42023803 226301833
RESIZE 262466633 304322661 25671833 377999643
MOVE 886253936 172522212 0 401907404
CLOSE 443972650 502330205
MOVE 151297544 527696822 0 401907404
RE...

output:

Command 2: OPEN - window does not fit
Command 3: OPEN - window does not fit
Command 4: RESIZE - no window at given position
Command 6: CLOSE - no window at given position
Command 7: MOVE - no window at given position
Command 8: RESIZE - no window at given position
Command 9: CLOSE - no window at giv...

result:

wrong answer 183rd lines differ - expected: 'Command 202: OPEN - window does not fit', found: 'Command 203: OPEN - window does not fit'