D - Time to go back Gym - 100952D http://codeforces.com/gym/100952/problem/D D. Time to go back time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have been out of Syria for a long time, a…
gym 100952 A #include <iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> #include<map> #include<queue> #include<stack> #include<vector> #include<set> using namespac…
http://codeforces.com/gym/100952/problem/H H. Special Palindrome time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output A sequence of positive and non-zero integers called palindromic if it can be…
http://codeforces.com/gym/100952/problem/G G. The jar of divisors time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output Alice and Bob play the following game. They choose a number N to play with.…
http://codeforces.com/gym/100952/problem/F F. Contestants Ranking time limit per test 1 second memory limit per test 24 megabytes input standard input output standard output Ahmad is one of the best students in HIAST, and also a very good problems So…
http://codeforces.com/gym/100952/problem/D D. Time to go back time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have been out of Syria for a long time, and you recently decided to come ba…
http://codeforces.com/gym/100952/problem/C C. Palindrome Again !! time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output Given string with N characters, your task is to transform it to a palindrome…
A. Who is the winner? time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output A big marathon is held on Al-Maza Road, Damascus. Runners came from all over the world to run all the way along the road…
B. New Job time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output This is the first day for you at your new job and your boss asks you to copy some files from one computer to other computers in an…
J. Polygons Intersection time limit per test:2 seconds memory limit per test:64 megabytes input:standard input output:standard output We will not waste your time, it is a straightforward problem. Given multiple polygons, calculate the area of their i…
I. Mancala time limit per test:3 seconds memory limit per test:256 megabytes input:standard input output:standard output Mancala is a traditional board game played in Africa, Middle East and Asia. It is played by two players. This game board consists…
H. Special Palindrome time limit per test:1 second memory limit per test:64 megabytes input:standard input output:standard output A sequence of positive and non-zero integers called palindromic if it can be read the same forward and backward, for exa…
G. The jar of divisors time limit per test:2 seconds memory limit per test:64 megabytes input:standard input output:standard output Alice and Bob play the following game. They choose a number N to play with. The rules are as follows: - They write eac…
F. Contestants Ranking time limit per test:1 second memory limit per test:24 megabytes input:standard input output:standard output Ahmad is one of the best students in HIAST, and also a very good problems Solver. In the time you will spend reading th…
E. Arrange Teams time limit per test:2 seconds memory limit per test:64 megabytes input:standard input output:standard output Syrian Collegiate Programming Contest (SCPC) is the qualified round for the Arab Collegiate Programming Contest. Each year S…
D. Time to go back time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output You have been out of Syria for a long time, and you recently decided to come back. You remember that you have M friends th…
C. Palindrome Again !! time limit per test:1 second memory limit per test:64 megabytes input:standard input output:standard output Given string with N characters, your task is to transform it to a palindrome string. It's not as easy as you may think…
B. New Job time limit per test:1 second memory limit per test:64 megabytes input:standard input output:standard output This is the first day for you at your new job and your boss asks you to copy some files from one computer to other computers in an…
A. Who is the winner? time limit per test:1 second memory limit per test:64 megabytes input:standard input output:standard output A big marathon is held on Al-Maza Road, Damascus. Runners came from all over the world to run all the way along the road…
题目链接:http://codeforces.com/gym/100952/problem/D 题目大意:n个礼物,m个人,要给m个人中的k个人买大于等于d的礼物,其他人随意,问你选择礼物的方案数(不是分配礼物的方案数). 具体思路:一开始我的思路,先输出大于等于k的礼物的个数ans,然后再直接计算C(ans,k)*C(n-ans,m-k)就可以了.但是这样会出现重复计算的情况.比如说,4,5,6,7都满足情况,如果是按照我的思路的话,(4,5,6)和(4,6,5)是不同的,但是我们求的是选择礼…
 Gym 101047M Removing coins in Kem Kadrãn Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Practice Description standard input/output Andréh and his friend Andréas are board-game aficionados. They know many of their friend…
 Gym 101047K Training with Phuket's larvae Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Practice Description standard input/output Thai cuisine is known for combining seasonings so that every dish has flavors that are…
Gym 101047E Escape from Ayutthaya Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u  Practice  Description standard input/output Ayutthaya was one of the first kingdoms in Thailand, spanning since its foundation in 1350 to…
 Gym 101047B  Renzo and the palindromic decoration Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Practice Description standard input/output At the ruins of Wat Phra Si Sanphet (วดพระศรสรรเพชญ), one can find famous inscr…
题目链接 http://codeforces.com/gym/101102/problem/J Description standard input/output You are given an array A of integers of size N, and Q queries. For each query, you will be given a set of distinct integers S and two integers L and R that represent a…
题目链接 http://codeforces.com/gym/100917/problem/J Description standard input/outputStatements The jury of Berland regional olympiad in informatics does not trust to contest management systems, so the Berland regional programming contest is judged by th…
题目链接 http://codeforces.com/gym/100917/problem/D problem description Famous Berland coder and IT manager Linus Gates announced his next proprietary open-source system "Winux 10.04 LTS" In this system command "dir -C" prints list of all…
题目链接 http://codeforces.com/gym/101102/problem/D problem  description Given an R×C grid with each cell containing an integer, find the number of subrectangles in this grid that contain only one distinct integer; this means every cell in a subrectangle…
题目链接 http://codeforces.com/gym/101102/problem/C problem description Judge Bahosain was bored at ACM AmrahCPC 2016 as the winner of the contest had the first rank from the second hour until the end of the contest. Bahosain is studying the results of t…
/* 在控制台输出所有的“水仙花数” 水仙花:100-999 在以上数字范围内:这个数=个位*个位*个位+十位*十位*十位+百位*百位*百位 例如:xyz=x^3 +y^3 +z^3 怎么把三位数字拆成每位整数 思路:百位: int x= i / 100 十位: int y = i / 10 % 10 个位: int z = i % 10 */ class LoopTest3 { public static void main(String[] args) { for (int i=100; i…