URAL 1873. GOV Chronicles
唔 神题一道 大家感受一下
1873. GOV Chronicles
Memory limit: 64 MB
along a gray street. This is the Tradition Keeper of the ACM club in Ural
State University. Drizzle and dull sky have always turned him
nostalgic. And here we go again, the Tradition Keeper is bringing back the
memories of distant past when Ural Federal University wasn't yet existing,
and the story of Team.GOV was only starting. Indeed, this story deserves
to be preserved for descendants. However, the details are slipping from
the Keeper's mind and he seems to need an archive.
Mechanics where the Keeper himself has been studying a long time ago. Long
corridors, narrow light bars on the floor, dark corners and eventually an
office with ACM archive. The Keeper opened the door and found himself in a
cramp room with numerous racks. Dozens of boxes and piles of paper are
dumped near the walls. On one box three letters glittered with gold — GOV.
The Keeper stepped to the box, drew a heavy file and opened it. On the
first page in the right upper corner there was a photo of a smiling young
man with curly hair and a subscript: “Vadik Kantorov, the permanent
captain of Team.GOV”.
the half-ready team of Alex and Misha. Alex had been a bright
programmer even he was a schoolar and so troubled the ACM old-timers. Thus, Alex
was ready to name the team: “Alarm”.
The first battle was the Ural SU Championship where Alarm
took only the fifth place and allayed the veterans' fear. Next
contest was the ACM ICPC subregional contest. The team played slightly better
and took the seventh place out of all teams from Ural region, and the
third out of teams from Ural SU. Alarm became the third freshmen
team in the Ural SU history to qualify for the regional contest in St. Petersburg.
Unfortunately, on the regional contest the team scored 86th and broke the
record of lowest position of Ural SU teams. It
was a hard hit for the team. The choice had to be made: practice a lot,
leave programming contests or keep performing poorly.
and scored 19th of all teams and 5th of Ural SU teams. That very moment it
became clear that the line-up had to change. However, before the Ural
Championship Alarm had applied to the Tatarstan Championship where the
team's final battle took place. The team could not even solve a half of the
offered problems and did not make in the best ten teams (11th place). On
the way back in a train it was decided that Misha had to quit the team.
completed and the story of Team.GOV commences. The team consisted of two
members having little experience and even less success. A new name was
defined — Team.GOV. After long considerations Vadik figured out that the
team missed a strong mathematician. Sasha who had been Vadik's high school
friend was picked to fill this role. With Sasha's appearance everyone felt
that everything was going to run smoothly.
university year. In unclear circumstances Sasha has not come to the
contest, but even in that case Team.GOV was second best of Ural SU teams.
One-year experience paid off! Sasha did come to the subregional contest
but the team reached only 14th place and did not qualify for the regional
contest.
send one extra team to the regional contest. After long negotiations
Team.GOV could make it to the regional contest but with a sudden change
in the line-up — Ivan B. came instead of Sasha. The replacement turned
out to be fruitful — 76th place (+10 to Alarm's achievement).
the line-up again. Nikita was invited as the third player for the Ural
Championship. On the qualification contest Vadik, Nikita and Alex played
very well: the team scored second of Ural SU teams.
Truly an astounding success!
For some strange reason Alex did not come. The team performed very poorly
yet another time — 25th place of all teams and 5th of Ural SU teams.
Nikita was not satisfied with such attitude and Team.GOV became only two players
again — Alex and Vadik. What a curse! The team started to search for the
third player.
SU. The search for the third teammate was completed successfully. Senior
student Fedor was very experienced and had been practicing since 9th
grade of high school. Bright future was ahead of the team.
The curse was over and Team.GOV played three official contests
with the same line-up. The team scored 12th on the subregional contest,
safely advanced to the regional, and then took the third place on the Ural
SU Championship.
place, which was +15 to the previous year's position.
competition of ACM ICPC veterans and current teams — Battle of
Generations. Sadly, Alex couldn't come but team figured it out — Ivan K.
came to the rescue and replaced Alex.
began to look for a replacement. Nikita accepted the invitation cheerfully
once he heard of Alex quitting the team. The first contest after his
return to Team.GOV was qualification for the Ural Championship.
Suddenly Vadik had some urgent business in Europe, so Fedor and Nikita
participated without him. They performed quite well and solved as many problems
as the leaders did. As a result, the team got the third place and
qualified for the Ural Championship.
and 4th out of Ural SU teams. Fedor and Nikita couldn't hold the nerves,
and Vadik had to look for new teammates all over again.
his ACM-career and he needed a new team. The veterans recommended to take
young and promising Den. Vadik conducted a little test, and Den was taken.
Only a few days were left before the Ural SU Championship, almost all
the teams were formed, while Vadik was still answering his eternal
question — where to get the third team member? Accidentally he found
that Egor was looking for a new team after his previous team broke
apart. A new line-up
of Team.GOV was born.
Subregional contest wasn't successful as well — 9th place out of all
teams and 4th out of Ural SU teams. Ural SU got an extended quota and
Team.GOV was going to St. Petersburg again.
All-Siberian Olympiad was a perfect shot. Team.GOV went to Novosibirsk and
discovered again how weak they were: 39th place out of all teams and the
worst performance out of Ural SU teams. So the guys set out to St.
Petersburg with great leisure plans. Well, taking part counts no less than
victory!
five problems in the first four hours and was quite high ranked. After the contest the coaches
discovered that the team scored not only the sixth problem but also a
seventh one. The result — 26th place (+35 to the last year's position)
and a second grade diploma. Team.GOV finally reached success and glory.
The road back home was ahead.
fancy, it was his last contest after all. Vadik invites his Chinese girlfriend
Xiaohong. The
third invited teammate unfortunately didn't come, so on the last minute
Vadik took Vitaliy (medal winner of ACM ICPC World Finals) for the Game
Tournament before the Ural Championship. Unfortunately, Vitaliy could not participate in the main
contest, so Vadik took Sasha as an old friend. This was the last contest
of Team.GOV.
contests has every team member participated? Vadik had always told that
Misha is the member number zero, because he had played in Team.GOV before
the team got its name. Vadik is indeed player number one.
Team.GOV contest, Game Tournament shouldn't be counted. But he definitely
deserves to be included in the history of Team.GOV, because he is an award winner
of World Finals and a valuable player in general.
(Misha — 0, Vadik — 1, Alex — 2, Sasha — 3, Ivan B. — 4,
Nikita — 5, Fedor — 6, Ivan K. — 7, Den — 8, Egor — 9,
Xiaohong — 10, Vitaliy — 11). He counted that a number zero has played
for 5 times (because exactly 5 contests were played by Alarm). And a number
one participated in 20 contests.
Input
Output
team. All contests must be counted but the Game Tournament before the Ural
Championship.
Samples
| input | output |
|---|---|
1 |
20 |
11 |
0 |
Problem Author: Mikhail Rubinchik
Problem Source: Ural Regional School Programming Contest 2011
#include<iostream>
#include<string.h>
#include<stdio.h>
#include<ctype.h>
#include<algorithm>
#include<stack>
#include<queue>
#include<set>
#include<math.h>
#include<vector>
#include<map>
#include<deque>
#include<list>
using namespace std;
int main()
{
int n;
scanf("%d",&n);
int a[]={,,,,,,,,,,,};
printf("%d",a[n]);
}
URAL 1873. GOV Chronicles的更多相关文章
- URAL 1881 Long problem statement
1881. Long problem statement Time limit: 0.5 secondMemory limit: 64 MB While Fedya was writing the s ...
- URAL 1728. Curse on Team.GOV(STL set)
题目链接:space=1&num=1728" target="_blank">http://acm.timus.ru/problem.aspx?space= ...
- hdu 1873 看病要排队(优先级队列)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1873 题目大意: 三个医生看病,病人排队看病,病人有优先级,优先级高的提前看病,同样的优先级按先后.I ...
- 后缀数组 POJ 3974 Palindrome && URAL 1297 Palindrome
题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串 ...
- ural 2071. Juice Cocktails
2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and ...
- ural 2073. Log Files
2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...
- ural 2070. Interesting Numbers
2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate int ...
- ural 2069. Hard Rock
2069. Hard Rock Time limit: 1.0 secondMemory limit: 64 MB Ilya is a frontman of the most famous rock ...
- ural 2068. Game of Nuts
2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in proces ...
随机推荐
- Team Foundation Server 2010服务器安装
本安装指南使用Windows Server 2008企业版为基础,安装Windows Server 2008 SP2(必须),在此操作系统环境上进行TFS2010的安装与配置. 三.系统用户设置 1. ...
- linux编译警告 will be initialized after
http://blog.chinaunix.net/uid-17019762-id-3152012.html 作为一个有强迫症的人,实在是受不了 warning 的存在 这个warning是由于初始化 ...
- java基础26 线程的通讯;wait()、notify()、notifyAll()等方法
线程的通讯:一个线程完成了自己的任务时,要通知另一个线程去完成另一个任务 1.1.方法 wait():等待.如果线程执行到了wait()方法,那么该线程会进入等待状态,等待状态下的线程必须要被其他线程 ...
- 5 个非常有用的 Laravel Blade 指令,你用过哪些?
接下来我将带大家认识下五个 Laravel Blade 指令,这些指令将让你在解决特定问题时如虎添翼.如果你是刚接触 Laravel 的用户,这些小技巧能带你认识到 Laravel Blade 模板引 ...
- Linux 命令find、grep
本文就向大家介绍find.grep命令,他哥俩可以算是必会的linux命令,我几乎每天都要用到他们.本文结构如下: find命令 find命令的一般形式 find命令的常用选项及实例 find与xar ...
- sql server中分布式查询随笔(链接服务器(sp_addlinkedserver)和远程登录映射(sp_addlinkedsrvlogin)使用小总结)
由于业务逻辑的多样性,经常得在sql server中查询不同数据库中数据,这就产生了分布式查询的需求 现我将开发中遇到的几种查询总结如下: 1.access版本 --建立连接服务器 EXEC sp_a ...
- c语言循环链表的问题
今天,老师说了一道题,大意是,有一群小朋友10个人,但是老师只有一个苹果,只能给一个小朋友,于是老师就决定让小朋友们做成一圈,从第一个小朋友开始,每隔一个小朋友就没有机会得到苹果,最后剩下的一个人可以 ...
- Nt函数原型头文件
//转自看雪,可以作为一个头文件使用,方便快捷 1 NTSTATUS NTAPI NtAcceptConnectPort( OUT PHANDLE PortHandle, IN PVOID PortI ...
- 使用Emacs:帮助篇
当你打开emacs并认真阅读“快速指南”后,你已经知道用C-x C-f打开文件,用C-x C-s保存文件,用C-x C-c退出emacs,可以在emacs中生存了.这里把Tutorial.cn中出现的 ...
- js 获取时间戳的方法
(new Date()).valueOf()1541569364658(new Date()).getTime()1541569372623Number(new Date())154156938662 ...