Skip to content

Instantly share code, notes, and snippets.

View icub3d's full-sized avatar

Joshua Marsh icub3d

  • Optum
  • USA
View GitHub Profile
@icub3d
icub3d / artichoke.rs
Created December 21, 2025 20:48
Kattis artichoke
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
let vv = s
.split_whitespace()
.map(|v| v.parse::<f64>().unwrap())
.collect::<Vec<_>>();
@icub3d
icub3d / statistics.rs
Created December 14, 2025 02:26
Kattis statistics
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
for (i, m) in s.lines().enumerate() {
let vv = m
.split_whitespace()
.skip(1)
@icub3d
icub3d / oddgnome.rs
Created December 14, 2025 02:26
Kattis oddgnome
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
for m in s.lines().skip(1) {
let mut vv = m
.split_whitespace()
.skip(1)
@icub3d
icub3d / numberfun.rs
Created December 14, 2025 02:26
Kattis numberfun
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
for m in s.lines().skip(1) {
let parts = m.split_whitespace().collect::<Vec<_>>();
let (a, b, c) = (
parts[0].parse::<usize>().unwrap(),
@icub3d
icub3d / licensetolaunch.rs
Created December 14, 2025 02:26
Kattis licensetolaunch
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
let mut m = s.lines();
m.next().unwrap();
let days = m
.next()
@icub3d
icub3d / fizzbuzz.rs
Created December 14, 2025 02:26
Kattis fizzbuzz
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
let mut vv = s.split_whitespace().map(|v| v.parse::<usize>().unwrap());
let (x, y, n) = (vv.next().unwrap(), vv.next().unwrap(), vv.next().unwrap());
@icub3d
icub3d / earlywinter.rs
Created December 14, 2025 02:26
Kattis earlywinter
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
let mut lines = s.lines();
let (_, d_m) = lines
.next()
.unwrap()
@icub3d
icub3d / cold.rs
Created December 14, 2025 02:26
Kattis cold
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
for m in s.lines().skip(1) {
println!(
"{}",
m.split_whitespace()
@icub3d
icub3d / babybites.rs
Created December 14, 2025 02:26
Kattis babybites
use std::io::{Read, stdin};
fn main() {
let mut s = String::new();
stdin().read_to_string(&mut s).unwrap();
let mut lines = s.lines();
lines.next();
if lines
@icub3d
icub3d / day12.rs
Created December 12, 2025 22:25
Solution for Advent of Code 2025 Day 12
use rayon::prelude::*;
use rustc_hash::FxHashMap;
use std::time::Instant;
const INPUT: &str = include_str!("inputs/day12.txt");
const SHAPE_SIZE: usize = 3;
const SHAPE_COORDS: [(usize, usize); 9] = [
(0, 0),
(0, 1),
(0, 2),