摘要: 上海市计算机学会竞赛平台2023年6月月赛丙组题目解题报告 T1-差分求和 题目描述 给定一个整数序列,对其中任意两个数,计算后项减前项的差,输出这些差的差。 例如对于 a 1 , a 2 , a 3 , a 4 a_1,a_2,a_3,a_4 a1​,a2​,a3​,a4​ 来说,输出 ( a 2 阅读全文
posted @ 2023-08-05 15:04 whznfy 阅读(12) 评论(0) 推荐(0)
摘要: D - Peaceful Teams Time Limit: 2 sec / Memory Limit: 1024 MB Score : 400 points Problem Statement There are N N N sports players.Among them, there are 阅读全文
posted @ 2023-07-30 16:26 whznfy 阅读(13) 评论(0) 推荐(0)
摘要: AtCoder Beginner Contest 309 E题 E - Family and Insurance Problem Statement There is a family consisting of person 1 1 1, person 2 2 2, … … … , and per 阅读全文
posted @ 2023-07-19 11:58 whznfy 阅读(4) 评论(0) 推荐(0)
摘要: 2023.7.1ATcoder308(Beginner)E题 E - MEX Problem Statement You are given a length- N N N sequence A = ( A 1 ​ , A 2 , … , A N ) A=(A_1​,A_2,…,A_N) A=(A1 阅读全文
posted @ 2023-07-12 10:56 whznfy 阅读(16) 评论(0) 推荐(0)
摘要: 上海市计算机学会竞赛平台2023年5月月赛 比赛链接 T1 升序排列(二) 升序排列(二) 内存限制: 256 Mb时间限制: 1000 ms 题目描述 给定一个长度为 n 的排列,每次操作,你可以选择其中一个数字,并将它放到开头或结尾,请问最少多少次操作,才能使该排列变为升序? 输入格式 输入第一 阅读全文
posted @ 2023-05-28 11:05 whznfy 阅读(74) 评论(0) 推荐(0)
摘要: T1 神奇的字母序列 题目描述 给定一个由”L","C“,”R“三个字母组成的循环序列:”LCRLCRLCRLC⋯“,这个序列的循环节为“LCR”。 现在给定一个数字n,请求出这个序列的第n位是哪个字母。 输入格式 单个整数:表示 n。 输出格式 单个字符:表示字母序列的第n个字母。 数据范围 对于 阅读全文
posted @ 2023-03-19 14:17 whznfy 阅读(23) 评论(0) 推荐(0)
摘要: T1 卡片游戏 题目描述 小爱拿到了n张卡片,每张卡片的正反面均写有一个数字,其中第ii张卡片的正面的数字为 a i a_i ai​,反面的数字为 b i b_i bi​。 他想把每张卡片选取合适的一面后,放入下列算式中,卡片之间顺序可以交换,但每张卡片只能用一次。 请问,小爱通过以上操作,能得到的 阅读全文
posted @ 2023-03-19 13:46 whznfy 阅读(8) 评论(0) 推荐(0)
摘要: USACO 2023 February Contest, Bronze 比赛链接 1 Hungry Cow Bessie is a hungry cow. Each day, for dinner, if there is a haybale in the barn, she will eat on 阅读全文
posted @ 2023-03-18 21:49 whznfy 阅读(5) 评论(0) 推荐(0)
摘要: 2 Cow-libi Note: The time limit for this problem is 4s, two times the default. Somebody has been grazing in Farmer John’s (1≤G≤105) private gardens! U 阅读全文
posted @ 2023-03-18 21:04 whznfy 阅读(9) 评论(0) 推荐(0)
摘要: 上海市计算机学会2023年2月月赛 T1 格式改写 题目描述 给定一个仅由拉丁字符组成字符序列,需要改写一些字符的大小写,使得序列全部变成大写或全部变成小写,请统计最少修改多少个字符才能完成这项任务。 输入格式 一个字符序列:保证仅由拉丁字符构成 输出格式 单个整数:表示最少修改次数 数据范围 设输 阅读全文
posted @ 2023-02-26 13:15 whznfy 阅读(13) 评论(0) 推荐(0)