D. Fedor and Essay time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output After you had helped Fedor to find friends in the «Call of Soldiers 3» game, he stopped studying completely. Today, the E…
Easy Problem from Rujia Liu? Though Rujia Liu usually sets hard problems for contests (for example, regional contests like Xi'an 2006, Beijing 2007 and Wuhan 2009, or UVa OJ contests like Rujia Liu's Presents 1 and 2), he occasionally sets easy probl…
11991 - Easy Problem from Rujia Liu? Though Rujia Liu usually sets hard problems for contests (for example, regional contests likeXi’an 2006, Beijing 2007 and Wuhan 2009, or UVa OJ contests like Rujia Liu’s Presents 1and 2), he occasionally sets easy…
传送门 本来出题人出出来想考数据结构的. 但是我们拥有map+vector/set这样优秀的STL,因此直接用map离散化,vector存下标在里面二分找答案就行了. 代码: #include<bits/stdc++.h> #define N 100005 using namespace std; inline int read(){ int ans=0; char ch=getchar(); while(!isdigit(ch))ch=getchar(); while(isdigit(ch)…
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…
NBUT 1646 Internet of Lights and Switches Time Limit:5000MS Memory Limit:65535KB 64bit IO Format: You are a fan of "Internet of Things"(IoT, 物联网), so you build a nice Internet of Lights and Switches in your huge mansion. Formally, there…
Foreign Exchange Your non-profit organization (iCORE - international Confederation of Revolver Enthusiasts) coordinates a very successful foreign student exchange program. Over the last few years, demand has sky-rocketed and now you need assistance w…
链接:http://soj.me/show_problem.php?pid=1299&cid= Description Selected from 3,850 teams from 1,329 universities in 68 countries competing at 106 sites and preliminary contests worldwide, sixty-eight teams competed for bragging rights and prizes at The…
1837. Isenbaev's Number Time limit: 0.5 second Memory limit: 64 MB Vladislav Isenbaev is a two-time champion of Ural, vice champion of TopCoder Open 2009, and absolute champion of ACM ICPC 2009. In the time you will spend reading this problem stateme…
关于list,map,set的区别参考http://www.cnblogs.com/qlqwjy/p/7406573.html 1.遍历list @Test public void testList() { List<Integer> list = new ArrayList<Integer>(); list.add(1); list.add(2); System.out.println("-------------------list------------------…
A. Co-prime Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given an array of n elements, you must make it a co-prime array in as few moves as possible. In each move you can i…
Ananagrams Descriptions: Most crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POTS and POST. Some words however do not have this attribute, no matter how you rearra…
Description Most crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POTS and POST. Some words however do not have this attribute, no matter how you rearrange their lett…