03 2019 档案
摘要:链接:https://ac.nowcoder.com/acm/contest/551/D来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 524288K,其他语言1048576K64bit IO Format: %lld题目描述CSL 以前不...
阅读全文
摘要:问题描述 X星球的流行宠物是青蛙,一般有两种颜色:白色和黑色。 X星球的居民喜欢把它们放在一排茶杯里,这样可以观察它们跳来跳去。 如下图,有一排杯子,左边的一个是空着的,右边的杯子,每个里边有一只青蛙。 *WWWBBB 其中,W字母表示白色青蛙,B表示黑色青...
阅读全文
摘要:In the Dark forest, there is a Fairy kingdom where all the spirits will go together and Celebrate the harvest every year. But there is...
阅读全文
摘要:A sequence of N positive integers (10 #include#include#include#include#include#include#include#includeconst int maxn=1e5+5;typedef lon...
阅读全文
摘要:Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad d...
阅读全文
摘要:ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many ...
阅读全文
摘要:有N个比赛队(1#include#include#include#include#include#include#include#include#includeconst int maxn=1e5+5;typedef long long ll;using namesp...
阅读全文
摘要:Title hello worldhtml语言是一种超文本标签语言,想 内容,像这样的一个,称为一个元素上面代码的运行结果 ,后面可能会进行
阅读全文
摘要:Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for c...
阅读全文
摘要:可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她...
阅读全文
摘要:题目描述LiYuxiang是个天资聪颖的孩子,他的梦想是成为世界上最伟大的医师。为此,他想拜附近最有威望的医师为师。医师为了判断他的资质,给他出了一个难题。医师把他带到一个到处都是草药的山洞里对他说:“孩子,这个山洞里有一些不同种类的草药,采每一种都需要一些时间,每一...
阅读全文
摘要:The modular modular multiplicative inverse of an integer a modulo m is an integer xsuch that a-1≡x (mod m). This is equivalent to ax≡1...
阅读全文
摘要:递推法#includelong long sum[40];//也可以不用开数组 int main(){ int n; scanf("%d",&n); sum[1]=1; sum[2]=1; for(int t=3;tlong long F(int x){ if(x==...
阅读全文
摘要:Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd.InputThe only...
阅读全文
摘要:The city of Fishtopia can be imagined as a grid of 44 rows and an odd number of columns. It has two main villages; the first is locate...
阅读全文
摘要:A - Second-price Auction Do you know second-price auction? It's very simple but famous. In a second-price auction, each potential buye...
阅读全文
摘要:6.给定三个整数数组A = [A1, A2, ... AN], B = [B1, B2, ... BN], C = [C1, C2, ... CN],请你统计有多少个三元组(i, j, k) 满足:1. 1 #include#include#include#inclu...
阅读全文
摘要:A - A + B Problem II I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Inpu...
阅读全文
摘要:A - Accurately Say "CocaCola"! In a party held by CocaCola company, several students stand in a circle and play a game.One of them is ...
阅读全文
摘要:题目描述有一个n*m的棋盘(1#include#include#include#include#include#include#include#include#include#include#define N 300005 typedef long long ll;u...
阅读全文
摘要:A - Pretty Matrix DreamGrid's birthday is coming. As his best friend, BaoBao is going to prepare a gift for him.As we all know, BaoBao...
阅读全文
摘要:1.输入一个无符号整数x,输出x的二进制表示中1的个数.输入: 76584输出: 7水题:数据应该也不大,long long 也能过代码:#include#include#include#include#include#include#include#includ...
阅读全文
摘要:题目描述Q市发生了一起特大盗窃案。这起盗窃案是由多名盗窃犯联合实施的,你要做的就是尽可能多的抓捕盗窃犯。已知盗窃犯分布于 N N个地点,以及第 i i个地点初始有 ai ai名盗窃犯。特别的是,对于每一个地点 u u,都有一个固定的地点 v v--当前如果某个盗窃犯...
阅读全文
摘要:小明最近在教邻居家的小朋友小学奥数,而最近正好讲述到了三阶幻方这个部分,三阶幻方指的是将1~9不重复的填入一个3*3的矩阵当中,使得每一行、每一列和每一条对角线的和都是相同的。 三阶幻方又被称作九宫格,在小学奥数里有一句非常有名的口诀:“二四为肩...
阅读全文
摘要:C - Arthur and Table Arthur has bought a beautiful big table into his new flat. When he came home, Arthur noticed that the new table i...
阅读全文