lightoj1266

maksyuki 发表于 oj 分类,标签:
0
lightoj1266

1266 - Points in Rectangle

InputAs the name says, this problem is about finding the number of points in a rectangle whose sides are parallel to axis. All the points and rectangles consist of 2D Cartesian co-ordinates. A point that lies in the bound >>继续阅读

lightoj1259

maksyuki 发表于 oj 分类,标签:
0
lightoj1259

1259 - Goldbach`s Conjecture

Every even integer, greater than 2, can be expressed as the sum of two primes [1].Goldbach's conjecture is one of the oldest unsolved problems in number theory and in all of mathematics. It states:

Now your task is to >>继续阅读

lightoj1255

maksyuki 发表于 oj 分类,标签:
0
lightoj1255

1255 - Substring Frequency

InputA string is a finite sequence of symbols that are chosen from an alphabet. In this problem you are given two non-empty strings A and B, both contain lower case English alphabets. You have to find the number of times  >>继续阅读

lightoj1215

maksyuki 发表于 oj 分类,标签:
0
lightoj1215

1215 - Finding LCM

You will be given a, b and L. You have to find c such that LCM (a, b, c) = L. If there are several solutions, print the one where c is as small as possible. If there is no solution, report so.LCM is an abbreviation used for Least >>继续阅读

lightoj1213

maksyuki 发表于 oj 分类,标签:
0
lightoj1213

1213 - Fantasy of a Summation

#include <stdio.h>If you think codes, eat codes then sometimes you may get stressed. In your dreams you may see huge codes, as I have seen once. Here is the code I saw in my dream.

int cases, caseno;

int n, K >>继续阅读

lightoj1212

maksyuki 发表于 oj 分类,标签:
0
lightoj1212

1212 - Double Ended Queue

pushLeft(): inserts an item to the left end of the queue with the exception that the queue is not full.A queue is a data structure based on the principle of 'First In First Out' (FIFO). There are two ends; one end can be u >>继续阅读

lightoj1202

maksyuki 发表于 oj 分类,标签:
0
lightoj1202

1202 - Bishops

Now you are given the position of the two bishops. You have to find the minimum chess moves to take one to another. With a chess move, a bishop can be moved to a long distance (along the diagonal lines) with just one move.There is an >>继续阅读

lightoj1198

maksyuki 发表于 oj 分类,标签:
0
lightoj1198

1198 - Karate Competition

Your secret agents have determined the skill of every member of the opposing team, and of course you know the skill of every member of your own team. You can use this information to decide which opposing player will play a >>继续阅读

lightoj1197

maksyuki 发表于 oj 分类,标签:
0
lightoj1197

1197 - Help Hanzo

Before reaching Amakusa's castle, Hanzo has to pass some territories. The territories are numbered as a, a+1, a+2, a+3 ... b. But not all the territories are safe for Hanzo because there can be other fighters waiting for him. Actu >>继续阅读

lightoj1183

maksyuki 发表于 oj 分类,标签:
0
lightoj1183

1183 - Computing Fast Average

1 i j v - change the value of the elements from ith index to jth index to v.Given an array of integers (0 indexed), you have to perform two types of queries in the array.

2 i j - find the average value of the inte >>继续阅读

lightoj1174

maksyuki 发表于 oj 分类,标签:
0
lightoj1174

1174 - Commandos

InputA group of commandos were assigned a critical task. They are to destroy an enemy head quarter. The enemy head quarter consists of several buildings and the buildings are connected by roads. The commandos must visit each buildi >>继续阅读

lightoj1164

maksyuki 发表于 oj 分类,标签:
0
lightoj1164

1164 - Horrible Queries

0 x y v - you have to add v to all numbers in the range of x to y (inclusive), where x and y are two indexes of the array.World is getting more evil and it's getting tougher to get into the Evil League of Evil. Since the leg >>继续阅读

lightoj1140

maksyuki 发表于 oj 分类,标签:
0
lightoj1140

1140 - How Many Zeroes?

InputJimmy writes down the decimal representations of all natural numbers between and including m and n, (m ≤ n). How many zeroes will he write down?

Input starts with an integer T (≤ 11000), denoting the number of test ca >>继续阅读

lightoj1131

maksyuki 发表于 oj 分类,标签:
0
lightoj1131

1131 - Just Two Functions

Find fn % M and gn % M. (% stands for the modulo operation.)Let fn = a1 * fn-1 + b1 * fn-2 + c1 * gn-3 gn = a2 * gn-1 + b2 * gn-2 + c2 * fn-3

Input

Input starts with an integer T (≤ 50), denoting the number of test cas >>继续阅读

lightoj1129

maksyuki 发表于 oj 分类,标签:
0
lightoj1129

1129 - Consistency Checker

123SETI is receiving some weird signals for the past few days. After converting them to our number system they found out that some numbers are repeating. Due to travelling millions of miles signal gets distorted. Now they >>继续阅读

lightoj1127

maksyuki 发表于 oj 分类,标签:
0
lightoj1127

1127 - Funny Knapsack

InputGiven n integers and a knapsack of weight W, you have to count the number of combinations for which you can add the items in the knapsack without overflowing the weight.

Input starts with an integer T (≤ 100), denoting >>继续阅读