上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 97 下一页
摘要: Problem Description As we all know, Brexit negotiations are on their way—but we still do not know whether they will actually fi... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(50) 评论(0) 推荐(0)
摘要: 题目 小b有两个长度都为n的序列A,B。 现在她需要选择一些i,然后交换A[i]和B[i],使得A和B都变成严格递增的序列。 你能帮小b求出最少交换次数吗? 输入保证有解。 输入 第一行输入一个正整数n,表示两个数组的长度; 第二行输入n个数,... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(94) 评论(0) 推荐(0)
摘要: 题目 给定一个01串S,求出它的一个尽可能长的子串S[i..j],满足存在一个位置i#include#include#include#include#include#include#include#include#include#include#incl... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(19) 评论(0) 推荐(0)
摘要: Problem Description In the Test of English as a Foreign Language (TOEFL), the listening part is very important but also very ha... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(115) 评论(0) 推荐(0)
摘要: Problem Description DreamGrid has just found an integer sequence a1,a2,...,an in his right pocket. As DreamGrid is bored, he de... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(24) 评论(0) 推荐(0)
摘要: 题目 小b有一个非负整数 N,她想请你找出 ≤N 的最大整数x,满足x各个位数上的数字是不降的。也就是说,设x的十进制表示为 a1,a2,…,am,则对于任意 1≤i#include#include#include#include#include#inc... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(43) 评论(0) 推荐(0)
摘要: Problem Description There are less than 60 years left till the 900-th birthday anniversary of a famous Italian mathematician Le... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(48) 评论(0) 推荐(0)
摘要: 题目 小b有一个仅包含非负整数的数组a,她想知道有多少个三元组(i,j,k),满足i#include#include#include#include#include#include#include#include#include#include#incl... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(90) 评论(0) 推荐(0)
摘要: 题目 小b有n个关闭的灯泡,编号为1...n。 小b会进行n轮操作,第i轮她会将编号为i的倍数的灯泡的开关状态取反,即开变成关,关变成开。 求n轮操作后,有多少灯泡是亮着的。 输入 输入一个数字表示灯泡数n,其中1<n≤10000000 输出 ... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(42) 评论(0) 推荐(0)
摘要: 题目 小b觉得回文数很美。 对于一个正整数x,如果从左到右读和从右到左读是一样的,则称x为回文数。 例如"123",从右到左读是"321",所以它不是回文数;而"121"则是回文数。 现在给定整数n,求距离n最近的回文数。即找到一个回文数x,使得|... 阅读全文
posted @ 2022-09-20 22:55 老程序员111 阅读(43) 评论(0) 推荐(0)
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 97 下一页