上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 30 下一页
摘要: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in);//构建一个数据,输入对象 byte a=10; shor 阅读全文
posted @ 2022-09-09 15:35 高尔赛凡尔娟 阅读(32) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1160 //链表 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N=2002000,M=2002; const int I 阅读全文
posted @ 2022-09-08 21:02 高尔赛凡尔娟 阅读(35) 评论(0) 推荐(0) 编辑
摘要: https://atcoder.jp/contests/abc237/tasks/abc237_e 题目大意: 给定n个数字,m对边。 如果当前处于上坡状态,则两边的连接数值为:-2*(高的-矮的)【负权边】 如果当前属于下坡状态,则两边的连接数值为:高的-矮的 【正权边】 Sample Input 阅读全文
posted @ 2022-09-08 21:01 高尔赛凡尔娟 阅读(52) 评论(0) 推荐(0) 编辑
摘要: https://atcoder.jp/contests/abc236/tasks/abc236_d 题意:两个两个组队,开心值异或,求最大开心值。 注意这句话: If Person i and Person j pair up, where i is smaller than j。 Sample I 阅读全文
posted @ 2022-09-07 23:50 高尔赛凡尔娟 阅读(54) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1123 题目大意:给定一个n*m的矩阵,问我们从里面怎样取能取到最大的总和? 条件是选了一个数,下次它的八个方向上的数字就不能选了 输入 #1复制 3 4 4 67 75 63 10 29 29 92 14 21 68 71 56 阅读全文
posted @ 2022-09-07 17:24 高尔赛凡尔娟 阅读(49) 评论(0) 推荐(0) 编辑
摘要: https://atcoder.jp/contests/abc235/tasks/abc235_d 题目大意: 给定一个数字x作为倍数,给定一个要从1变成的目标数字n。 有两种操作: 第一种是每次都可以*x; 第二种是在当前>10并且最后一位不为0的情况下,把数字的最后一位提前到第一位来形成一个新的 阅读全文
posted @ 2022-09-06 21:21 高尔赛凡尔娟 阅读(35) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1460 题目大意:给定每一头牛需要的n种营养, 给定m种饲料,每一种饲料含有不同的所需要的营养含量 让我们用最少的数量(每一种饲料只能用一次) 达到牛所需要的营养总数 输入 #1 4 100 200 300 400 3 50 50 阅读全文
posted @ 2022-09-06 16:27 高尔赛凡尔娟 阅读(49) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1036 题目大意:从给定的n个数中选出m个求和,结果是一个素数的情况有多少种? 输入 4 3 3 7 12 19 输出 1 这个题目的代码是根据Acwing中蓝桥杯dfs专题 93.递归实现组合型枚举改动而来 https://ww 阅读全文
posted @ 2022-09-05 20:26 高尔赛凡尔娟 阅读(29) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1832 题目大意:给定一个数字n,求它可以由素数构成的次数? eg:7 7=7; 7=2+5; 7=2+2+3; 所以答案输出3 一定要开longlong啊~ #include<bits/stdc++.h> using names 阅读全文
posted @ 2022-09-05 19:55 高尔赛凡尔娟 阅读(28) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1490/problem/D 从1到n,其中所有的数字恰好出现一次。 坡旅甲最近得到了一个长度为n的排列a[1…n]。坡旅甲喜欢树胜过排列,所以他想把排列a转换成一棵有根二叉树。他将不同整数的数组转换成一棵树,如下所示: 数组的最大元素成 阅读全文
posted @ 2022-09-05 01:03 高尔赛凡尔娟 阅读(23) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 30 下一页