12 2020 档案
摘要:A. 签到,因为是等概率,且红色数字两两不同,黑色数字两两不同,故只需要看第一张即可。然后就是枚举每张卡片比较上面的两个数字。 #include <iostream> using namespace std; int main() { freopen("data.txt", "r", stdin);
阅读全文
摘要:You are given an array [𝑎1,𝑎2,…,𝑎𝑛][a1,a2,…,an] such that 1≤𝑎𝑖≤1091≤ai≤109. Let 𝑆S be the sum of all elements of the array 𝑎a. Let's call an a
阅读全文
摘要:You are playing a new computer game in which you have to fight monsters. In a dungeon you are trying to clear, you met three monsters; the first of th
阅读全文
摘要:题目描述 现有n个砝码,重量分别为 a_ia**i,在去掉 mm 个砝码后,问最多能称量出多少不同的重量(不包括 00)。 请注意,砝码只能放在其中一边。 输入格式 第 11 行为有两个整数 nn 和 mm,用空格分隔。 第 22 行有 nn 个正整数 a_1, a_2, a_3,\ldots ,
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/9977/B 来源:牛客网 题目描述 牛牛有一个长和高都为为nn的网格三角形,牛牛想从从左下角点走到右上角点,但是牛牛只能向上或者向右沿着网格的边走,牛牛想知道从左下角点走到右上角点的方案数的奇偶性。牛牛现在给你nn,请你
阅读全文
摘要:In computer science, a binary tree is a rooted tree in which each node has at most two children. In this problem, let's denote 𝑛n as the number of no
阅读全文
摘要:Pang believes that one cannot make an omelet without breaking eggs. For a subset 𝐴A of {1,2,…,𝑛}{1,2,…,n}, we calculate the score of 𝐴A as follows:
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/9925/D 来源:牛客网 题目描述 As a world-famous traveler, Prof. Pang's research interest is to travel as many places as po
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/9925/M 来源:牛客网 题目描述 Your git project (you don't need to be familiar with git to solve this problem) has some fil
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/9925/I 来源:牛客网 题目描述 Prof. Du and Prof. Pang plan to build a sky garden near the city of Allin. In the garden, th
阅读全文
摘要:Gildong has an interesting machine that has an array 𝑎a with 𝑛n integers. The machine supports two kinds of operations: Increase all elements of a s
阅读全文
摘要:Note that girls in Arpa’s land are really attractive. Arpa loves overnight parties. In the middle of one of these parties Mehrdad suddenly appeared. H
阅读全文