Skip to main content
Commonmark migration
Source Link

#C, 121 122 114 bytes

C, 121 122 114 bytes

Shaved of 8 bytes thanks to @xsot!

a[99],i,k;main(c){for(;read(0,&c,!k);c%7&2?k|=a[i--]^c/9:(a[++i]=c/9))k|=!strchr("()[]{}<>",c);putchar(48+!k*!i);}

Uses a stack.

#C, 121 122 114 bytes

Shaved of 8 bytes thanks to @xsot!

a[99],i,k;main(c){for(;read(0,&c,!k);c%7&2?k|=a[i--]^c/9:(a[++i]=c/9))k|=!strchr("()[]{}<>",c);putchar(48+!k*!i);}

Uses a stack.

C, 121 122 114 bytes

Shaved of 8 bytes thanks to @xsot!

a[99],i,k;main(c){for(;read(0,&c,!k);c%7&2?k|=a[i--]^c/9:(a[++i]=c/9))k|=!strchr("()[]{}<>",c);putchar(48+!k*!i);}

Uses a stack.

Rollback to Revision 4
Source Link
mIllIbyte
  • 1.2k
  • 8
  • 14

#C, 121 122 114 111114 bytes

Shaved of 8 118 bytes thanks to @xsot!

a[99],i;maini,k;main(c){for(;read(0,&c,1!k);c%7&2?i+=a[i]^ck|=a[i--]^c/9?1:-1:(a[++i]=c/9))i+=k|=!strchr("()[]{}<>",c);putchar(48+!k*!i);}

Uses a stack.

#C, 121 122 114 111 bytes

Shaved of 8 11 bytes thanks to @xsot!

a[99],i;main(c){for(;read(0,&c,1);c%7&2?i+=a[i]^c/9?1:-1:(a[++i]=c/9))i+=!strchr("()[]{}<>",c);putchar(48+!i);}

Uses a stack.

#C, 121 122 114 bytes

Shaved of 8 bytes thanks to @xsot!

a[99],i,k;main(c){for(;read(0,&c,!k);c%7&2?k|=a[i--]^c/9:(a[++i]=c/9))k|=!strchr("()[]{}<>",c);putchar(48+!k*!i);}

Uses a stack.

added 16 characters in body
Source Link
mIllIbyte
  • 1.2k
  • 8
  • 14

#C, 121 122 114114 111 bytes

Shaved of 88 11 bytes thanks to @xsot!

a[99],i,k;maini;main(c){for(;read(0,&c,!k1);c%7&2?k|=a[i--]^ci+=a[i]^c/9?1:-1:(a[++i]=c/9))k|=i+=!strchr("()[]{}<>",c);putchar(48+!k*!i);}

Uses a stack.

#C, 121 122 114 bytes

Shaved of 8 bytes thanks to @xsot!

a[99],i,k;main(c){for(;read(0,&c,!k);c%7&2?k|=a[i--]^c/9:(a[++i]=c/9))k|=!strchr("()[]{}<>",c);putchar(48+!k*!i);}

Uses a stack.

#C, 121 122 114 111 bytes

Shaved of 8 11 bytes thanks to @xsot!

a[99],i;main(c){for(;read(0,&c,1);c%7&2?i+=a[i]^c/9?1:-1:(a[++i]=c/9))i+=!strchr("()[]{}<>",c);putchar(48+!i);}

Uses a stack.

added 53 characters in body
Source Link
mIllIbyte
  • 1.2k
  • 8
  • 14
Loading
added 12 characters in body
Source Link
mIllIbyte
  • 1.2k
  • 8
  • 14
Loading
Source Link
mIllIbyte
  • 1.2k
  • 8
  • 14
Loading