Find yourself a guy who looks at you the way Marcin_smu looks at Petr,
and beware of guys who look at you the way Errichto looks at Petr.
Find yourself a guy who looks at you the way Marcin_smu looks at Petr,
and beware of guys who look at you the way Errichto looks at Petr.
My following solution for Leapfrog: Ch. 1 failed:
#include <iostream>
#include <string>
using namespace std;
int T;
int main() {
cin >> T;
for (int test = 1; test <= T; ++test)
{
string s;
cin >> s;
int n = s.length();
int b = 0;
for (int i = 0; i < n; i++)
if (s[i] == 'B')
b++;
char yesno = ( b+1 <= n-1 && n-1 <= 2*b ?'Y' :'N');
cout << "Case #" << test << ": " << yesno << "\n";
}
return 0;
}
I compared the outputs for the reference solution and mine. But they are the same. diff
doesn't find any differences.
Here is the Dropbox folder with my and reference solution's sources, inputs and outputs. I don't believe I submitted the wrong files.
Can someone confirm or reject the validity of my solution?
Is there anyone who is studying at KAIST and can't find teammates for team contests?
I am a freshman and I don't know how I should look for teammates.
Any advice would be appreciated a lot.
Although the video is 2 months old, I believe most of you haven't watched it yet.
So here is the YouTube link: How Snapchat's filters work
Hello Codeforces,
I am currently located in Turkmenistan and (I believe) for some political reasons ISPs here have blocked most of the websites (Facebook, Youtube, etc have long been blocked here before. When I mean "most" I mean almost any website hosted outside of Turkmenistan and Russia. That's just an observation though). Codeforces is one of the few websites I can currently access. So I decided to ask for a help here.
Would anyone owning an online server (vps, cloud, etc. anything I can ssh into and use as proxy) be kind enough to give me their ssh credentials (or even better/more secure would be to add a new user to the server for me), so that I can bypass the firewall?
I have a cloud server running on Amazon AWS. But I can not use it as proxy or vpn, because it is blocked as well.
Please comment below if you are able to help.
Thanks.
P.S. Sorry for baity title.
Because, no one told you about "News" section in Russian version of Codeforces!
http://media.riffsy.com/videos/7d8ebb7cf892c4d15fbb1da536b2a445/webm
Stop fucking yourself. If it has been long enough for you to exhibit some kind of progress but you haven't fucking shown any yet, then fucking quit. You are little fucking cunt that can't just put their ass down and fucking do the shit they should do. You are fucking feeble looser that would be the most use to themselves only and only by closing themselves in a fucking toilet and fucking their hand (And yeah their hand, because that is the only thing they can fuck). If you still insist that you ain't no fucking cumming pussy, then fucking force yourself to get some shit done and show me that you are not some worthless shit. But you know what? I know what exactly will happen. You will accept the fucking challenge but still you will fucking fuck yourself in the anus and won't achieve any fucking shit. Now prove me wrong fucking motherfucker.
Or a tree of questions?
Mihail, put an ad on tourist's profile page and use the money earned from the ads to buy a birthday gift for Tanya each year.
I don't often think in such a cute way. So, Mihail, think twice.
I am trying to redeem my $100 AWS credits that I got from HackerRank CodeStorm, but I don't have credit card, so I can't complete my registration to AWS.
Does anyone know how to redeem AWS credits without credit card?
Hello,
I am having hard time in understanding the statement of problem Cow Run, USACO 2012 January Contest. I can't understand what the problem statement asks for.
At first, I thought problem was about finding a sequence of moves that, no matter how Bessie moves, guarantees that cows will end the run at a position no more than K units distance away from the initial position.
But, then, why are Bessie's moves provided?
I would appreciate any help.
Thanks.
Hello Codeforces,
I want to share with you a simple tool that I've been using for a while now that I named "Ineffable".
Simple command-line grader for local grading of solutions for problems of competitive programming contests. It is written in Python and it uses timeout
Perl library to limit resources (time and memory limits) of program being tested.
It works on Ubuntu, and I guess it should work on any Linux/Unix system as long as Python and Perl are installed.
(Original quote is "Success consists of going from failure to failure without loss of enthusiasm")
Run the following commands on your terminal:
$ mkdir ~/.ineffable
$ cd ~/.ineffable
$ wget https://bitbucket.org/silap/ineffable/downloads/ineffable-1.0.zip
$ unzip master.zip
$ rm master.zip
$ mv silap-ineffable-*/* .
$ rm -r silap-ineffable-*/
$ sudo ln -s ~/.ineffable/ineffable /usr/local/bin/ineffable
Or alternatively you may run this command if you have curl installed:
$ bash < <(curl -sL https://bitbucket.org/silap/ineffable/raw/f208b207160eacd8ba4c30c078d1255e309c6b40/install.sh)
Whenever you run ineffable it looks for ineff.json
file. You can also tell ineffable which configuration file to use using this syntax: inefabble another.json
.
Configuring ineffable is easy and quite intuitive. After you install ineffable you can view the example configuration file that is located at ~/.ineffable/ineff.json.example
.
Available configuration options are as follows:
key | example value | Description |
---|---|---|
pkdesc | "Balkan OI 2014 Day 2 Problem Ephesus" | Package description. (Optional) |
pbcode | "steeple" | Problem code. Ineffable searches for string {PROBLEM} in keys warmup , execute , inp , out and tstdir , and replaces them with pbcode value. (Optional) |
tl | 1000 | Time limit (in milliseconds). (Required) |
ml | 65536 | Memory limit (in kilobytes). (Required) |
warmup | "g++ -O2 -o solution solution.cpp" | Command to be executed before the grading starts. For example, it can be used to compile C++ code. Grading stops if the command exits with non-zero code (such as, when compilation fails). (Optional) |
execute | "./solution" or "python solution.py" | Command that runs the solution. Solution needs to read from stdin and write to stdout. (Required) |
tstdir | "steeple_tests" | Directory where the test files are located. If ommited, it is assumed that tests are located in the current directory. (Optional) |
There are 2 different ways to show ineffable which files are input files and which files are output files:
Smart stars:
"inp": "input*.txt", "out": "output*.txt"
Listing files.
# Syntax 1 "iopairs": { "input1.txt": "output1.txt", "input2.txt": "output2.txt", "input3.txt": "output3.txt" } # Syntax 2 "iopairs": { "inp": {"input1.txt", "input2.txt", "input3.txt"}, "out": {"output1.txt", "output2.txt", "output3.txt"} }
Let's solve problem Cow Steeplechase of USACO 2011 November Contest.
$ # Create folder `steeple` in your desktop and another folder `steeple_tests` inside it.
$ mkdir Desktop/steeple
$ cd Desktop/steeple
$ mkdir steeple_tests
$ cd steeple_tests
$
$ # Download and extract test data into `steeple/steeple_tests/`.
$ wget -q http://usaco.org/current/data/steeple.zip
$ unzip -q steeple.zip
$ rm steeple.zip
$ cd ..
$
$ # Create file `ineff.json` and configure.
$ touch ineff.json
$ echo '{
"pkdesc": "Cow Steeplechase (USACO Gold November 2011 Contest)",
"pbcode": "steeple",
"tl": 3000,
"ml": 65536,
"warmup": "g++ -std=c++11 -O2 -o {PROBLEM} {PROBLEM}.cpp",
"execute": "./{PROBLEM}",
"tstdir": "{PROBLEM}_tests/",
"inp": "I.*",
"out": "O.*"
}' >ineff.json
$
$ # Create `steeple.cpp` and open it with your favorite editor to code your solution.
$ touch steeple.cpp
$ vim steeple.cpp
$ # ...
$
$ # Test your solution
$ ineffable
As I haven't spent much effort in making ineffable, there may be some bugs. I won't be able to fix the bugs at least till the IOI 2015 ends.
Ineffable is a simple project and anyone who knows some Python can alter it for their own purpose or even add some features. Project is available on Bitbucket (sorry no Github, it is blocked in my country :/).
EDIT: "Installation" section updated.
EDIT 2: Download links updated (to be able to keep number of downloads :P).
Today, I was checking the official solution for problem grassplant of USACO 2011 December Contest. I ran the solution on 12th test and it gave me runtime error (segmentation fault). I realized it was caused by stack overflow. Then (somewhy) I added (int)
before E[u].size()
in the function hang()
and ran it on 12th test again. Surprisingly, stack did not overflow this time.
I tried doing it several times, and the code without (int)
always run out of 8Mb of stack memory and the code with it used less than 8Mb of stack memory.
Can anyone who gets this stuff tell why this happens?
Hello Codeforces,
Today, after getting bored of sleeping, I decided to sharpen up my vim skills. So I opened the firefox, then developer tools, and set the 'keybindings' to 'vim style', and decided to write a user script. A user script that automatically downvotes the spammers.
If you are fed up of spammers as much as I am, then I invite you to use my user script. To install the user script in your browser, just follow these 2 instructions:
Well, at the moment, there are only 6 people in the list of the spammers. But, these 6 people are (mostly) those that asked for downvotes in some particular comment/post. These people will be removed from this list after the real list of the spammers will be ready. That is why, I ask you to suggest spammers (with reasonable evidence alongside, of course). Thanks.
So here is the list of those 6 "spammers":
This years last USACO contest is running!
You can participate in the contest by starting your 4-hour time block any time between April 3 and April 6.
You need to register for the http://usaco.org to be able to participate in the contest.
Contest link: http://usaco.org/index.php?page=viewcontest
Duration: 4 hours
For most problems resource limitations are as follows:
Time Limit: 2s (C/C++/Pascal), 4s (Java/Python)
Memory Limit: 256MB
P.S. I know that the title sucks, so does the grader of the interactive problem :/
Once upon a time my password used to be 123456
, but not anymore :'(
Hello Codeforces,
A few days ago, I was sitting and thinking, and invented a data structure with time complexities and (preprocessing and per query, respectively) I was being lazy and surfing the net :P I was searching for some good HTML5 <canvas>
tutorials/example usages and found this.
It is cool, but not so beautiful. So I modified it a bit to make it more beautiful and more "competitive programmerish". :P :D :P
Hi Codeforces,
Does anyone know a way to download problems in a PDF file for later offline use?
I know a somewhat not-so-good way:
codeforces.com/contest/<contestid>/problems
ctrl+p
But I remember that I downloaded 482B - Interesting Array in a PDF file at the beginning of the contest, when I tried to open the problem page. I don't know how, but maybe it was because the servers were too busy. That is why, I thought there might be a way to download problems in PDF format.
I still have the file. This file is more convenient than printing the problems page.
Hello Codeforces!
Today, I translated the BIT tutorial by e-maxx into English:
http://silap.tk/blog/2014/12/fenwick-tree/
PS Please, inform if there are any grammar mistakes or typos.
After 3 years, finally decided to share this.
IOI 2014 APP for Android is out!! You can download it at
https://play.google.com/store/apps/details?id=org.ioi.olympiad2014
Key features are:
Minimum Requirements:
BTW Organizers also will be providing the Leaders and Deputy Leaders Acer Iconia A1-811 tablet (Android 4.2 OS) for use during IOI2014.
Problem link: 128C - Games with Rectangle
Official Editorial: Russian only
I've got idea that is different from the official one, plus:
But the problem is, I can't find what I am missing :(
Here is my code (unfortunately, it is full of trash, and I am too lazy to remove them). So I am asking you to help.
Initially there is a grid and a rectangle already drawn on it of size n × m.You need to draw k more rectangles and each rectangle should be drawn inside the previously drawn rectangle. Rectangles' sides should be one the grid lines and they should not touch each other. The problem is in how many ways you can do it (or, how many different pictures can you draw in total).
Let's assume that there is a grid of size w × h. Let g(w, h, k) be number of different pictures you can obtain by drawing k rectangles one inside another (plus, they should be drawn on the grid lines and their borders should not touch each other). It is clear that answer for the whole problem will be g(n - 1, m - 1, k). Now we need to know how to calculate g:
g[w][h][k] = 2*g[w][h-1][k] - g[w][h-2][k] + 2*g[w-1][h][k] - g[w-2][h][k] - 4*g[w-1][h-1][k] + g[w-2][h-2][k-1];
But using the above formula, we get negative value for some w, h, k, which is obviously incorrect. :(
It seems like that I forgot to add something or am removing too much.
Name | CF Handle | Country | Birth Date | Previous IOIs |
---|---|---|---|---|
Sparik Hayrapetyan | sparik | Armenia | ||
Eduard Grigoryan | edogrigqv2 | Armenia | 2010 2011 2013 | |
Tigran Galstyan | Tiko | Armenia | ||
Mushegh Shahinyan | MyLeg | Armenia | ||
Florian Leimgruber | fleimgruber | Austria | 07 Jun 1997 (16) | |
Gary Ye | GaryYe | Austria | 15 Feb 1997 (17) | 2013 |
Bristy Sikder | bristy1588 | Bangladesh | 2011 2012 2013 | |
Labib Md. Rashid | Labib666 | Bangladesh | 2013 | |
Tonmoy Mollik | triploblastic | Bangladesh | ||
Hasib Al Muhaimin | hasib | Bangladesh | 27 Oct 1996 (17) | 2013 |
Аlexey Vistyazh | netman | Belarus | ||
Dmitriy Demidko | dimad | Belarus | 01 May 1997 (17) | |
Barbara Kuskova | kuskova | Belarus | 29 Apr 1998 (16) | |
Fedor Korobeinikov | Mediocrity | Belarus | 15 Feb 2000 (14) | |
Mauricio Wilde Monasterios | Daydreamer | Bolivia | 01 Jul 1995 (18) | 2013 |
Isabella Defilippis | Isa_Def | Bolivia | ||
Ronaldo Franco | rony | Bolivia | ||
Moises Vela | MoiTheKiller | Bolivia | ||
Michel Zelazny | michelzel | Brazil | 2013 | |
Arthur Nascimento | arthur.nascimento | Brazil | ||
Mateus Bezrutchka | m_bezrutchka | Brazil | ||
Arthur Pratti Dadalto | Brazil | |||
Hristo Venev | mustrumr | Bulgaria | 2012 2013 | |
Momchil Peychev | momo_vn | Bulgaria | 2013 | |
Encho Mishinev | Enchom | Bulgaria | 2013 | |
Stefan Ivanov | Bulgaria | |||
Ben Zhang | Canada | 29 Aug 1997 (16) | ||
Yu Dingli | Leoyu | China | ||
Xu Yinzhan | xyz111 | China | ||
Shen Yang | sy2006 | China | ||
Dong Honghua | dhh1995 | China | ||
Michalis Psalios | michael10024 | Cyprus | 2012 2013 | |
Angelos Pelecanos | AnPelec | Cyprus | 2013 | |
Adamos Ttofari | adamos2468 | Cyprus | ||
Andreas Theocharous | Cyprus | |||
Martin Raszyk | m.raszyk | Czech Republic | 2013 | |
Jan-Sebastian Fabík | fabik | Czech Republic | ||
Ondřej Hübsch | ondrah | Czech Republic | 2012 | |
Dominik Smrž | Czech Republic | |||
Yousef Ibrahim Salama | Yousef_Salama | Egypt | 2012 2013 | |
Ahmed Morsy | Ahmed_Morsy | Egypt | 21 Nov 1995 (18) | |
Oliver-Matis Lill | oml1111 | Estonia | 28 May 1995 (19) | 2013 |
Sami Kalliomäki | Scintillo | Finland | 2012 2013 | |
Henrik Lievonen | Hennkka | Finland | 2013 | |
Kalle Luopajärvi | kllp | Finland | 2013 | |
Petteri Timonen | P.T | Finland | ||
Lucas Pesenti | md5_84 | France | 30 Mar 1997 (17) | |
Tomas Rigaux | Akulen | France | 04 Nov 1997 (16) | |
David Cheikhi | cheikdav | France | ||
Arthur Léonard | France | |||
Nikoloz Svanidze | svanidz1 | Georgia | 01 Apr 1996 (18) | 2012 2013 |
Elene Machaidze | emachaidze | Georgia | 27 Sep 1997 (16) | |
Nika Nadiradze | nikanick11 | Georgia | 05 Mar 1996 (18) | 2011 2012 |
Georgy Skhirtladze | gskhirtladze | Georgia | 03 Aug 1999 (14) | |
Georgios Christoglou | Giorgos_Christoglou | Greece | 2013 | |
Aristofanis Rontogiannis | mentalist | Greece | ||
Dimitrios Los | Greece | 2012 2013 | ||
Georgios Venizelos | geroveni | Greece | ||
Lau Ting Fung | master_miu | Hong Kong | ||
Lik Hang Poon | hohomu | Hong Kong | 2013 | |
Kam Chuen Tung | alex20030190 | Hong Kong | 2013 | |
Wai Pan Yik | jasonyik | Hong Kong | 2012 | |
Akshat Boobna | akshatb | India | 06 May 1996 (18) | 2013 |
Bhupesh Kumar | bhup99 | India | 10 Oct 1994 (19) | |
Nihal Pednekar | nihalpi1 | India | 26 Oct 1996 (17) | 2013 |
Malvika Raj Joshi | a0666 | India | ||
Muhammad Rais Fathin Mudzakir | rais.fathin38 | Indonesia | ||
Stefano Chiesa Suryanto | zeulb | Indonesia | 2013 | |
Alfonsus Raditya Arsadjaja | radit | Indonesia | ||
Zamil Majdy | kadalijo | Indonesia | ||
Mojtaba FayazBakhsh | moji | Iran | ||
Mohammad Amin Khashkhashi Moghaddam | alex-mercer | Iran | ||
Amirmohsen Ahanchi | persianpars | Iran | ||
Iliad Ramezani | Beranabus | Iran | ||
Hirotaka Isa | HIR180 | Japan | 12 Apr 1998 (16) | |
Ken Ogura | catupper | Japan | ||
Ryoma Sato | joisino | Japan | 28 Jul 1996 (17) | |
Yuta Takaya | yutaka1999 | Japan | ||
Nurlan Zhussupov | Sick_coder | Kazakhstan | 2013 | |
Miras Myrzakerey | Miras321 | Kazakhstan | ||
Ulugbek Adilbekov | Algiz | Kazakhstan | ||
Daniyar Maminov | LeMieux | Kazakhstan | ||
Ruslan Rakhimov | ruslan.rakhimov | Kyrgyzstan | 25 Oct 1997 (16) | |
Kadyrbek Narmamatov | Kyrgyzstan | 24 Jan 1998 (16) | ||
Aleksejs Zajakins | Alex_2oo8 | Latvia | 2013 | |
Ingus Jānis Pretkalniņš | Latvia | |||
Aleksejs Popovs | popoffka | Latvia | 2011 2012 2013 | |
Kristaps Čivkulis | how_to_become_purple | Latvia | ||
Jordan Fernando Alexander Salas | HappyPerson | Mexico | ||
Daniel Talamas Cano | allthecode | Mexico | 2013 | |
Diego Alonso Roque Montoya | Diego9627 | Mexico | 2013 | |
Carlos Galeana Hernández | Mexico | |||
Petar Djerkovic | Montenegro | |||
Dejan Todorovic | dejo | Montenegro | 28 Apr 1996 (18) | |
Petar Milosavljevic | ZipperMan | Montenegro | ||
Grover Enrique Castro Guzman | vermen | Peru | 17 Jan 1992 (22) | |
Michał Glapa | glapul | Poland | 01 Oct 1995 (18) | |
Albert Citko | asterius | Poland | ||
João Rocha | joaorocha619 | Portugal | ||
Pedro Amaro | mys | Portugal | ||
Gonçalo Paredes | gonP | Portugal | ||
Andrei Heidelbacher | andreihh | Romania | 26 Aug 1995 (18) | 2013 |
Rareș Darius Buhai | rares.buhai | Romania | 18 May 1996 (18) | 2012 2013 |
Alexandru Velea | alex.velea | Romania | ||
Mihai-Dan Gheorghe | gheorghemihai | Romania | 2011 | |
Nikolay Kalinin | KAN | Russia | 2013 | |
Konstantin Semenov | zemen | Russia | 2013 | |
Nikita Uvarov | -imc- | Russia | ||
Nikita Sivukhin | sivukhin | Russia | ||
Ivan Stošić | ivan100sic | Serbia | 04 Sep 1995 (18) | 2012 2013 |
Dimitrije Erdeljan | dd__ | Serbia | 23 Apr 1997 (17) | 2013 |
Marko Stanković | MeinKraft | Serbia | 15 Jun 1996 (17) | 2013 |
Andrej Ivašković | Dreian95 | Serbia | 02 Apr 1995 (19) | 2012 |
Feng Jiahai | Singapore | |||
Mark Theng Kwang Hui | Singapore | 2013 | ||
Xinyu Wu | Singapore | |||
Ranald Lam Yun Shao | Singapore | 2012 2013 | ||
Bui Truc Lam | Slovakia | |||
Mário Lipovský | Slovakia | |||
Michal Korbela | kabell | Slovakia | ||
Eduard Batmendijn | Baklazan | Slovakia | 19 Jan 1996 (18) | 2012 2013 |
Seokhwan Choi | gs12117 | South Korea | 22 Dec 1996 (17) | 2013 |
Jeehak Yoon | HYPERHYPERHYPERCUBELOVER | South Korea | 10 Feb 1998 (16) | |
Johan Sannemo | jsannemo | Sweden | 2012 2013 | |
Hussain Kara Falah | Pepe.Chess | Syria | 14 Dec 1997 (16) | |
Hasan Jaddouh | kingofnumbers | Syria | ||
Aleksandar Abas | Alex7 | Syria | 13 Sep 1996 (17) | |
Joud Zouzou | RedNextCentury | Syria | ||
Brian Chen | betaveros | Taiwan | ||
Yi Zhou | qazwsxedcrfvtg14 | Taiwan | 03 Sep 1997 (16) | |
Pochang Chen | johnchen902 | Taiwan | 05 Nov 1997 (16) | |
Tzu Peng Wang | paulwang | Taiwan | 19 Sep 1996 (17) | |
Kai-Chieh Chang | ihave33cm | Taiwan 2 | 25 Mar 1997 (17) | |
Abduqodiri Qurbonzoda | abdukodir | Tajikistan | 2012 2013 | |
Dzhamshed Khaitov | Jamik | Tajikistan | 2012 2013 | |
Mekhrubon Turaev | Ximera | Tajikistan | 2013 | |
Doro Umarov | Alnair | Tajikistan | 2013 | |
Phoomraphee Luenam | Phoom | Thailand | ||
Pichayut Liamthong | pichayut | Thailand | 2013 | |
Krittisak Chaiyakul | toppykung | Thailand | 2013 | |
Semih Basrık | sbasrik | Turkey | 2013 | |
Muhammed Emin Ayar | EMINAYAR | Turkey | 01 Aug 1997 (16) | |
Halil Ozan Akgül | halilozanakgul | Turkey | 19 Jun 1996 (17) | |
Abdullah Enes Öncü | enesoncu | Turkey | ||
Bayram Berdiyev | bayram | Turkmenistan | ||
Bayram Guvanjov | bayram98 | Turkmenistan | ||
Sylap Aliyev | accidentallygivenfuck | Turkmenistan | 11 Nov 1997 (16) | 2013 |
Andriy Omelyanenko | Omelianenko | Ukraine | 04 May 1997 (17) | |
Ilya Shevchenko | Scorpy | Ukraine | 2013 | |
Misha Babenko | NegaTeeF | Ukraine | ||
Andrej Selivanov | seland | Ukraine | ||
Scott Wu | scott_wu | United States | 2012 2013 | |
Andrew He | ecnerwala | United States | ||
Steven Hao | stevenkplus | United States | 2013 | |
Joshua Brakensiek | AstroConjecture | United States | 2013 | |
Kien Nguyen | kien_coi_1997 | Vietnam | 30 Nov 1997 (16) | |
Phuc Ngo | nhap96 | Vietnam | ||
Viet Do | Aquacloud | Vietnam | ||
Dung Nguyen | ig_dug | Vietnam |
UPD 1 Please feel free to post the participants here too, so that there will be something to discuss :)
UPD 2 Now you can see IOI stats profile page of a participant :)
UPD 3 Congratulations! to those who qualified for IOI 2014 :)