By fcspartakm, history, 8 years ago, translation, In English

Hello, Codeforces!

I'd like to invite you to Codeforces Round #337 (Div. 2). It'll be held on Sunday, December 27 at 14:05 MSK (Moscow time) and as usual Div. 1 participants can join out of competition. Note that round starts in the unusual time!!!

Me and Edvard Davtyan (Edvard) prepared the tasks for this Round.

Great thanks to Gleb Evstropov (GlebsHP) for helping us preparing the contest, to Maria Belova (Delinur) for translating the statements into English and to Mike Mirzayanov (MikeMirzayanov) for the great Polygon platform.

The scoring distribution will be announced later. Good luck everyone!

UPD The start time of the Round is moved on 10 minutes. Score distribution 500-1000-1500-2500-2500

UPD2 Competition completed! Thank you all! Editorial

Full text and comments »

  • Vote: I like it
  • +223
  • Vote: I do not like it

By kuviman, history, 8 years ago, translation, In English

Hello everyone!

Up to this day Codeforces showed local server time everywhere, and programmers all around the world knew exactly what 19:35 Moscow time corresponds to in their time zone. Now it will be much harder for you to make a mistake and skip another round, since you are going to see time in your time zone.

This is what a usual London programmer sees waiting for Codeforces Round #337 (Div. 2):

The problem was not that easy to implement, since many parts of the site are heavily cached, and we had to manipulate time directly in browser using JavaScript.

Thanks for your attention, good luck to all at the next round!

Full text and comments »

  • Vote: I like it
  • +862
  • Vote: I do not like it

By Edvard, history, 8 years ago, translation, In English

Hi, Codeforces!

Educational Codeforces Round 4 will take place on 25 December 2015 at 18:00 MSK for the first and second divisions. You can read about educational rounds here and here. This time a little time has passed since the previous round. Although we planned this round at Monday, we forgot to include it to schedule, so it was appeared only now. So it is the fourth and the last educational round this year.

<Maybe this paragraph will not be changed ever>

The round will be unrated for all users and it will be held with extented ACM ICPC rules. You will have two hours to solve six problems. After that you will have one day to hack any solution you want. You will have access to copy any solution and test it locally.

</Maybe this paragraph will not be changed ever>

This time the round was prepared only by me, Edvard Davtyan. Thanks a lot to MikeMirzayanov for helping to invent the problems. Also thanks in advance to Maria Belova Delinur who will check English statements, when they will be ready :-)

I think this time the problems is simpler than usually, because at first we have too hard problemset and removed the hardest problem and added very simple problem. I hope you will enjoy the problems and solve all of them!

Also I want to wish you Happy New Year!!!

Good luck and have fun!

UPD 1: The first phase is ended, hack the solutions of your opponents!

UPD 2: The editorial is ready.

Full text and comments »

  • Vote: I like it
  • +245
  • Vote: I do not like it

By Balajiganapathi, history, 8 years ago, In English

Background

One of the regionals in India was scheduled to be held at Hindustan University at Chennai on December 17 — 18, 2015. Unfortunately Chennai was stuck by a natural disaster. The entire south India received heavy rainfall and hence there was a lot of flooding at many places including Chennai around that time. Atleast 347 people died in the state of Tamil Nadu (where Chennai is located). The damage due to the floods overall in south India is estimated to be atleast USD 3 Billion. It is the costliest flood in 2015.

Ofcourse, due to this the Chennai regionals was postponed. I think everyone here will agree that this was an unexpected, unprecedent situation and hence it was entirely understandable that the regionals was postponed.

The Blog post

Dr. C J Hwang is the ICPC Asia director. In response to the above postponement he posted a blog article on his blog. You can read it here. Please read it as this post deals with that announcement.

Quote from the blog: "In the 20 years of ACM-ICPC Asia history, we never had the case of contest postponement."

Comment: That is just luck. It is great luck that there never was any problem during any of the Asia regionals during the past 20 years.

Quote from the blog: "Several years ago, Vietnam contest had a flood and I was there. I walked over the deep water.I was wet with pants and shoes. Vietnam committee did not request any postponement."

Comment: Wet pants and shoes, seriously? This seems like a minor water logging not a major, destructive flood.

Quote from the blog: "To avoid any future abuse of asking postponement to cover the un-readiness and the irresponsibility of hosting the contest ..."

Comment: Abuse? What exactly does Dr. Hwang want the organizers to do? How can you conduct a coding contest when there is water 2 storey high? How is this un readiness or irresponsibility? The flights/train/bus service were all stopped so how would the contestants reach the venue? What if something happened to them? There were no proper supply of food/water/electricity during the floods. As someone who has experienced a real flood, I am extremely offended by this statement.

Quote from the blog: "..., I am proposing to insert a few new lines into 2015 Asia rules. These new lines are same as I had approved for Asia Chennai. We have no time for negotiation/discussion and the complexity of calculating Asia site scores prevent us from any other solutions."

Comment: Why no time for negotiation or discussion? Calculating the slots is indeed complicated, but it does not take that much time either. This reason is here just so he can rush the decision before any discussion takes place. This should not be how decisions are taken at ICPC.

You can read the actual rule in the blog itself. Rules are generally passed by a vote. Here is the result of the voting for this rule:

Quote from the blog: "Voting Result: Casting Yes vote – 11 (Including 3 from WC sub-region)

Casting No vote – 1 (Including 1 from WC sub-region)

Implicit Yes vote – 40"

Comment: See that last line? The Implicit Yes vote? It means those who did not vote were automatically considered as "Yes". Yeah, that is how decisions are taken for such an important rule.

Concluding Remark

I have nothing against the rule. But everything against the manner in which it was decided. Also, the remarks about the flood situation reeks of arrogance and a total lack of empathy for the disastrous situation at Chennai. It is really sad that decisions are taken like this at such a prestigious contest like ICPC.

Full text and comments »

  • Vote: I like it
  • +967
  • Vote: I do not like it

By MikeMirzayanov, history, 8 years ago, translation, In English

Hello.

Now you do not have to go into Google if you need to search blog posts. You can do it directly on Codeforces. The implemented search is based on Apache Lucene . The index contains all open public posts, which are already more than 15,000 documents.

Temporarily search for tags are now available (tags will be added to the index soon), but instead you have the opportunity to find posts and even sort using different criteria. By the way, you can use complete syntax of Lucene queries to search. Here is a short description of main features.

You can use several words in query to find by all of them at the same time. In addition, if you are lucky search understands word forms and some synonyms. It supports search by title and author.

Some examples:

  • 305 — search for 305, most probably it will find blogs about the Round 305
  • andrew stankevich contests — search for words "andrew", "stankevich" and "contests" at the same time
  • user:mikemirzayanov title:testlib — search containing "testlib" in title by MikeMirzayanov
  • "vk cup" — use quotes to find phrase as is
  • title:educational search in title

Regarding indexing comments, solutions and problem statements I have a feeling that it may be useless. Too difficult to find something relevant (or maybe not). What do you think: should we implement it?

Full text and comments »

  • Vote: I like it
  • +319
  • Vote: I do not like it

By ed1d1a8d, history, 8 years ago, In English

Greetings! CodeForces Round #336 welcomes both divisions this Wednesday, December 23, 2015 at 16:35:00 UTC. The round is authored by me, Amor727, Chilli, and GlebsHP. We hope you'll like the problems. Scoring and score distribution: Not Dynamic; Div1: 500 — 1250 — 1500 — 2000 — 3000; Div2: 500 — 1000 — 1500 — 2250 — 2500

Much thanks to Amor727 and Chilli for writing and editing problems, GlebsHP for organizing the competition and for his very helpful attitude, Delinur for translations, winger for testing, Marina Kruglikova for statement fixes, and MikeMirzayanov for his amazing CF and Polygon platforms.

During this contest you will be assisting Genos from the series One Punch Man. His master Saitama will also make some appearances. We wish everyone good luck and high rating in assisting the two. From the contest crew and the two fellows below, happy holidays!

Congratulations to the winners:

Division 1:

  1. matthew99

  2. tourist

  3. ACRush

  4. jqdai0815

Division 2:

  1. Hansuzu

  2. ajjack999888

  3. platypus179

  4. Petru

  5. Mihaell

Editorial of round: /blog/entry/22256

Full text and comments »

  • Vote: I like it
  • +427
  • Vote: I do not like it

By Hikari9, history, 8 years ago, In English

It's always a hassle to define our 2D Geometry library during a contest. Is there a way to make our computational geometry lives easier in any way? Fortunately for us, there is, at least in C++, using complex numbers.

Complex numbers are of the form a + bi, where a is the real part and b imaginary. Thus, we can let a be the x-coordinate and b be the y-coordinate. Whelp, complex numbers can be represented as 2D vectors! Therefore, we can use complex numbers to define a point instead of defining the class ourselves. You can look at std::complex reference here.


Defining our point class

We can define our point class by typing typedef complex<double> point; at the start of our program. To access our x- and y-coordinates, we can macro the real() and imag() functions by using #define. Of course, don't forget to #include <complex> before anything.

#include <iostream>
#include <complex>
using namespace std;

// define x, y as real(), imag()
typedef complex<double> point;
#define x real()
#define y imag()

// sample program
int main() {
	point a = 2;
	point b(3, 7);
	cout << a << ' ' << b << endl; // (2, 0) (3, 7)
	cout << a + b << endl;         // (5, 7)
}

Oh goodie! We can use std:cout for debugging! We can also add points as vectors without having to define operator+. Nifty. And apparently, we can overall add points, subtract points, do scalar multiplication without defining any operator. Very nifty indeed.


Example

point a(3, 2), b(2, -7);

// vector addition and subtraction
cout << a + b << endl;   // (5,-5)
cout << a - b << endl;   // (1,9)

// scalar multiplication
cout << 3.0 * a << endl; // (9,6)
cout << a / 5.0 << endl; // (0.6,0.4)


Functions using std::complex

What else can we do with complex numbers? Well, there's a lot that is really easy to code.

  1. Vector addition: a + b

  2. Scalar multiplication: r * a

  3. Dot product: (conj(a) * b).x

  4. Cross product: (conj(a) * b).y

    notice: conj(a) * b = (ax*bx + ay*by) + i (ax*by — ay*bx)

  5. Squared distance: norm(a - b)

  6. Euclidean distance: abs(a - b)

  7. Angle of elevation: arg(b - a)

  8. Slope of line (a, b): tan(arg(b - a))

  9. Polar to cartesian: polar(r, theta)

  10. Cartesian to polar: point(abs(p), arg(p))

  11. Rotation about the origin: a * polar(1.0, theta)

  12. Rotation about pivot p: (a-p) * polar(1.0, theta) + p

    UPD: added more useful functions

  13. Angle ABC: abs(remainder(arg(a-b) - arg(c-b), 2.0 * M_PI))

    remainder normalizes the angle to be between [-PI, PI]. Thus, we can get the positive non-reflex angle by taking its abs value.

  14. Project p onto vector v: v * dot(p, v) / norm(v);

  15. Project p onto line (a, b): a + (b - a) * dot(p - a, b - a) / norm(b - a)

  16. Reflect p across line (a, b): a + conj((p - a) / (b - a)) * (b - a)

  17. Intersection of line (a, b) and (p, q):

point intersection(point a, point b, point p, point q) {
  double c1 = cross(p - a, b - a), c2 = cross(q - a, b - a);
  return (c1 * q - c2 * p) / (c1 - c2); // undefined if parallel
}

Drawbacks

Using std::complex is very advantageous, but it has one disadvantage: you can't use std::cin or scanf. Also, if we macro x and y, we can't use them as variables. But that's rather minor, don't you think?

EDIT: Credits to Zlobober for pointing out that std::complex has issues with integral data types. The library will work for simple arithmetic like vector addition and such, but not for polar or abs. It will compile but there will be some errors in correctness! The tip then is to rely on the library only if you're using floating point data all throughout.

Full text and comments »

  • Vote: I like it
  • +202
  • Vote: I do not like it

By Edvard, history, 8 years ago, translation, In English

Hi, Codeforces!

Educational Codeforces Round 3 will take place on 19 December 2015 at 18:00 MSK for the first and second divisions. You can read about educational rounds here and here. A lot of time have passed since the previous round. I hope that the next rounds will be more regular.

<This paragraph wasn't changed>

The round will be unrated for all users and it will be held with extented ACM ICPC rules. You will have two hours to solve six problems. After that you will have one day to hack any solution you want. You will have access to copy any solution and test it locally.

</This paragraph wasn't changed>

This time the round was prepared not only by me, Edvard Davtyan. Firstly, thanks a lot to Alexey Dergunov dalex who shared one of his problems with well-known idea. Also thanks a lot to Alexandr Frolov fcspartakm, Vitaliy Kudasov kuviman and Arthur Svechnikov ikar for their help in preparing problems. MikeMirzayanov helped us to invent the problems. Also thanks a lot to Maria Belova Delinur for translating the problems from my RussianEnglish to English :-)

I hope you will enjoy the problems.

Good luck and have fun!

UPD1: The first part of competition is over. I hope that you enjoyed the problems. Now you let's hack other solutions :-)

UPD2: The editorial is ready.

UPD3: The round is over. All solutions are rejudged on full testset. The results are final.

UPD4: 6725 rows affected :-)

Full text and comments »

  • Vote: I like it
  • +137
  • Vote: I do not like it

By I_love_Hoang_Yen, 8 years ago, In English

With many regionals around the world finished, I think it is time to start collecting teams that are going to World Final this year. Please help me adding information to the tables :)


Europe

Region Country University Member 1 Member 2 Member 3
NEERC Russia Ural Federal University Um_nik sivukhin Merkurev
NEERC Russia SPb State University Copymaster -XraY- ershov.stanislav
NEERC Russia Moscow Institute of Physics and Technology ifsmirnov Arterm zemen
NEERC Russia Moscow State University Zlobober sankear malcolm
NEERC Russia SPb ITMO University subscriber antonkov enot110
NEERC Russia Nizhny Novgorod State University vepifanov KAN mike_live
NEERC Belarus Belarusian SU of Information and Radioelectronics teleport netman andrew.volchek
NEERC Russia Saratov State University Edvard danilka.pro kuviman
NEERC Russia SPb Academic University Nikitosh ComradePetr egor_bb
NEERC Russia Innopolis University savinov sokian map
NEERC Belarus Belarusian State University kostya_by shef_2318 IFLED
NEERC Russia Moscow Engineering Physics Institute Avitella elshiko bidzilya
NEERC Russia Northern (Arctic) Federal University CleRIC NVAL ?
NEERC Russia Moscow Aviation Institute yarrr mingaleg Timus
CERC Poland University of Warsaw Swistakk Marcin_smu mnbvmar
CERC Poland University of Wrocław bardek Solaris matix2267
CERC Poland Jagiellonian University noh4h_ss krismaz zaj
CERC Slovakia Comenius University jablko Baklazan michal27
CERC Croatia University of Zagreb IvL Mihaell ?
CERC Czech Republic Charles University in Prague Shulik simsa.st zaspagety
NWERC Finland University of Helsinki Laakeri Gomhog gtrrebel
NWERC United Kingdom Imperial College London dancho eudanip mihaipopa12
NWERC Netherlands Utrecht University Philae TimonKnigge RarebitFiend
NWERC Netherlands Radboud University ? ? ?
SEERC Ukraine Zaporizhzhya National Technical University 6eJIa9IzZzTeHb Life_is_good MrDindows
SEERC Ukraine Lviv National University RomaWhite witua Trumen
SEERC Ukraine Taras Shevchenko National University of Kyiv Furko Fdg mgch
SWERC Spain Universitat Politècnica de Catalunya albertnez angargo etal
SWERC Switzerland ETH Zürich ? ? ?

Asia

Count Country/Region University Member 1 Member 2 Member 3
1 Vietnam University of Engineering and Technology — VNU I_love_tigersugar kien_coi_1997 dnk
2 Singapore National University of Singapore I_love_Hoang_Yen flashmt nguyenhungtam
3 Bangladesh Jahangirnagar University nfssdq ndatta raihatneloy
4 Iran Islamic Azad University of Mashhad soshika Elk-Cloner yoones.rezaei
5 China Tsinghua University s-quark zhj dhh1995
6 China Shanghai Jiao Tong University TankEngineer rowdark BaconLi
7 China Peking University lydrainbowcat sy2006 ?
8 China Beihang University sd0061 chffy InheritG
9 China Zhejiang University sfiction J.T.J.L. Yukine_Chris
10 Iran Sharif University of Technology Haghani JeBeK matrix
11 Bangladesh North South University faiyaz26 forthright48 hasib
12 China Zhejiang Normal University ZJiaQ love_master qs1994
13 Vietnam Ho Chi Minh City University of Science lythanh _TMB_ Equanimity
14 Korea Korea University Myungwoo Cauchy_Function dlehdgh
15 Taiwan National Chiao Tung University aaaaajack leopan0922 lclan
16 Bangladesh Shahjalal University of Science & Technology Corei13 PlausibleDeniability J-C
17 China Beijing University of Posts and Telecommunications hiyot wzt_000 beegerous
18 China Tianjin University 452660407 wu6shen jinzhao
19 China Shanghai University curs0r fraud meijun
20 Iran Shahid Beheshti University shamir0xe farzad.shbfn nima.sh
21 Japan The University of Tokyo semiexp phidnight EnumerativeCombinatorics
22 India Indian Institute of Technology Roorkee amankedia1994 kshitijbathla anubhav94
23 Hong Kong The Chinese University of Hong Kong Sampson alex20030190 Nezzar
24 Philippines Ateneo de Manila University kylesky Hikari9 derpidc
25 China Fudan University flydutchman czy941030 Phronesis
26 India Indian Institute of Technology — Bombay harrypotter192 venkat82 nikhilvyas
27 India Indian Institute of Technology Kanpur Team alecsyde sahilgrover abhilak
28 India Indian Institute of Information Technology Allahabad shiva_r31 aditya_kakarot m17
29 Taiwan National Taiwan University step5 darkhh meteor
30 Japan Osaka University __math kyuridenamida ustimaw
31 Japan University of Aizu zukky sate
32 Japan Kyoto University asi1024 takise ojjiy5

Latin America

Count Country University Member 1 Member 2 Member 3
1 Cuba Universidad de la Habana SandorGarcia norge abelramos
2 Brazil State University of Campinas augustomorgan ivanilos tiagob.reis
3 Argentina Universidad de Buenos Aires fredy10 miguelmaurizio SebP
4 Brazil University of São Paulo — SC bssanches tomasf danft
5 Brazil Federal University of Campina Grande fsouza Manoel old_arysson
6 Brazil Federal University of Pernambuco mhss Godely dcms2
7 Brazil Federal University of Bahia johnjq Roberio lbguilherme
8 Brazil University of São Paulo — SP yancouto gafeol gidelfino
9 Venezuela Universidad Simón Bolívar lmn0x4F rubmary mathiassm
10 Mexico Escuela Superior de Cómputo galloska Adonais ChOmPs
11 Peru Universidad Nacional de Ingeniería josue.0 dmansilla07 Victoralin10
12 Cuba Universidad de Oriente bestard epascual ?
13 Argentina Universidad Nacional de Rosario karupayun martinv mariano22
14 Mexico ITESM Campus Monterrey Diego1149 fredy.altamirano CarlosGoogles

Africa & the Middle East

Count Country University Member 1 Member 2 Member 3
1 Egypt Alexandria University naggar RetiredAmrMahmoud OmaaarZ
2 Jordan Princess Sumaya University for Technology Hasan0540 aurevoir AU.Bahosain
3 Egypt Cairo University — FCI ziad.mohamed Baby_Steps Mohammad_Yasser
4 Syria Aleppo University kingofnumbers ? ?
5 Syria Tishreen University samiemad Jarrar majd.gda1
6 Syria Damascus University muaz-32 RedNextCentury ?

North America

Count Country University Member 1 Member 2 Member 3
1 USA University of Central Florida edorundo mkirsche sroyal
2 Canada University of Waterloo y0105w49 azneyes zxqfl
3 USA Virginia Tech PeterASteele pho ChrisWu
4 USA Harvard University scott_wu dnkywin random.johnnyh
5 USA Massachusetts Institute of Technology ecnerwala stevenkplus betaveros
6 USA Carnegie Mellon University nhrubin bluepichu wxyxinyu
7 USA Cornell University saketh victoreis JRossS
8 USA Stanford University superpear ? ?
9 USA California Institute of Technology agural ChingYunH sdhpzhtk
10 USA Rice University tuna_salad ? ?
11 USA University of Illinois at Urbana-Champaign sping128 TiChuot97 victor_gaoxin
12 USA University of Wisconsin — Madison toppykung Ingkarat name
13 USA University of Southern California GodDammit justindcheng windsfantasy6

South Pacific

Count Country University Member 1 Member 2 Member 3
1 Australia The University of Western Australia gozzardam SustainedScreaming
2 Australia University of New South Wales junkbot grundo SpiritsUnite

Full text and comments »

  • Vote: I like it
  • +402
  • Vote: I do not like it