A. Mahmoud and Longest Uncommon Subsequence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output While Mahmoud and Ehab were practicing for IOI, they found a problem which name was Longest comm…
1007. Maximum Subsequence Sum (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj} where 1 <= i <= j <= K. The …
C. Mahmoud and a Message time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud wrote a message s of length n. He wants to send it as a birthday present to his friend Moaz who likes strin…
B. Mahmoud and a Triangle time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud has n line segments, the i-th of them has length ai. Ehab challenged him to use exactly 3 line segments to…
D. Longest Subsequence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given array a with n elements and the number m. Consider some subsequence of a and the value of least common…
Subsequence Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 14709   Accepted: 6210 Description A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) ar…
Easy Summation                                                             Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)                                                                                          …
Palindrome subsequence Problem Description In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. For example, the sequence <A, B, D> is a…
D. Mahmoud and a Dictionary time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud wants to write a new dictionary that contains n words and relations between them. There are two types of…
use fgets, and remove the potential '\n' in the string's last postion. (main point) remove redundancy there must be a stack, at first sight, you need a stack of type myNode, but think deeper, matrix multiplication is valid only if A.c=B.r, then the n…