Skip to content

Commit

Permalink
Second update as of 25 October 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellDash332 committed Oct 24, 2024
1 parent c8e6906 commit 568172c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kattis Solutions
![Visitors](https://count.getloli.com/get/@RussellDash332)

## Total problems solved: 2634
## Total problems solved: 2635

Note that the tables below are auto-generated using [autokattis](https://github.com/RussellDash332/autokattis).

Expand Down Expand Up @@ -2119,6 +2119,7 @@ For more Python data structure implementations, head over to [pytils](https://gi
|[Secret Message](https://open.kattis.com/problems/secretmessage)| secretmessage |1.7|[![py](images/python.png)]()|
|[Secret Santa](https://open.kattis.com/problems/secretsanta)| secretsanta |3.3|[![py](images/python.png)]()|
|[Secret Santa Cycles](https://open.kattis.com/problems/secretsantacycles)| secretsantacycles |6.6|[![py](images/python.png)](src/Secret%20Santa%20Cycles/secretsantacycles.py)|
|[Secret Sequence](https://open.kattis.com/problems/secretsequence)| secretsequence |5.7|[![py](images/python.png)](src/Secret%20Sequence/secretsequence.py)|
|[Secure Doors](https://open.kattis.com/problems/securedoors)| securedoors |1.6|[![py](images/python.png)]()|
|[Security Badge](https://open.kattis.com/problems/securitybadge)| securitybadge |7.6|[![py](images/python.png)](src/Security%20Badge/securitybadge.py)|
|[Line Segment Distance](https://open.kattis.com/problems/segmentdistance)| segmentdistance |4.2|[![py](images/python.png)]()|
Expand Down
20 changes: 19 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h2>
Kattis Solutions
</h2>
<p id="last-updated">
Last updated: 24 October 2024
Last updated: 25 October 2024
</p>
<p>
Note that the tables below are auto-generated using
Expand Down Expand Up @@ -38352,6 +38352,24 @@ <h2>
</a>
</td>
</tr>
<tr>
<td>
<a href="https://open.kattis.com/problems/secretsequence">
Secret Sequence
</a>
</td>
<td>
secretsequence
</td>
<td>
5.7
</td>
<td>
<a href="https://raw.githubusercontent.com/RussellDash332/kattis/main/src/Secret Sequence/secretsequence.py">
<img alt="py" src="images/python.png"/>
</a>
</td>
</tr>
<tr>
<td>
<a href="https://open.kattis.com/problems/securedoors">
Expand Down
11 changes: 11 additions & 0 deletions src/Secret Sequence/secretsequence.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def q(a,b,c,d):print('?',a,b,c,d);return int(input())
def f(l,r):
if l>=r-1:return q(0,0,l,r)
x=l;y=r-1
while x<y:
k=q(l,m:=(x+y+1)//2,m,r)
if k==0:return 2*f(l,m)
if k>0:x=m
else:y=m-1
return 2*(f(l,x)if l+r>x*2else f(x+1,r))+1
print('!',f(0,int(input())))

0 comments on commit 568172c

Please sign in to comment.