标签:style blog io color ar os sp div on
#include <cstdio> #include <cstdlib> using namespace std; int main() { bool tbl[256] = {0}; char line[10009]; int len = 0; char ch; while (true) { scanf("%c", &ch); if (ch == ‘\n‘) break; line[len++] = ch; } line[len] = ‘\0‘; while (true) { scanf("%c", &ch); if (ch == ‘\n‘) break; tbl[ch] = true; } int wpos = 0, rpos = 0; while (rpos < len) { ch = line[rpos++]; if (tbl[ch]) { continue; } line[wpos++] = ch; } line[wpos] = ‘\0‘; printf("%s", line); return 0; }
水一发了
标签:style blog io color ar os sp div on
原文地址:http://www.cnblogs.com/lailailai/p/4083564.html