spakk9's blog

By spakk9, history, 4 years ago, In English

I always use long long in my solution , till now i haven't encountered any problem by this . But , i wonder is there any possibility , that a long long can cause error while int do not .

If you are aware of any such concept , please share it , it will be helpful .

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

| Write comment?
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Sometime Memory Limit Exceeds with DP or Graph Implementation, so it's better to use long long only for specific variables which may have chances of integer overflow.

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

    Sometimes you might get TLE.

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it -9 Vote: I do not like it

      Yeah

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

        No, its for long long more running time than int because of long long use 64 bits while int use 32 bits

        • »
          »
          »
          »
          »
          4 years ago, # ^ |
            Vote: I like it -6 Vote: I do not like it

          I have never received a TLE for using long long in my 2 years of coding

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

            *months

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

            LOL,You have only solved 2 problems on CF,might be you have coding experience of 2 years on other platforms.

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

            Ok brother,

            just view these two submission of mine

            86447533 (tle for using Long Long )

            86447489 ( ac using int (define int as ll ) )

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

          Yeah Sir, This can be one of the possible reasons for TLE.

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

Instead of error you may get TLE.