首页 > TAG信息列表 > usaco

NC24416 [USACO 2013 Nov G]No Change

题目链接 题目 题目描述 Farmer John is at the market to purchase supplies for his farm. He has in his pocket K coins (1 <= K <= 16), each with value in the range 1..100,000,000. FJ would like to make a sequence of N purchases (1 <= N <= 100,000), where

NC24158 [USACO 2015 Jan G]Moovie Mooving

题目链接 题目 题目描述 Bessie is out at the movies. Being mischievous as always, she has decided to hide from Farmer John for L (1 <= L <= 100,000,000) minutes, during which time she wants to watch movies continuously. She has N (1 <= N <= 20) movies t

NC24263 USACO 2018 Feb G]Directory Traversal

题目链接 题目 题目描述 奶牛Bessie令人惊讶地精通计算机。她在牛棚的电脑里用一组文件夹储存了她所有珍贵的文件,比如: bessie/ folder1/ file1 folder2/ file2 folder3/ file3 file4 只有一个“顶层”的文件夹,叫做bessie。 Bessie可以浏览任何一个她想要

1018 [USACO 2008 Ope S]Clear And Present Danger floyd 板子

 链接:https://ac.nowcoder.com/acm/contest/26077/1018来源:牛客网 题目描述 Farmer John is on a boat seeking fabled treasure on one of the N (1 <= N <= 100) islands conveniently labeled 1..N in the Cowribbean Sea. The treasure map tells hi

1019 [USACO 2007 Nov S]Cow Hurdles floyd 最小化路径中的最高点。

 链接:https://ac.nowcoder.com/acm/contest/26077/1018来源:牛客网 题目描述 Farmer John is on a boat seeking fabled treasure on one of the N (1 <= N <= 100) islands conveniently labeled 1..N in the Cowribbean Sea. The treasure map tells hi

1016 [USACO 2012 Dec S]Milk Routing 最短路 忽略部分路径 三个参量

 链接:https://ac.nowcoder.com/acm/contest/26077/1016来源:牛客网 题目描述 Farmer John's farm has an outdated network of M pipes (1 <= M <= 500) for pumping milk from the barn to his milk storage tank. He wants to remove and upda

1017 [USACO 2007 Ope B]Bronze Cow Party dij 板子题

链接:https://ac.nowcoder.com/acm/contest/26077/1017来源:牛客网 题目描述 One cow from each of N farms (1 <= N <= 1000) conveniently numbered 1..N is attending the big cow party to be held at farm #X (1 <= X <= N). Each of M (1 <

1015 [USACO 2010 Dec S]Apple Delivery 最短路 建图

 链接:https://ac.nowcoder.com/acm/contest/26077/1015来源:牛客网 题目描述 Bessie has two crisp red apples to deliver to two of her friends in the herd. Of course, she travels the C (1 <= C <= 200,000) cowpaths which are arranged as the u

NC24870 [USACO 2009 Dec G]Video Game Troubles

题目链接 题目 题目描述 Farmer John's cows love their video games! FJ noticed that after playing these games that his cows produced much more milk than usual, surely because contented cows make more milk. The cows disagree, though, on which is the best game co

1001 [USACO 2007 Jan S]Balanced Lineup 线段树-最大最小值

 链接:https://ac.nowcoder.com/acm/contest/26896/1001来源:牛客网 题目描述 For the daily milking, Farmer John's N cows (1 ≤ N ≤ 100,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbe

NC24017 [USACO 2016 Jan S]Angry Cows

题目 原题地址:[USACO 2016 Jan S]Angry Cows 题目编号:NC24017 题目类型:二分答案 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 1.题目大意 给 k 头牛,目标打掉 n 堆稻草, 每头牛的打击范围为 [x-r,x+r](降落点为 x),求最小的 r 2.题目分析 二分即可,注意牛

2022 暑期集训 USACO DP计划

前言 CSP-S 和 NOIP 就在眼前了!不能再摆下去了!LJ 说现在提高组没事儿就靠考 DP(然后跟我说把USACO的 DP 全刷完。。。。) 所以要在 \(30\) 号放假前完成这个目标! 正文 7.24 P2733 [USACO3.3]家的范围 我们设 \(f[i][j]\) 表示表示该点右下角所能扩展的最大矩阵,所以受到 \(f[i][j-1],

1046 [USACO 2016 Ope P]262144 区间DP 不会~~~~~~~~~~~~~

https://blog.csdn.net/qq_45516669/article/details/108209561?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-1-108209561-blog-121525948.pc_relevant_sortByStrongTime&depth_1-

NC24608 [USACO 2011 Ope S]Learning Languages

题目链接 题目 题目描述 Farmer John's N (2 <= N <= 10,000) cows, conveniently numbered 1..N, are fluent in some M (1 <= M <= 30,000) languages, also conveniently numbered from 1..M. Cow i can speak in KiK_iKi (1 <= \(K_i\) <= M) languages, n

好用的网站

OI-Wiki 免费开放且持续更新的编程竞赛知识整合站点。 CodeForces 国际知名竞争性编程网站。 USACO Guide 由 USACO 原班人马打造的系统的教程。 Haidan (私人网站,需要的话可以私信) CESE Problem Set 广泛收录各种类型小题目。

NC24017 [USACO 2016 Jan S]Angry Cows

NC24017 [USACO 2016 Jan S]Angry Cows 题目 题目描述 Bessie the cow has designed what she thinks will be the next big hit video game: "Angry Cows". The premise, which she believes is completely original, is that the player shoots cows with a slingshot i

NC24083 [USACO 2017 Dec P]Greedy Gift Takers

NC24083 [USACO 2017 Dec P]Greedy Gift Takers 题目 题目描述 Farmer John's nemesis, Farmer Nhoj, has N cows (\(1≤N≤10^5\)), conveniently numbered 1…N. They have unexpectedly turned up at Farmer John's farm, so the unfailingly polite Farmer John is att

NC25043 [USACO 2007 Jan S]Protecting the Flowers

NC25043 [USACO 2007 Jan S]Protecting the Flowers 题目 题目描述 Farmer John went to cut some wood and left \(N (2 ≤ N ≤ 100,000)\) cows eating the grass, as usual. When he returned, he found to his horror that the cluster of cows was in his garden eating his

USACO 2022 February contest

Cu 忘存代码了,看个乐就行。 T1 Sleeping in Class 给出 \(n\) 个数 \(a\),任意合并相邻两个数,问使合并到最后全部相等的合并次数最小值。 \(n\le 10^5,\sum a \le 10^6\) 因为合并到最后的数一定是 \(\sum a\) 的约数,所以枚举 \(\sum a\) 很少的约数然后 \(O(n)\) 判断即可。Orz h

USACO 回文质数

题目:回文质数 题目描述 给定a,b(1<a,b<10,000,000,000)请求出所有在这两个数范围内,既是回文又是质数的数字。 题目思路 因为范围过于大,如果遍历范围内的每一个数字,判定是否为质数?是否为回文?复杂度过高。 问题是缩小范围。 首先,位数是偶数的回文数字必是11的倍数(除11本身)(例如 21

USACO 2022 January Bronze 比赛题解

T1 Herdle(牧群) T2 Non-Transitive Dice (非传递骰子)众所周知,每一次打开题目,我们都要注意 数据范围。emmm……$1\le T\le 10$并且,我们要枚举的这个骰子是一个 四面骰子,而每一面上的数字 仅仅是 $1\sim 10$。考虑深搜。每次从 $1\sim 10$ 里选一个数字,如此执行 $4$ 次,时间复杂度为

usaco 2021DEC 银组第3题

[USACO21DEC] Closest Cow Wins S 题目描述 Farmer John 沿着一条高速公路拥有一个很长的农场,可以被看作类似于一维数轴。沿着农场有 KKK 块草地(1≤K≤2⋅1051 \leq K \leq 2\cdot 10^51≤K≤2⋅105);第 iii 块草地位于位置 pip_ipi​ 并具有美味值 tit_iti​(0≤ti≤1090\le t_

[平面图性质] 「USACO 2021.1 Platinum」Paint by Letters

\(\texttt{link}\) 平面图欧拉公式: 对于一个连通平面图,记 \(F\) 为区域数, \(V\) 为点数,\(E\) 为边数,则有 \(F + V - E = 2\) \(\texttt{板子}\)

USACO Friday the Thirteenth

题目过于简单 用一个变量cday去表示当前日子,cday为0代表星期天 /* ID: kdk5501 TASK : friday LANG : C++ */ #include <iostream> #include <fstream> #include <string> using namespace std; struct people { string name; int money; }person[110]; int main()

noip2021训练2(USACO)

Link [USACO10MAR] Great Cow Gathering G 换根 dp 板子 先用树形 dp 求出以 \(1\) 为根的最小不方便值,然后 bfs 向儿子换根 \(f_v=f_u + (siz_u - siz_v \times 2) \times w\) 这个手推一下就好了,大概就是把两边子树中的点经过 \((u,v)\) 这条边的代价算一下。 Code #include <b