上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 55 下一页
摘要: Problem Statement You are given a positive integer N. Find the number of the pairs of integers u and v(0≦u,v≦N) such that there exist two non-negative 阅读全文
posted @ 2019-03-27 16:51 茄子Min 阅读(594) 评论(0) 推荐(0)
摘要: Problem Statement There are N cities. There are also K roads and L railways, extending between the cities. The i-th road bidirectionally connects the  阅读全文
posted @ 2019-03-26 20:30 茄子Min 阅读(341) 评论(0) 推荐(1)
摘要: Problem Statement You are given an integer N. Find the number of the positive divisors of N!, modulo 10^9+7. Constraints 1≤N≤10^3 Input The input is g 阅读全文
posted @ 2019-03-17 15:35 茄子Min 阅读(795) 评论(0) 推荐(0)
摘要: 历届试题 小朋友排队 时间限制:1.0s 内存限制:256.0MB 问题描述 n 个小朋友站成一排。现在要把他们按身高从低到高的顺序排列,但是每次只能交换位置相邻的两个小朋友。 每个小朋友都有一个不高兴的程度。开始的时候,所有小朋友的不高兴程度都是0。 如果某个小朋友第一次被要求交换,则他的不高兴程 阅读全文
posted @ 2019-03-13 13:06 茄子Min 阅读(307) 评论(0) 推荐(0)
摘要: 问题如下:先给你一个含有N个整数的数组数组中的每一个元素只为1或者0而N的大小为1~100你可以删除一些元素(也可以选择不删除),使剩下的数组中,没有一个元素0在1后面出现。并且要使剩下的元素的数量最多,请输出剩下元素的数量。 思路: 没有一个元素0在1后面出现,。 那么操作后的数组只可能是这个样子 阅读全文
posted @ 2019-03-11 20:49 茄子Min 阅读(330) 评论(0) 推荐(0)
摘要: Palindromic characteristics of string s with length |s| is a sequence of |s|integers, where k-th number is the total number of non-empty substrings of 阅读全文
posted @ 2019-02-27 21:48 茄子Min 阅读(321) 评论(0) 推荐(0)
摘要: /*函数:r进制转换成10进制*/ int rToTen(string n,int r){ //将r进制转为10进制,n是该r进制的字符串表示 int len = n.length(); int ans = 0; int i = 0; while(i<len){ ans*=r; ans+=n[i]- 阅读全文
posted @ 2019-02-22 16:05 茄子Min 阅读(228) 评论(0) 推荐(0)
摘要: Misha and Grisha are funny boys, so they like to use new underground. The underground has n stations connected with n - 1 routes so that each route co 阅读全文
posted @ 2019-02-21 21:24 茄子Min 阅读(340) 评论(0) 推荐(0)
摘要: 题目描述: AS WE ALL KNOW, lfx是咱们组的神仙,但是mxh想考一考lfx一个简单的问题,以此看一下lfx到底是不是神仙。但是lfx要准备补考,于是请你来帮忙回答问题: 给定一个整数N,和N个整数ai(1<=i<=n),mxh有n个询问,即第i个询问(1<=i<=n)是数组a从1~i 阅读全文
posted @ 2019-02-17 23:51 茄子Min 阅读(253) 评论(0) 推荐(0)
摘要: 题目描述: 在lfx高尚又有趣的灵魂的影响下,我想出一个简短而优美的题目。 This is too simple a question. Given an integer N, find the value of this formula C (n, 0)+C (n, 1)+C (n, 2)+... 阅读全文
posted @ 2019-02-17 23:47 茄子Min 阅读(259) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 55 下一页