Skip to content

Latest commit

 

History

History
129 lines (79 loc) · 1.84 KB

readme.org

File metadata and controls

129 lines (79 loc) · 1.84 KB

protohackers.com solutions

[WIP] Solutions for https://protohackers.com exercises

TCP server that echoes back

cargo run 0

To test

nc 127.0.0.1 8838

Industrial strength primality tester

cargo run 1

To test

nc 127.0.0.1 8838
cargo run 2

To test it quickly

python src/means_client.py

then type the messages as:

I,1,1|I,2,2|Q,1,2

where messages are delimited by pipe and each message is delimited by comma. The script then sends an encoded message to the running server and prints the result of `Q`.

cargo run 3

Then connect with

nc 127.0.0.1 8838

and again to chat!

Build and run as follows

cargo run 4

Then connect with

nc -u 127.0.0.1 8838

Run the unusual budget chat with

cargo run 3

then run this

cargo run 5

Then connect with

nc -u 127.0.0.1 8839
cargo run 6

to test

python src/speed_daemon/client.py c1 c2 d

Notes

rsync -avz --exclude-from '.gitignore' ./ remoteuser@remoteserver:/path/to/remote/directory