I searched online for some time, but was unable to find any information for the 2018-19 season. This is my first time, so can someone experienced help me out?

Thanks!

Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years.
×

# | User | Rating |
---|---|---|

1 | MiFaFaOvO | 3681 |

2 | tourist | 3496 |

3 | apiadu | 3438 |

4 | TLE | 3356 |

5 | LHiC | 3339 |

6 | mnbvmar | 3281 |

7 | 300iq | 3267 |

8 | Radewoosh | 3242 |

9 | yosupo | 3233 |

10 | 1919810 | 3203 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 190 |

2 | antontrygubO_o | 186 |

3 | tourist | 182 |

4 | Radewoosh | 168 |

4 | vovuh | 168 |

6 | pikmike | 166 |

7 | ko_osaga | 161 |

7 | Um_nik | 161 |

9 | rng_58 | 155 |

10 | Petr | 154 |

I searched online for some time, but was unable to find any information for the 2018-19 season. This is my first time, so can someone experienced help me out?

Thanks!

During today’s round, a bug occurred where someone else’s code was submitted as mine. Specifically, it was this submission — http://codeforces.com/contest/618/submission/15652895 While submitting, I chose the language as Python 3, and it gave a compile error on last line.

I submitted again with my code, and this time it worked.

According to this — it is a C++11 feature http://www.cplusplus.com/reference/string/to_string/

Here is a description of the problem:

Sorting a Three-Valued Sequence IOI'96 — Day 2

Sorting is one of the most frequently performed computational tasks. Consider the special sorting problem in which the records to be sorted have at most three different key values. This happens for instance when we sort medalists of a competition according to medal value, that is, gold medalists come first, followed by silver, and bronze medalists come last.

In this task the possible key values are the integers 1, 2 and 3. The required sorting order is non-decreasing. However, sorting has to be accomplished by a sequence of exchange operations. An exchange operation, defined by two position numbers p and q, exchanges the elements in positions p and q.

You are given a sequence of key values. Write a program that computes the minimal number of exchange operations that are necessary to make the sequence sorted.

A small hint would be appreciated! I want to solve the problem myself, not have someone else solve it for me :D

In one problem I was doing, I was getting WA because of some modulo error. In particular, I had a cumulative frequency array which I had defined as:

`cf[i]=cf[i-1]+f[i];`

where f[i] was always positive.

Later, there was a sequence of range queries to answer, so I did:

`cout << cf[r]-cf[l-1]`

for each query; L, R were the range boundaries (both inclusive).

However, the problem stated to report the answer modulo 1000000007, so I changed my queries to:

`cout << (cf[r]-cf[l-1]%MOD)%MOD;`

.

But on seeing the intended solution, I saw that the correct query was :

`cout<<(cf[r]-cf[l-1]+MOD)%MOD;`

I am unable to understand this, because what I knew was that (a-b)%m = (a%m-b%m)%m

Can please someone explain this to me?

Thanks!! Any help is appreciated.

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Feb/26/2020 19:57:21 (f3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|