#include <stdio.h> #include <string.h> char input[100000], pro[100000]; int rmv(char *a, char c) { int i, z, len=strlen(a); for (i=0 ; i<len ; i++) { if (a[i]==c) a[i]='\\'; } for (i=0, z=1 ; i<len ; i++) { if (a[i]!='0' && a[i]!='\\') z=0; if (!z && a[i]!='\\') putchar(a[i]); } if (z) printf("0"); putchar('\n'); return 0; } int main() { char c; while (gets(input)) { if (!strcmp("0 0",input)) break; sscanf(input,"%c %s",&c,pro); rmv(pro,c); } return 0; }
Sunday, October 23, 2011
[UVa] 11830 - Contract Revision
Subscribe to:
Post Comments (Atom)
Connect Rapoo MT750S with Linux (Tested on Manjaro)
I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...
-
I like coding a lot, keeps me glued to the PC for hours. For that reason it's a need to edit the Syntax Highlighter to suit my eyes for...
-
I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...
-
Install MinGW GCC Port on Windows. 1. Just go to this address [ http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ ]...
No comments:
Post a Comment
Post your comment here. If you want to say something about programming problems, scripts, software etc, please try to be as descriptive as possible.