fork download
  1. FILE* fin=fopen("fisier.in","r");
  2. const unsigned maxb=30000192;
  3. char buf[maxb];
  4. unsigned ptr=maxb;
  5.  
  6. inline unsigned getInt(){
  7. unsigned nr=0;
  8. while(buf[ptr]<'0'||'9'<buf[ptr])
  9. if(++ptr>=maxb)
  10. fread(buf,maxb,1,fin),ptr=0;
  11. while('0'<=buf[ptr]&&buf[ptr]<='9'){
  12. nr=nr*10+buf[ptr]-'0';
  13. if(++ptr>=maxb)
  14. fread(buf,maxb,1,fin),ptr=0;
  15. }
  16. return nr;
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:1: error: unknown type name ‘FILE’
 FILE* fin=fopen("fisier.in","r");
 ^~~~
prog.c:1:11: warning: implicit declaration of function ‘fopen’ [-Wimplicit-function-declaration]
 FILE* fin=fopen("fisier.in","r");
           ^~~~~
prog.c:1:11: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
prog.c:1:11: error: initializer element is not constant
prog.c:3:6: error: variably modified ‘buf’ at file scope
 char buf[maxb];
      ^~~
prog.c:4:14: error: initializer element is not constant
 unsigned ptr=maxb;
              ^~~~
prog.c: In function ‘getInt’:
prog.c:10:9: warning: implicit declaration of function ‘fread’ [-Wimplicit-function-declaration]
         fread(buf,maxb,1,fin),ptr=0;
         ^~~~~
stdout
Standard output is empty