Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
  1. Fast I/O

     std::ios_base::sync_with_stdio(false);
    

Or use getchar_unlocked() and putchar_unlocked() (this should do it)

getchar_unlocked > scanf > cin

  1. Use std::sort over qsortUse std::sort over qsort
  1. Fast I/O

     std::ios_base::sync_with_stdio(false);
    

Or use getchar_unlocked() and putchar_unlocked() (this should do it)

getchar_unlocked > scanf > cin

  1. Use std::sort over qsort
  1. Fast I/O

     std::ios_base::sync_with_stdio(false);
    

Or use getchar_unlocked() and putchar_unlocked() (this should do it)

getchar_unlocked > scanf > cin

  1. Use std::sort over qsort
added 10 characters in body
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237
  1. FAST IO Fast I/O

    std::ios_base::sync_with_stdio(false);

     std::ios_base::sync_with_stdio(false);
    

Or use getchar_unlocked() and putchar_unlocked()getchar_unlocked() and putchar_unlocked() (Thisthis should do it)

getchar_unlocked > scanf > cin

getchar_unlocked > scanf > cin

  1. Use std::sort over quick sort. (http://stackoverflow.com/questions/4708105/performance-of-qsort-vs-stdsortUse std::sort over qsort)
  1. FAST IO

    std::ios_base::sync_with_stdio(false);

Or use getchar_unlocked() and putchar_unlocked() (This should do it)

getchar_unlocked > scanf > cin

  1. Use std::sort over quick sort. (http://stackoverflow.com/questions/4708105/performance-of-qsort-vs-stdsort)
  1. Fast I/O

     std::ios_base::sync_with_stdio(false);
    

Or use getchar_unlocked() and putchar_unlocked() (this should do it)

getchar_unlocked > scanf > cin

  1. Use std::sort over qsort
added 35 characters in body
Source Link
  1. FAST IO

    FAST IO

    std::ios_base::sync_with_stdio(false);

std::ios_base::sync_with_stdio(false);

Or use getchar_unlocked() and putchar_unlocked() (This should do it)

getchar_unlocked > scanf > cin

  1. Use std::sort over quick sort. (http://stackoverflow.com/questions/4708105/performance-of-qsort-vs-stdsort)
  1. FAST IO

std::ios_base::sync_with_stdio(false);

Or use getchar_unlocked() and putchar_unlocked() (This should do it)

  1. Use std::sort over quick sort. (http://stackoverflow.com/questions/4708105/performance-of-qsort-vs-stdsort)
  1. FAST IO

    std::ios_base::sync_with_stdio(false);

Or use getchar_unlocked() and putchar_unlocked() (This should do it)

getchar_unlocked > scanf > cin

  1. Use std::sort over quick sort. (http://stackoverflow.com/questions/4708105/performance-of-qsort-vs-stdsort)
added 129 characters in body; added 28 characters in body
Source Link
Loading
Source Link
Loading