ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1027. D++ Again

Show all messages Hide all messages

char s[16384] ;
unsigned n = 0;

 //  AC  0.001s with this code.
    for(int c = std::getc(stdin); c != EOF; c = std::getc(stdin))
       s[n++] = c;

// and AC 0.015s with   n = fread(s,1,sizeof(s)-1,stdin);  code.

// I'm wonder that  the std::getc faster than fread!!