aboutsummaryrefslogtreecommitdiff
path: root/2022/04/a.rs
diff options
context:
space:
mode:
Diffstat (limited to '2022/04/a.rs')
-rw-r--r--2022/04/a.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/2022/04/a.rs b/2022/04/a.rs
new file mode 100644
index 0000000..d69821a
--- /dev/null
+++ b/2022/04/a.rs
@@ -0,0 +1,7 @@
1mod common;
2use common::*;
3
4fn main() {
5 let contained = |a: (i64, i64), b: (i64, i64)| a.0 >= b.0 && a.1 <= b.1;
6 println!("{}", count(|a, b| contained(a, b) || contained(b, a)));
7}

Generated with cgit - Back to sebastiano.tronto.net