ZOJ 2186 Keep on Truckin'

来源:互联网 发布:程思佳淘宝小模特女童 编辑:程序博客网 时间:2024/05/21 10:42
//2186Keep on Truckin'#include <iostream>#include <stdio.h>#define FILE_DEBUG#ifdef FILE_DEBUG#include <fstream>#endifusing namespace std;int main(int argc, char *argv[]){#ifdef FILE_DEBUG ifstream fin; fin.open("input.txt"); cin.rdbuf(fin.rdbuf()); // assign file's streambuf to cin#ifdef _C_LAN_ freopen("input.txt", "r", stdin);#endif#endif#ifdef FILE_DEBUG ofstream fout; fout.open("output.txt"); cout.rdbuf(fout.rdbuf()); // assign file's streambuf to cout#ifdef _C_LAN_ freopen("output.txt", "w", stdout);#endif#endif      int height;      bool if_crash = false;      while (cin >> height)      {            if (height <= 168)            {               cout << "CRASH " << height << endl;               if_crash = true;               break;            }      }      if (if_crash == false)      {                cout << "NO CRASH" << endl;      }    return 0;}
原创粉丝点击