darkrace's blog

By darkrace, 9 years ago, In English

hii everyone..i am new here...wer can i ask doubts regarding any problems??i am not seeing any active dicussion about problems.

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

| Write comment?
»
9 years ago, # |
Rev. 2   Vote: I like it +9 Vote: I do not like it

You can ask them just in these posts — it is the most usual way. However try to respect English language to increase chance of being answered, instead of being severely downvoted ;-)

»
9 years ago, # |
  Vote: I like it -46 Vote: I do not like it

You are not only new, you are also very stupid.

»
9 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

Each problem here was a part of contest. When you solve a problem , see the tutorial , probably you will find some contestants who was discussing these problems after each contest. And as RodionGork said , try to respect English language to increase chance of being answered. Welcome to Codeforces =)

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

As Druid mentioned you can always look up the tutorial for a problem that was in a competition here, but you can also always ask any questions about any problems you encounter at all, in just these posts (blogs). Codeforces community is friendly and helpful, I have asked questions myself and someone always had the right answer, so if there is any task you are struggling with you can always ask here for help. As previously mentioned, try describing the problem you have in proper English so people can understand and help you (it also irritates a lot of people when they see posts with bad English), and I'm sure you will get the answers you are looking for.

Welcome to Codeforces! :)

»
2 years ago, # |
  Vote: I like it -6 Vote: I do not like it

What is the means of this in any program #define mod 998244353

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    if you want to use the value 998244353 anywhere in your code you can write mod instead of writing 998244353.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      Like helping someone is a crime here.Why down-votes?

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      You will have to define this value as mod you cannot use it otherwise as per my knowledge

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        No, "mod" is just a name given to that number, you can name it anything you like. As #define is a preprocessor command, so every instance of "mod" will be replaced by 998244353 before compiling.

        • »
          »
          »
          »
          »
          2 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          That's what I was saying that you will have to define it using #define mod 998244353 or you can use it like int mod=998244353

»
2 years ago, # |
  Vote: I like it +6 Vote: I do not like it

What is the different between 1. v.push_back({v[i].first, v[i].second + 1}); Vs 2. v.push_back((v[i].first, v[i].second + 1));

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +25 Vote: I do not like it
    1. Inserts a pair in a vector
    2. Throws an error
  • »
    »
    2 years ago, # ^ |
    Rev. 2   Vote: I like it +5 Vote: I do not like it
    1. is wrong, an alternative that is right is
     v.push_back(make_pair(v[i].first, v[i].second + 1));
    

    Edit- I know 1 is not wrong, 2 is wrong, but somehow idk how to fix it, see my reply below for more context

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      1 isn't wrong. The following works fine.

      Spoiler
      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it +11 Vote: I do not like it

        Yeah, ur right, I know 1 works which is why I thought i had mistyped it but infact i had written it correctly and cf somehow changed it, idk This link will explain better . Am i missing something obvious here?

        • »
          »
          »
          »
          »
          2 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          that's funny, I think it got confused with markdown for a numbered list and those forcibly start at 1

        • »
          »
          »
          »
          »
          2 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          I played around with it a bit. Looks like it's treating 2. as the start of a list and substituting the html with a list wrapper. Seems to cause the same result whenever you put a number followed by a . on a new line followed by some text. 255. a becomes.

          1. a
  • »
    »
    2 years ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    Or you could also use: v.emplace_back(v[i].first, v[i].second + 1)

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anybody help in solving the spoj problem shamreen and the lost array? https://www.spoj.com/problems/MOZSATLA/ please help me i have litterally wasted my 2 days