好多数值
flag格式 flag{}
存档:1.txt
解决方案
下载到很多三个数一行的数据,每个都不超过255,看起来像是图片像素点,尝试质因数分解,然后画出来:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include <fstream> #include <sstream> #include <vector> #include <opencv2/opencv.hpp> int main() { const int WIDTH = 503, HEIGHT = 122; std::ifstream inputFileStream("./1.txt"); cv::Mat img(cv::Size(WIDTH, HEIGHT), CV_8UC3); char buffer[64]; for (int ic = 0; ic < WIDTH; ++ic) { for (int ir = 0; ir < HEIGHT; ++ir) { inputFileStream.getline(buffer, 60); std::stringstream ss(buffer); std::vector<int> value(3); for (int i = 0; i < 3; ++i) { ss >> value[i]; if (ss.peek() == ',') { ss.ignore(); } } img.at<cv::Vec3b>(ir, ic) = cv::Vec3b(cv::saturate_cast<uchar>(value[2]), cv::saturate_cast<uchar>(value[1]), cv::saturate_cast<uchar>(value[0])); } } cv::imwrite("1.png", img); return 0; } |
运行一下:
嗯...补充一下,文档有61136=2*61*503行(直接丢到wolframalpha.com算,安利一下),可以尝试各种宽高组合来画出图片,这回像素点是一列一列来画的有点小坑...(不过应该是我比较菜)