/*
プログラミングのお題スレ Part15
https://m...content-available-to-author-only...h.net/test/read.cgi/tech/1564310397/588
588デフォルトの名無しさん2019/09/28(土) 01:09:55.39ID:HcOq9X6n>>590>>596>>602
お題: 指定のディレクトリ以下にある全てのファイルの更新日時を取得し、曜日毎、及び時間毎にしてグラフにして出せ。
これは同じ曜日の同じ時間で更新されているファイルのカウントということね。例えば今週と先週の土曜日の7:00代の更新ファイルが一つづつあれば土曜日7時代のカウントが2になる。
で、グラフにする時は表示方法はなんでもいいので例えばテキストでアスタリスク2個で出す。(後でこちらでもプログラム作るのでそれ参考にしてもいい)。
ディレクトリの指定方法は普通なら引数での指定が良いだろうけどプログラムに埋め込んでも標準入力やファイルから読み込んでも何でもいい。それはこのお題では肝心な事ではないので。
*/
/*
- 実行環境
Ubuntu 18.04.3 LTS (VMware Workstation 15 Player で仮想化)
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
- 実行例
user@ubuntu:~$ ./a.out
. を読み込み中
./Documents を読み込み中
:
:
:
./Pictures を読み込み中
./Downloads を読み込み中
データ取得完了
HOUR : SUN MON TUE WED THU FRI SAT
00 : 3* 0 0 0 0 0 0
01 : 3* 0 0 0 0 0 0
02 : 0 0 0 0 0 0 0
03 : 0 0 0 0 0 0 0
04 : 0 0 0 0 0 0 0
05 : 0 0 0 0 0 0 0
06 : 0 0 0 0 0 0 0
07 : 0 0 0 0 0 0 0
08 : 0 0 0 0 0 0 0
09 : 0 0 0 0 0 0 0
10 : 1 0 0 0 0 0 0
11 : 1 0 0 0 0 0 0
12 : 4* 0 0 0 1 0 1
13 : 1 0 0 0 0 0 0
14 : 0 0 0 0 0 0 0
15 : 0 0 0 0 2 0 0
16 : 2 0 0 0 0 0 3*
17 : 1 0 0 0 0 0 5**
18 : 2 1 0 0 6** 0 6**
19 : 0 2 2 0 3* 2 9***
20 : 0 0 1 2 0 2 7**
21 : 0 4* 3* 24********** 0 3* 0
22 : 4* 0 5** 3* 1 2 1
23 : 3* 1 2 2 2 1 4*
sum = 138
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#define BUFLEN 256
#define MAXBAR 10 //グラフバーの最大表示文字列数
typedef struct {
int n[ 7 ] [ 24 ] ; //week, hour
//week;(sun == 0, mon == 1, ...)
} hoge_t;
void foo( char [ ] , hoge_t * ) ;
void foo( char ppath[ ] , hoge_t * data) {
DIR * dir;
if ( ( dir = opendir( ppath) ) == NULL) {
return ;
}
struct dirent * dp;
struct stat info;
struct tm * tm;
int wday, hour;
char cpath[ BUFLEN] ;
while ( ( dp = readdir( dir) ) != NULL) {
if ( dp-> d_name[ 0 ] != '.' ) {
strncat ( cpath
, dp
-> d_name
, BUFLEN
) ; if ( stat( cpath, & info) == 0 ) {
if ( S_ISDIR( info.st_mode ) ) {
foo( cpath, data) ;
} else if ( S_ISREG( info.st_mode ) ) {
tm
= localtime ( ( time_t
* ) & info.
st_atim .
tv_sec ) ; wday = tm-> tm_wday;
hour = tm-> tm_hour;
data-> n[ wday] [ hour] ++;
}
}
}
}
closedir( dir) ;
}
void hoge_init( hoge_t * hoge) {
int i, j;
for ( i = 0 ; i < 24 ; i++ ) {
for ( j = 0 ; j < 7 ; j++ ) {
hoge-> n[ j] [ i] = 0 ;
}
}
}
void printch( int len, char c) {
int i;
for ( i = 0 ; i < len; i++ ) {
}
}
void show_hoge_matrix( hoge_t * data) {
int i, j;
int sum = 0 , max = data-> n[ 0 ] [ 0 ] , maxbar = MAXBAR;
const int offset = 1 ;
for ( i = 0 ; i < 24 ; i++ ) {
for ( j = 0 ; j < 7 ; j++ ) {
if ( max < data-> n[ j] [ i] ) {
max = data-> n[ j] [ i] ;
}
sum += data-> n[ j] [ i] ;
}
}
char week[ 7 ] [ 4 ] = { "SUN" , "MON" , "TUE" , "WED" , "THU" , "FRI" , "SAT" } ;
for ( i = 0 ; i < 7 ; i++ ) {
printch( maxbar + offset, ' ' ) ;
}
for ( i = 0 ; i < 24 ; i++ ) {
for ( j = 0 ; j < 7 ; j++ ) {
//printf(",%4.1f%%", (double)data->n[j][i]/sum*100.0);
printch( maxbar * data-> n[ j] [ i] / max, '*' ) ;
printch( maxbar - maxbar * data-> n[ j] [ i] / max, ' ' ) ;
}
}
}
int main( int argc, char * argv[ ] ) {
char path[ BUFLEN] = { } ;
if ( argc <= 1 ) {
} else {
}
hoge_t data;
hoge_init( & data) ;
foo( path, & data) ;
show_hoge_matrix( & data) ;
return 0 ;
}
LyoKICDjg5fjg63jgrDjg6njg5/jg7PjgrDjga7jgYrpoYzjgrnjg6wgUGFydDE1CiAgaHR0cHM6Ly9tLi4uY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuLi5oLm5ldC90ZXN0L3JlYWQuY2dpL3RlY2gvMTU2NDMxMDM5Ny81ODgKCiAgNTg444OH44OV44Kp44Or44OI44Gu5ZCN54Sh44GX44GV44KTMjAxOS8wOS8yOCjlnJ8pIDAxOjA5OjU1LjM5SUQ6SGNPcTlYNm4+PjU5MD4+NTk2Pj42MDIKICDjgYrpoYw6IOaMh+WumuOBruODh+OCo+ODrOOCr+ODiOODquS7peS4i+OBq+OBguOCi+WFqOOBpuOBruODleOCoeOCpOODq+OBruabtOaWsOaXpeaZguOCkuWPluW+l+OBl+OAgeabnOaXpeavjuOAgeWPiuOBs+aZgumWk+avjuOBq+OBl+OBpuOCsOODqeODleOBq+OBl+OBpuWHuuOBm+OAggoKICDjgZPjgozjga/lkIzjgZjmm5zml6Xjga7lkIzjgZjmmYLplpPjgafmm7TmlrDjgZXjgozjgabjgYTjgovjg5XjgqHjgqTjg6vjga7jgqvjgqbjg7Pjg4jjgajjgYTjgYbjgZPjgajjga3jgILkvovjgYjjgbDku4rpgLHjgajlhYjpgLHjga7lnJ/mm5zml6Xjga43OjAw5Luj44Gu5pu05paw44OV44Kh44Kk44Or44GM5LiA44Gk44Gl44Gk44GC44KM44Gw5Zyf5puc5pelN+aZguS7o+OBruOCq+OCpuODs+ODiOOBjDLjgavjgarjgovjgIIKICDjgafjgIHjgrDjg6njg5XjgavjgZnjgovmmYLjga/ooajnpLrmlrnms5Xjga/jgarjgpPjgafjgoLjgYTjgYTjga7jgafkvovjgYjjgbDjg4bjgq3jgrnjg4jjgafjgqLjgrnjgr/jg6rjgrnjgq8y5YCL44Gn5Ye644GZ44CCKOW+jOOBp+OBk+OBoeOCieOBp+OCguODl+ODreOCsOODqeODoOS9nOOCi+OBruOBp+OBneOCjOWPguiAg+OBq+OBl+OBpuOCguOBhOOBhCnjgIIKICDjg4fjgqPjg6zjgq/jg4jjg6rjga7mjIflrprmlrnms5Xjga/mma7pgJrjgarjgonlvJXmlbDjgafjga7mjIflrprjgYzoia/jgYTjgaDjgo3jgYbjgZHjganjg5fjg63jgrDjg6njg6Djgavln4vjgoHovrzjgpPjgafjgoLmqJnmupblhaXlipvjgoTjg5XjgqHjgqTjg6vjgYvjgonoqq3jgb/ovrzjgpPjgafjgoLkvZXjgafjgoLjgYTjgYTjgILjgZ3jgozjga/jgZPjga7jgYrpoYzjgafjga/ogp3lv4Pjgarkuovjgafjga/jgarjgYTjga7jgafjgIIKKi8KLyoKLSDlrp/ooYznkrDlooMKICBVYnVudHUgMTguMDQuMyBMVFMgKFZNd2FyZSBXb3Jrc3RhdGlvbiAxNSBQbGF5ZXIg44Gn5Luu5oOz5YyWKQogIGdjYyB2ZXJzaW9uIDcuNC4wIChVYnVudHUgNy40LjAtMXVidW50dTF+MTguMDQuMSkgCgotIOWun+ihjOS+iwogIHVzZXJAdWJ1bnR1On4kIC4vYS5vdXQKICAuIOOCkuiqreOBv+i+vOOBv+S4rQogIC4vRG9jdW1lbnRzIOOCkuiqreOBv+i+vOOBv+S4rQogICAgOgogICAgOgogICAgOgogIC4vUGljdHVyZXMg44KS6Kqt44G/6L6844G/5LitCiAgLi9Eb3dubG9hZHMg44KS6Kqt44G/6L6844G/5LitCiAg44OH44O844K/5Y+W5b6X5a6M5LqGCiAgCkhPVVIgOiAgU1VOICAgICAgICAgICBNT04gICAgICAgICAgIFRVRSAgICAgICAgICAgV0VEICAgICAgICAgICBUSFUgICAgICAgICAgIEZSSSAgICAgICAgICAgU0FUICAgICAgICAgICAKICAwMCA6ICAzKiAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAwMSA6ICAzKiAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAwMiA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAwMyA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAwNCA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAwNSA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAwNiA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAwNyA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAwOCA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAwOSA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAxMCA6ICAxICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAxMSA6ICAxICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAxMiA6ICA0KiAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDEgICAgICAgICAgICAgMCAgICAgICAgICAgICAxICAgICAgICAgICAKICAxMyA6ICAxICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAxNCA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAxNSA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDIgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAKICAxNiA6ICAyICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAzKiAgICAgICAgICAKICAxNyA6ICAxICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMCAgICAgICAgICAgICA1KiogICAgICAgICAKICAxOCA6ICAyICAgICAgICAgICAgIDEgICAgICAgICAgICAgMCAgICAgICAgICAgICAwICAgICAgICAgICAgIDYqKiAgICAgICAgICAgMCAgICAgICAgICAgICA2KiogICAgICAgICAKICAxOSA6ICAwICAgICAgICAgICAgIDIgICAgICAgICAgICAgMiAgICAgICAgICAgICAwICAgICAgICAgICAgIDMqICAgICAgICAgICAgMiAgICAgICAgICAgICA5KioqICAgICAgICAKICAyMCA6ICAwICAgICAgICAgICAgIDAgICAgICAgICAgICAgMSAgICAgICAgICAgICAyICAgICAgICAgICAgIDAgICAgICAgICAgICAgMiAgICAgICAgICAgICA3KiogICAgICAgICAKICAyMSA6ICAwICAgICAgICAgICAgIDQqICAgICAgICAgICAgMyogICAgICAgICAgIDI0KioqKioqKioqKiAgIDAgICAgICAgICAgICAgMyogICAgICAgICAgICAwICAgICAgICAgICAKICAyMiA6ICA0KiAgICAgICAgICAgIDAgICAgICAgICAgICAgNSoqICAgICAgICAgICAzKiAgICAgICAgICAgIDEgICAgICAgICAgICAgMiAgICAgICAgICAgICAxICAgICAgICAgICAKICAyMyA6ICAzKiAgICAgICAgICAgIDEgICAgICAgICAgICAgMiAgICAgICAgICAgICAyICAgICAgICAgICAgIDIgICAgICAgICAgICAgMSAgICAgICAgICAgICA0KiAgICAgICAgICAKc3VtID0gMTM4CiovCgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RyaW5nLmg+CiNpbmNsdWRlIDx0aW1lLmg+CiNpbmNsdWRlIDxzeXMvdHlwZXMuaD4KI2luY2x1ZGUgPHN5cy9zdGF0Lmg+CiNpbmNsdWRlIDx1bmlzdGQuaD4KI2luY2x1ZGUgPGRpcmVudC5oPgoKI2RlZmluZSBCVUZMRU4gMjU2CiNkZWZpbmUgTUFYQkFSIDEwIC8v44Kw44Op44OV44OQ44O844Gu5pyA5aSn6KGo56S65paH5a2X5YiX5pWwCgp0eXBlZGVmIHN0cnVjdHsKICAgIGludCBuWzddWzI0XTsgLy93ZWVrLCBob3VyCiAgICAvL3dlZWs7KHN1biA9PSAwLCBtb24gPT0gMSwgLi4uKQp9aG9nZV90OwoKdm9pZCBmb28oY2hhciBbXSwgaG9nZV90ICopOwp2b2lkIGZvbyhjaGFyIHBwYXRoW10sIGhvZ2VfdCAqZGF0YSl7CiAgICBwcmludGYoIiVzIOOCkuiqreOBv+i+vOOBv+S4rVxuIixwcGF0aCk7CiAgICBESVIgKmRpcjsKICAgIGlmKChkaXIgPSBvcGVuZGlyKHBwYXRoKSkgPT0gTlVMTCl7CgkJcmV0dXJuOwogICAgfSAgICAKICAgIHN0cnVjdCBkaXJlbnQgKmRwOwogICAgc3RydWN0IHN0YXQgaW5mbzsKICAgIHN0cnVjdCB0bSAqdG07CiAgICBpbnQgd2RheSxob3VyOwogICAgY2hhciBjcGF0aFtCVUZMRU5dOwoKICAgIHdoaWxlICgoZHAgPSByZWFkZGlyKGRpcikpICE9IE5VTEwpewogICAgICAgIGlmKGRwLT5kX25hbWVbMF0gIT0gJy4nKXsKICAgICAgICAgICAgbWVtc2V0KGNwYXRoLCAwLCBCVUZMRU4pOwogICAgICAgICAgICBzdHJuY3B5KGNwYXRoLCBwcGF0aCwgQlVGTEVOKTsKICAgICAgICAgICAgc3RybmNhdChjcGF0aCwgIi8iLCBCVUZMRU4pOwogICAgICAgICAgICBzdHJuY2F0KGNwYXRoLCBkcC0+ZF9uYW1lLCBCVUZMRU4pOyAgICAgICAgICAgIAogICAgICAgICAgICBpZihzdGF0KGNwYXRoLCAmaW5mbykgPT0gMCl7CiAgICAgICAgICAgICAgICBpZihTX0lTRElSKGluZm8uc3RfbW9kZSkpewogICAgICAgICAgICAgICAgICAgIGZvbyhjcGF0aCwgZGF0YSk7CiAgICAgICAgICAgICAgICB9ZWxzZSBpZihTX0lTUkVHKGluZm8uc3RfbW9kZSkpewogICAgICAgICAgICAgICAgICAgIHRtID0gbG9jYWx0aW1lKCh0aW1lX3QqKSZpbmZvLnN0X2F0aW0udHZfc2VjKTsKICAgICAgICAgICAgICAgICAgICB3ZGF5ID0gdG0tPnRtX3dkYXk7CiAgICAgICAgICAgICAgICAgICAgaG91ciA9IHRtLT50bV9ob3VyOwogICAgICAgICAgICAgICAgICAgIGRhdGEtPm5bd2RheV1baG91cl0rKzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0gICAgICAgIAogICAgfQogICAgY2xvc2VkaXIoZGlyKTsKfQoKdm9pZCBob2dlX2luaXQoaG9nZV90ICpob2dlKXsKICAgIGludCBpLGo7CiAgICBmb3IoaSA9IDA7IGkgPCAyNDsgaSsrKXsKICAgICAgICBmb3IoaiA9IDA7IGogPCA3OyBqKyspewogICAgICAgICAgICBob2dlLT5uW2pdW2ldID0gMDsKICAgICAgICB9CiAgICB9Cn0KCnZvaWQgcHJpbnRjaChpbnQgbGVuLCBjaGFyIGMpewogICAgaW50IGk7CiAgICBmb3IoaSA9IDA7IGkgPCBsZW47IGkrKyl7CiAgICAgICAgcHV0Y2hhcihjKTsKICAgIH0KfQoKdm9pZCBzaG93X2hvZ2VfbWF0cml4KGhvZ2VfdCAqZGF0YSl7CiAgICBpbnQgaSxqOwogICAgaW50IHN1bSA9IDAsIG1heCA9IGRhdGEtPm5bMF1bMF0sIG1heGJhciA9IE1BWEJBUjsKICAgIGNvbnN0IGludCBvZmZzZXQgPSAxOwogICAgCiAgICBmb3IoaSA9IDA7IGkgPCAyNDsgaSsrKXsKICAgICAgICBmb3IoaiA9IDA7IGogPCA3OyBqKyspewogICAgICAgICAgICBpZihtYXggPCBkYXRhLT5uW2pdW2ldKXsKICAgICAgICAgICAgICAgIG1heCA9IGRhdGEtPm5bal1baV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3VtICs9IGRhdGEtPm5bal1baV07CiAgICAgICAgfQogICAgfQogICAgY2hhciB3ZWVrWzddWzRdID0geyJTVU4iLCJNT04iLCJUVUUiLCJXRUQiLCJUSFUiLCJGUkkiLCJTQVQifTsKICAgIHByaW50ZigiSE9VUiA6ICAiKTsKICAgIGZvcihpID0gMDsgaSA8IDc7IGkrKyl7CiAgICAgICAgcHJpbnRmKCIlcyIsIHdlZWtbaV0pOwogICAgICAgIHByaW50Y2gobWF4YmFyICsgb2Zmc2V0LCAnICcpOwogICAgfQogICAgcHV0cygiIik7CiAgICAKICAgIGZvcihpID0gMDsgaSA8IDI0OyBpKyspewogICAgICAgIHByaW50ZigiICAlMDJkIDoiICwgaSk7CiAgICAgICAgZm9yKGogPSAwOyBqIDwgNzsgaisrKXsKICAgICAgICAgICAgcHJpbnRmKCIlM2QiLCBkYXRhLT5uW2pdW2ldKTsKICAgICAgICAgICAgLy9wcmludGYoIiwlNC4xZiUlIiwgKGRvdWJsZSlkYXRhLT5uW2pdW2ldL3N1bSoxMDAuMCk7CiAgICAgICAgICAgIAogICAgICAgICAgICBwcmludGNoKG1heGJhciAqIGRhdGEtPm5bal1baV0gLyBtYXgsICcqJyk7CiAgICAgICAgICAgIHByaW50Y2gobWF4YmFyIC0gbWF4YmFyICogZGF0YS0+bltqXVtpXSAvIG1heCwgJyAnKTsKICAgICAgICAgICAgcHJpbnRmKCIgIik7CiAgICAgICAgfQogICAgICAgIHB1dHMoIiIpOwogICAgfQogICAgcHJpbnRmKCJzdW0gPSAlZFxuIixzdW0pOwp9CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqYXJndltdKXsKICAgIGNoYXIgcGF0aFtCVUZMRU5dID0ge307CiAgICBpZihhcmdjIDw9IDEpewogICAgICAgIHN0cm5jcHkocGF0aCwgIi4iLCBCVUZMRU4pOwogICAgfWVsc2V7CiAgICAgICAgc3RybmNweShwYXRoLCBhcmd2WzFdLCBCVUZMRU4pOwogICAgfQogICAgaG9nZV90IGRhdGE7CiAgICBob2dlX2luaXQoJmRhdGEpOwogICAgZm9vKHBhdGgsICZkYXRhKTsKICAgIHB1dHMoIuODh+ODvOOCv+WPluW+l+WujOS6hlxuIik7CiAgICBzaG93X2hvZ2VfbWF0cml4KCZkYXRhKTsKICAgIHJldHVybiAwOwp9