standard input/output You must have heard about Agent Mahone! Dr. Ibrahim hired him to catch the cheaters in the Algorithms course. N students cheated and failed this semester and they all want to know who Mahone is in order to take revenge! Agent Ma…
Description standard input/output Announcement Statements There is a set of n segments with the lengths li. Find a segment with an integer length so that it could form a non-degenerate triangle with any two segments from the set, or tell that such…
Description standard input/output Announcement Statements A permutation of n numbers is a sequence of integers from 1 to n where each number is occurred exactly once. If a permutation p1, p2, ..., pn has an index i such that pi = i, this index is c…
You must have heard about Agent Mahone! Dr. Ibrahim hired him to catch the cheaters in the Algorithms course. N students cheated and failed this semester and they all want to know who Mahone is in order to take revenge! Agent Mahone is planning to vi…
C. Felicity is Coming! time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output It's that time of the year, Felicity is around the corner and you can see people celebrating all around the Himalayan…
LeetCode--第180场周赛 1380. 矩阵中的幸运数 class Solution { public: vector<int> luckyNumbers (vector<vector<int>>& matrix) { vector<int> ans; int m = matrix.size(); int n = matrix[0].size(); for (int i = 0; i < m; i++) { for (int j = 0…
L. Ministry of Truth Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/K Description Andrey works in the Ministry of Truth. His work is changing articles in newspapers and magazines so that they praise the Party an…
C. CinderellaTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100685/problem/C Description Cinderella is given a task by her Stepmother before she is allowed to go to the Ball. There are N (1 ≤ N ≤ 1000) bottles with water in th…