上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页
一、Arrays类的定义 Arrays类位于 java.util 包中,主要包含了操纵数组的各种方法 使用时导包:import java.util.Arrays 二、Arrays常用函数(都是静态的) 1.void Arrays.sort() void Array.sort(Object[] arr Read More
posted @ 2019-09-28 14:35 厂长在线养猪 Views(151) Comments(0) Diggs(0) Edit
1 局部变量必须初始化 2 输入一行以空格分开的数字 Scanner input = new Scanner(System.in); String[] numbers = input.nextLine().split(" "); for(int i=0;i<numbers.length;i++){ Read More
posted @ 2019-09-28 14:29 厂长在线养猪 Views(123) Comments(0) Diggs(0) Edit
Put simply, the Justice card represents justice, fairness, truth and the law. You are being called to account for your actions and will be judged acco Read More
posted @ 2019-09-22 09:21 厂长在线养猪 Views(265) Comments(0) Diggs(0) Edit
翰翰和达达饲养了N只小猫,这天,小猫们要去爬山。 经历了千辛万苦,小猫们终于爬上了山顶,但是疲倦的它们再也不想徒步走下山了(呜咕>_<)。 翰翰和达达只好花钱让它们坐索道下山。 索道上的缆车最大承重量为W,而N只小猫的重量分别是C1、C2……CNC1、C2……CN。 当然,每辆缆车上的小猫的重量之和 Read More
posted @ 2019-09-19 19:59 厂长在线养猪 Views(138) Comments(0) Diggs(0) Edit
给定一张N个点M条边的有向无环图,分别统计从每个点出发能够到达的点的数量。 输入格式 第一行两个整数N,M,接下来M行每行两个整数x,y,表示从x到y的一条有向边。 输出格式 输出共N行,表示每个点能够到达的点的数量。 数据范围 1≤N,M≤300001≤N,M≤30000 输入样例: 输出样例: Read More
posted @ 2019-09-19 19:20 厂长在线养猪 Views(176) Comments(0) Diggs(0) Edit
链接:https://ac.nowcoder.com/acm/contest/5/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C Read More
posted @ 2019-09-18 21:53 厂长在线养猪 Views(176) Comments(0) Diggs(0) Edit
一个正整数K,给出K Mod 一些质数的结果,求符合条件的最小的K。例如,K % 2 = 1, K % 3 = 2, K % 5 = 3。符合条件的最小的K = 23。 收起 一个正整数K,给出K Mod 一些质数的结果,求符合条件的最小的K。例如,K % 2 = 1, K % 3 = 2, K % Read More
posted @ 2019-09-15 10:35 厂长在线养猪 Views(139) Comments(0) Diggs(0) Edit
描述 给出正整数n和k,计算j(n, k)=k mod 1 + k mod 2 + k mod 3 + … + k mod n的值 其中k mod i表示k除以i的余数。 例如j(5, 3)=3 mod 1 + 3 mod 2 + 3 mod 3 + 3 mod 4 + 3 mod 5=0+1+0+ Read More
posted @ 2019-09-14 21:38 厂长在线养猪 Views(193) Comments(0) Diggs(0) Edit
You're given a permutation aaa of length nnn (1≤n≤1051 \le n \le 10^51≤n≤105). For each i∈[1,n]i \in [1,n]i∈[1,n], construct a sequence sis_isi​ by th Read More
posted @ 2019-09-13 16:01 厂长在线养猪 Views(171) Comments(0) Diggs(0) Edit
XKC , the captain of the basketball team , is directing a train of nnn team members. He makes all members stand in a row , and numbers them 1⋯n1 \cdot Read More
posted @ 2019-09-13 12:47 厂长在线养猪 Views(204) Comments(0) Diggs(0) Edit
上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页