Loading

上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 74 下一页
摘要: 好,好难 https://ac.nowcoder.com/acm/contest/5477 A. 题目描述 天才程序员菜哭武和张老师有一天到一个城市旅游,旅途中菜哭武觉得无聊就想和张老师玩一个游戏。菜哭武有n个石子,每个石子都标有1到n之间到数,且各不相同,一开始他们会随机从这堆石子选一个石子放置到 阅读全文
posted @ 2020-06-03 19:45 脂环 阅读(238) 评论(0) 推荐(0) 编辑
摘要: In an edge-weighted tree, the xor-length of a path p is defined as the xor sum of the weights of edges on p: ⊕ is the xor operator. We say a path the 阅读全文
posted @ 2020-06-03 14:37 脂环 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 在给定的 N 个整数 A1,A2,…,AN 中选出两个进行异或运算,得到的结果最大是多少? Input 第一行一个整数 N。 第二行 N 个整数 Ai。 Output 一个整数表示答案。 Example 样例输入 5 2 9 5 7 0 样例输出 14 Hint 对于 100%100% 的数据,1≤ 阅读全文
posted @ 2020-06-02 11:51 脂环 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目背景 XS中学化学竞赛组教练是一个酷爱炉石的人。 他会一边搓炉石一边点名以至于有一天他连续点到了某个同学两次,然后正好被路过的校长发现了然后就是一顿欧拉欧拉欧拉(详情请见已结束比赛CON900)。 题目描述 这之后校长任命你为特派探员,每天记录他的点名。校长会提供化学竞赛学生的人数和名单,而你需 阅读全文
posted @ 2020-06-02 09:14 脂环 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 给定N个字符串S1,S2…SNS1,S2…SN,接下来进行M次询问,每次询问给定一个字符串T,求S1S1~SNSN中有多少个字符串是T的前缀。 输入字符串的总长度不超过106106,仅包含小写字母。 输入格式 第一行输入两个整数N,M。 接下来N行每行输入一个字符串SiSi。 接下来M行每行一个字符 阅读全文
posted @ 2020-06-02 08:39 脂环 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Ashish has a tree consisting of nn nodes numbered 11 to nn rooted at node 11 . The ii -th node in the tree has a cost aiai , and binary digit bibi is 阅读全文
posted @ 2020-06-01 23:18 脂环 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Ayush and Ashish play a game on an unrooted tree consisting of nn nodes numbered 11 to nn. Players make the following move in turns: Select any leaf n 阅读全文
posted @ 2020-06-01 20:43 脂环 阅读(303) 评论(0) 推荐(1) 编辑
摘要: Shubham has a binary string ss. A binary string is a string containing only characters "0" and "1". He can perform the following operation on the stri 阅读全文
posted @ 2020-06-01 10:48 脂环 阅读(494) 评论(0) 推荐(0) 编辑
摘要: A. Odd Selection time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Shubham has an array aa 阅读全文
posted @ 2020-06-01 10:44 脂环 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 坑比输入,比赛时没A掉可惜了 题目描述 这里有一棵树,每个点和每条边都存在一个价值。对于树上点对的价值,包括点对的起点和终点以及路径上边权值之和,不包括路径上其他点值。 求这颗树上最大的点对价值为多少。点对至少需要两个点。 输入描述: 输入t,代表有t组样例。每组样例第一行输入n,代表有n个点。接下 阅读全文
posted @ 2020-05-31 21:02 脂环 阅读(166) 评论(0) 推荐(0) 编辑
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 74 下一页