Skip to content

Commit

Permalink
around 260 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
LovorDev committed Sep 28, 2023
1 parent b4ffb1d commit 9f6a784
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions Dont Panic/Program.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
using System;

var r = P();
var r=P();
var n= I(7) + 1;
var e= new int[n + 1];
for (e[n] = I(4); n-- > 1; e[I(0) + 1] = I(1))P();

var (x,n) = (I(4),I(7));
for (;;Console.WriteLine((I(1) - e[I(0) + 1]) * (r[2][0] - 80) <= 0 ? "WAIT" : "BLOCK")) P();

var e = new int[n+1];
e[n] = x;
for (var i = 0; i < n; i++)
{
P();
e[I(0)] = I(1);
}

for(;;)
{
P();
var (f,p, d) = (I(0),I(1), r[2][0]=='R'?1:-1);
Console.WriteLine((p-e[f==-1?n:f])*d<=0&f>=0? "WAIT" : "BLOCK");
}

string[]P() => r = Console.ReadLine().Split(' ');
string[] P() => r = Console.ReadLine().Split(' ');
int I(int i) => int.Parse(r[i]);

0 comments on commit 9f6a784

Please sign in to comment.