Here is the data, the questions are below
In[0]
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
In[0]
np.random.seed(42)
def offset_data(data):
if np.min(data) < 0:
return np.add(data, (np.abs(np.min(data))) + 1.0)
else:
return data
height, wi...
A "simple circular" word is a word whose chords do not intersect. The chords of a word may be seen by laying out the alphabet in a circle, and then connecting the word's consecutive letters.
Examples of Simple Circular Words
ROLE
LAKE
BALMY
Failing Example
A word fails to be simple ...
strSub Swingingapp (Substring Swapping)
Intro/Background
I was looking at a Flybuys card at coles recently and noticed that if I took something like this:
Source, randomly found on the Internet
And swapped some words around, I'd get this:
Sorry about the bad quality edit, I did it on mobi...
CMC: Find two decryption systems that are invented before this CMC. Find a string so that this decrypted in one yields R2D2, and decryption in the other yields Star Wars.
The question and solutions are available here: https://ioinformatics.org/page/ioi-2019/51
There's a folder containing "MakeFile" for tests, I do not know what to do with it. Can someone please help me run the checker against my Java solution?
In [97]: import random
In [98]: x = random.randint(0, 2**64-1)
In [99]: y = random.randint(0, 2**64-1)
In [100]: x, y, x^y
Out[100]: (13737186597515989731, 1134597505236996627, 12761701636154360048)
In [109]: for z in (x, y, x^y): print(bin(z)[2:].zfill(64))
1011111010100100010010100110110101111110001100101001001011100011
0000111110111110111001100110101101101110101100100001001000010011
1011000100011010101011000000011000010000100000001000000011110000
This challenge is about the number of orderings which contain at most \$n\$ classes and at most \$k\$ of the \$k^{\text{th}}\$ class.
One way to represent such an ordering is as a sequence of positive integers with these three restrictions:
A number may only appear after all lower numbers have...