#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef pair<int,int>PII; const double eps=1e-5; const double pi=acos(-1.0); const int INF=0x3f3f3f3f; const int N=1e3+10; int a[N]; int n,k; b…
Time Limit: 2 second(s) Memory Limit: 32 MB You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For example, 5! = 120, 120 contains one zero on the trail. In…
题目:题目太长了! https://vjudge.net/problem/POJ-1064 题意分析:给了你N根长度为小数形式的棍子,再给出了你需要分的棍子的数量K,但要求你这K根棍子的长度必须是一样长的.需要你求解出满足题意的最长可能的棍子长度.根据二分找最大值的应用写即可. 需要注意的是: 1.注意题目给的范围是All cables are at least 1 meter and at most 100 kilometers in length: 2.在写满足条件的函数时,对于int强制转…
Q - Queue HDU - 5493 Problem Description NNN people numbered from 1 to NNN are waiting in a bank for service. They all stand in a queue, but the queue never moves. It is lunch time now, so they decide to go out and have lunch first. When they get bac…
E. Hexagons time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ayrat is looking for the perfect code. He decided to start his search from an infinite field tiled by hexagons. For convenience t…
Toy Storage Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6534 Accepted: 3905 Description Mom and dad have a problem: their child, Reza, never puts his toys away when he is finished playing with them. They gave Reza a rectangular box…
TOYS Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17974 Accepted: 8539 Description Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his toys away w…
1138 - Trailing Zeroes (III) PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N.…
G. Lpl and Energy-saving Lamps 42.07% 1000ms 65536K During tea-drinking, princess, amongst other things, asked why has such a good-natured and cute Dragon imprisoned Lpl in the Castle? Dragon smiled enigmatically and answered that it is a big secre…
题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1090 找到所有数的和,然后再原数组里二分找符合条件的第三个数. #include <bits/stdc++.h> using namespace std; ; const int maxm = maxn * maxn; typedef struct R { int x, y, z; R(){} R(int x, int y, int z) : x(x), y…
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Example 1:Given intervals [1,3],[6,9], insert and merge […
Conquering Keokradong Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Submit Status Practice LightOJ 1048 Description This winter we are going on a trip to Bandorban. The main target is to climb up to the top of Keokradong.…
Polycarp has a lot of work to do. Recently he has learned a new time management rule: "if a task takes five minutes or less, do it immediately". Polycarp likes the new rule, however he is not sure that five minutes is the optimal value. He suppo…