#include #include #include #include using namespace std; int main(){ DIR* dir=opendir("./"); dirent* ent; string name; while(ent=readdir(dir),ent!=NULL){ name=string(ent->d_name); if(name[name.size()-2]=='.' && name[name.size()-1]=='o') break; } ifstream ifs(name.c_str(),ios::binary); char c1,c2,c3,c4,c5; ifs>>c1>>c2>>c3>>c4; while(!ifs.eof()){ ifs>>c5; if(c1=='F' && c2=='L' && c3=='A' && c4=='G' && c5=='_'){ cout<<"FLAG_"; char c; while(ifs>>c , c!=0) cout<