随笔分类 -  codeforces算法

算法记录
摘要:import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class App { public static void main(String[] args) throws Exception { 阅读全文
posted @ 2026-01-22 15:03 kayaker 阅读(7) 评论(0) 推荐(0)
摘要:import java.util.Scanner; public class App { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = In 阅读全文
posted @ 2025-07-09 15:44 kayaker 阅读(12) 评论(0) 推荐(0)
摘要:public class App { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.nextLine 阅读全文
posted @ 2025-04-09 10:37 kayaker 阅读(16) 评论(0) 推荐(0)
摘要:public class App { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.nextLine 阅读全文
posted @ 2025-04-03 09:44 kayaker 阅读(41) 评论(0) 推荐(0)
摘要:import java.util.Queue; import java.util.Scanner; public class App { public static void main(String[] args) throws Exception { Scanner sc = new Scanne 阅读全文
posted @ 2025-03-26 15:29 kayaker 阅读(24) 评论(0) 推荐(0)
摘要:public class App { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int cases = Integer.parseInt(sc.next 阅读全文
posted @ 2025-03-26 15:25 kayaker 阅读(17) 评论(0) 推荐(0)
摘要:根据题意,简单列了一下演绎的情况,有三个人A B S, S为spectator,一下每行为每场比赛的参赛安排,可以看到每三场比赛,S会重新成为spectator A 2 S A S 2 2 S A 2 A S S A 2 S 2 A A 2 S 。。。 public class App { publ 阅读全文
posted @ 2025-03-24 11:00 kayaker 阅读(18) 评论(0) 推荐(0)
摘要:import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class App { public static void main(String[] 阅读全文
posted @ 2025-03-19 14:12 kayaker 阅读(20) 评论(0) 推荐(0)
摘要:public class App { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int cases = Integer.parseInt(sc.next 阅读全文
posted @ 2025-03-19 11:28 kayaker 阅读(31) 评论(0) 推荐(0)
摘要:codeforces和leetcode网站相比,需要自己写测试数据的输入代码,而且这些代码格式相对比较固定,因此利用vscode的代码片段来复用 个人一般使用java来刷题,修改java.json文件如下即可 { // Place your snippets for java here. Each 阅读全文
posted @ 2025-03-19 09:17 kayaker 阅读(112) 评论(0) 推荐(0)