結果
問題 | No.3010 Print inside /bin |
ユーザー | Kmcode1 |
提出日時 | 2015-05-04 00:12:50 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 993 bytes |
コンパイル時間 | 1,057 ms |
コンパイル使用メモリ | 98,204 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-19 05:48:16 |
合計ジャッジ時間 | 1,606 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
ソースコード
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<cctype> #include<cstdlib> #include<algorithm> #include<bitset> #include<vector> #include<list> #include<deque> #include<queue> #include<map> #include<set> #include<stack> #include<cmath> #include<sstream> #include<fstream> #include<iomanip> #include<ctime> #include<complex> #include<functional> #include<climits> #include<cassert> #include<iterator> #include<valarray> //#include<bits/stdc++.h> using namespace std; //#include <iostream> //#include <cstdlib> #include <dirent.h> int main() { const char* path = "/bin"; DIR *dp; // ディレクトリへのポインタ dirent* entry; // readdir() で返されるエントリーポイント dp = opendir(path); if (dp == NULL) exit(1); do { entry = readdir(dp); if (entry != NULL)exit(0); stringstream aa; aa << (entry->d_name); if (aa.str()[0] == '.'){ continue; } cout << aa.str()[0] << endl; } while (entry != NULL); return 0; }