首页 > TAG信息列表 > 百练

2810:完美立方 百练noi Java枚举

题目来源:http://bailian.openjudge.cn/practice/2810 描述: 形如a3= b3 + c3 + d3的等式被称为完美立方等式。例如123= 63 + 83 + 103 。编写一个程序,对任给的正整数N (N≤100),寻找所有的四元组(a, b, c, d),使得a3 = b3 + c3 + d3,其中a,b,c,d 大于 1, 小于等于N,且b<=c<=d。

2808:校门外的树 百练noi

import java.util.Scanner; public class Main { public static int a[]=new int [10001]; public static void main(String[] args){ Scanner sc = new Scanner(System.in); int L,M,start,end; String str=sc.nextLine(); String[

1017:装箱问题 百练noi

import java.util.Scanner; public class Main { public static int u[]={0,5,3,1}; public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n,a,b,c,d,e,f,x,y; while(true){ String str=sc.nextLine(); String []split=s

2746:约瑟夫问题 百练noi

import java.util.Scanner; public class Main { public static int flag[]=new int[305]; public static void init(){ for(int i=0;i<305;i++){ flag[i]=0; } } public static void main(String[] args){ Scanner sc=new Scanner(System.in); i

2701:与7无关的数 百练noi Java

import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int sum=0; for(int i=1;i<=n;i++){ if(i/10!=7){ if(i%10!=7){

百练200题总结(正在更新中)

百练200题总结

百练#1182食物链

描述: 略 #include<iostream> using namespace std; const int MAX = 50010 * 3; int par[MAX],Rank[MAX]; int find(int x){ if(x == par[x]) return x; return par[x] = find(par[x]); } void unite(int x,int y){ int a = find(x); int b = find(y); if(a == b)

百练#1077Eight

描述 八数码问题,目标固定为123456780,输出路径。 输入 You will receive a description of a configuration of the 8 puzzle. The description is just a list of the tiles in their initial positions, with the rows listed from top to bottom, and the tiles listed fr

百练#1835宇航员

描述 问题描述:   宇航员在太空中迷失了方向,在他的起始位置现在建立一个虚拟xyz坐标系,称为绝对坐标系,宇航员正面的方向为x轴正方向,头顶方向为z轴正方向,则宇航员的初始状态如下图所示: 现对六个方向分别标号,x,y,z正方向分别为0,1,2,负方向分别为3,4,5;称它们为绝对方向。宇航员在宇

归并排序

求逆序对数将序列分成两部分,先求左边部分的逆序对,再求右边序列的逆序对,然后左右两边排序,求合并后的逆序对。合并时,由于已排好序,左边的元素大于右边的元素时,左边剩下的所有的元素都大于。百练:求逆序对数   AC代码百练:2299:Ultra-QuickSort   AC代码