The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that y=(5+2 *sqrt(6))^(1+2^x) For a given integer x(0≤x<2^32) and a given prime number M(M≤46337), print [y]%M. ([y]means the integer part…
Problem G. Garden Gathering Input file: standard input Output file: standard output Time limit: 3 seconds Memory limit: 512 megabytes Many of you may have been to St. Petersburg, but have you visited Peterhof Palace? It is a collection of splendid pa…
Problem D. Delay Time Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 512 megabytes Petr and Egor are measuring the gravitational acceleration g on their physics lessons using a special device. An electromag…
ACM ICPC Central Europe Regional Contest 2013 Jagiellonian University Kraków Problem A: Rubik’s RectangleProblem B: What does the fox say?Problem C: Magical GCDProblem D: SubwayProblem E: EscapeProblem F: DraughtsProblem G: History courseProblem H: C…
I. Illegal or Not? time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output The Schengen Agreement was signed by a number of countries to uniform many visa-related questions and to allow tourists fr…
K. King's Rout time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output The great rout will be held this evening in the palace of his majesty Nassah II, the king of Occorom. There are n guests invi…
H. Hashing time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output In this problem you are given a byte array a. What you are going to do is to hash its subsequences. Fortunately you don't have to…
C. Colder-Hotter time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output This is an interactive problem. Egor and Petr are playing a game called «Colder-Hotter» on a 2D plane. At the beginning of t…
A. Anagrams time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output Consider the positional numeral system with a given base b. A positive integer x is called b-anagram of a positive integer y if t…
A: 简单题,因为题目中说了不会有数据相同: #include<cstdio> #include<algorithm> #define maxn 200005 using namespace std; struct node { ]; int id; bool operator <(const node &t)const { ]<t.a[]; } }no[maxn]; int bb[maxn],cnt,n; int main() { scanf("%d…