IloveGoodness's blog

By IloveGoodness, history, 9 months ago, In English

Printing ":-)" $$$10^6$$$ times takes about 2.6s in CF (131141089) while it takes just 0.7s in my machine (with 2.4 GHz cpu). I found this issue after tying to solve a problem which required $$$10^6$$$ output lines. My initial blog:

Please take a look at: 4021643 and 6576225. They are exactly same but one runs in 2s the other in 0.1s. Accepted solution was sent 10 month later. Again I submitted same solution after 8 years and got TLE 130976507 while in my computer, runs in just 0.188s

There is a bug in CF compiler for sure, Please solve this issue Mikemizayanov.

Thanks :)

UPDATE: I submitted printing $$$10^6$$$ times program on AtCoder (Link). Here is the result:

Codeforces: 2.6s VS Atcoder: 0.066s

Read more »

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

By IloveGoodness, history, 9 months ago, In English

Dear Codeforces team; MikeMirzayanov, geranazavr555

It would be nice to update Pascal compiler:

Codeforces version: 3.0.2 (Released feb 2017)

Newest version: 3.2.2 (Released may 2021)

Thanks.

Read more »

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

By IloveGoodness, history, 11 months ago, In English

In C++, Graphs with large number of nodes (N > 3000) can be stored using vectors

vector<int> adjanced_nodes[N];
if (an edge exists between u and w)
{
  adjacent_nodes[u].push_back(w);
  adjacent_nodes[w].push_back(u);
} 

Pascal language doesn't have vectors, Can anyone please tell how we can store graphs in Pascal?

UPD: thanks Rifat83 for the solution

Read more »

 
 
 
 
  • Vote: I like it
  • -1
  • Vote: I do not like it