#include<iostream> #include<queue> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; ][]; int main(){ int P,T,G1,G2,G3,GJ; while(cin>>P>>T>>G1>>G2>>…
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:18410 解决:4753 题目描述: Grading hundreds of thousands of Graduate Entrance Exams is a hard work. It is even harder to design a process to make the results as fair as possible. One way is to assign each exam problem to 3 indep…
钱币兑换问题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4565 Accepted Submission(s): 2576 Problem Description 在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法.请你编程序计算出共有多少种兑法. Input 每行只有一个正整数N,N小于32768. …
[九度OJ]题目1445:How Many Tables 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1445 题目描述: Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to…
[九度OJ]题目1109:连通图 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1109 题目描述: 给定一个无向图和其中的所有边,判断这个图是否所有顶点都是连通的. 输入: 每组数据的第一行是两个整数 n 和 m(0<=n<=1000). n 表示图的顶点数目,m 表示图中边的数目. 如果 n 为 0 表示输入结束. 随后有 m 行数据,每行有两个值 x 和 y(0<x, y <=n), 表示顶点 x 和…
题目1502:最大值最小化(二分答案) 九度OJ Java import java.util.Scanner; public class Main { public static int max(int x ,int y){ return x > y ? x : y; } public static int solve(int tot , int m , int n ,int a[]){ int low = 1 , high = tot; while(low <= high){ int mid…