From 002b8598ba3a0e8c7ddff481f22d265ec56034e7 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Mon, 24 Oct 2016 16:35:05 +0800 Subject: [PATCH] Create 1862.cpp --- QUSTOJ/1862.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 QUSTOJ/1862.cpp diff --git a/QUSTOJ/1862.cpp b/QUSTOJ/1862.cpp new file mode 100644 index 0000000..78395db --- /dev/null +++ b/QUSTOJ/1862.cpp @@ -0,0 +1,30 @@ +#include +using namespace std; + +class clockx +{ +public: + +private: + int y,m,d; + int h,min,s; + friend istream& operator >> (istream& is,clockx& c); + friend ostream& operator << (ostream& os,clockx& c); +}; +istream& operator >> (istream& is,clockx& c) +{ + is>>c.y>>c.m>>c.d>>c.h>>c.min>>c.s; + return is; +} +ostream& operator << (ostream& os,clockx& c) +{ + os<>s; + cout<