TA的每日心情 | 開心 2015-4-12 10:09 |
---|
簽到天數: 137 天 [LV.7]常住居民III
邁向天堂
蘇多門
- 積分
- 3559
|
發表於 2014-7-23 15:13:03
|
顯示全部樓層
本帖最後由 domen111 於 2014-7-27 18:38 編輯
你的ID:domen111
是否同意竹跡論壇之規範:同意
題目
1.唐宋八大家一詞之「八大家」,源起於何作者之書籍?書籍名稱為?
明初朱右 《八先生文集》
2.下何者為不合理的英文句子,並解釋其原因:
(A).He made a teacher of me.
(B).Peter was at home wherever he was.
(C).Students take it granted to study hard.
3.解方程式
(-1,0)
(-0.5,0.866025)
(-0.5,-0.866025)
(0.5,0.866025)
(0.5,-0.866025)
(1,0)
4.水波屬於哪一種波動?
混合波
5.試寫出下分子之IUPAC名:
CH3CHC(CH3)CH(CH3)2
6.一秒差距等於幾天文單位:
一秒差距 = 206 264.806 天文單位
哈哈,太簡單了,直接右鍵搜尋Google
7.麥克阿瑟於二戰後,在日本受降儀式頒布「一般命令第一號 GENERAL ORDER NO.1」,文中,在中國滿州的日軍應向哪一個單位投降?
遠東蘇軍總司令官
8.台灣有一仿效國外之司法機制,為刑事訴訟之特別程序。該程序的設置,主要目的有兩個:一是糾正裁判錯誤、平反冤獄,二是統一法律見解之適用。試問此程序名為什麼?
9.在歐洲,阿爾卑斯山並未對南北交通造成阻礙,這是因為何種地形的關係所導致?
冰河地形
10.TNFSH Online Judge Q5 Hello World!的AC程式碼
[C++] 純文本查看 復制代碼 #ifndef _GLIBCXX_IOSTREAM
#define xxx blabla
#define _GLIBCXX_IOSTREAM 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <ostream>
#ifndef _GLIBCXX_ISTREAM
#define _GLIBCXX_ISTREAM 1
#pragma GCC system_header
#include <ios>
#include <ostream>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits>
class basic_istream : virtual public basic_ios<_CharT, _Traits>
{
public:
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_ios<_CharT, _Traits> __ios_type;
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
__num_get_type;
typedef ctype<_CharT> __ctype_type;
protected:
streamsize _M_gcount;
public:
explicit
basic_istream(__streambuf_type* __sb)
: _M_gcount(streamsize(0))
{ this->init(__sb); }
virtual
~basic_istream()
{ _M_gcount = streamsize(0); }
class sentry;
friend class sentry;
__istream_type&
operator>>(__istream_type& (*__pf)(__istream_type&))
{ return __pf(*this); }
__istream_type&
operator>>(__ios_type& (*__pf)(__ios_type&))
{
__pf(*this);
return *this;
}
__istream_type&
operator>>(ios_base& (*__pf)(ios_base&))
{
__pf(*this);
return *this;
}
__istream_type&
operator>>(bool& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(short& __n);
__istream_type&
operator>>(unsigned short& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(int& __n);
__istream_type&
operator>>(unsigned int& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(long& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(unsigned long& __n)
{ return _M_extract(__n); }
#ifdef _GLIBCXX_USE_LONG_LONG
__istream_type&
operator>>(long long& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(unsigned long long& __n)
{ return _M_extract(__n); }
#endif
__istream_type&
operator>>(float& __f)
{ return _M_extract(__f); }
__istream_type&
operator>>(double& __f)
{ return _M_extract(__f); }
__istream_type&
operator>>(long double& __f)
{ return _M_extract(__f); }
__istream_type&
operator>>(void*& __p)
{ return _M_extract(__p); }
__istream_type&
operator>>(__streambuf_type* __sb);
streamsize
gcount() const
{ return _M_gcount; }
int_type
get();
__istream_type&
get(char_type& __c);
__istream_type&
get(char_type* __s, streamsize __n, char_type __delim);
__istream_type&
get(char_type* __s, streamsize __n)
{ return this->get(__s, __n, this->widen('\n')); }
__istream_type&
get(__streambuf_type& __sb, char_type __delim);
__istream_type&
get(__streambuf_type& __sb)
{ return this->get(__sb, this->widen('\n')); }
__istream_type&
getline(char_type* __s, streamsize __n, char_type __delim);
__istream_type&
getline(char_type* __s, streamsize __n)
{ return this->getline(__s, __n, this->widen('\n')); }
__istream_type&
ignore(streamsize __n, int_type __delim);
__istream_type&
ignore(streamsize __n);
__istream_type&
ignore();
int_type
peek();
__istream_type&
read(char_type* __s, streamsize __n);
streamsize
readsome(char_type* __s, streamsize __n);
__istream_type&
putback(char_type __c);
__istream_type&
unget();
int
sync();
pos_type
tellg();
__istream_type&
seekg(pos_type);
__istream_type&
seekg(off_type, ios_base::seekdir);
protected:
basic_istream()
: _M_gcount(streamsize(0))
{ this->init(0); }
template<typename _ValueT>
__istream_type&
_M_extract(_ValueT& __v);
};
template<>
basic_istream<char>&
basic_istream<char>::
getline(char_type* __s, streamsize __n, char_type __delim);
template<>
basic_istream<char>&
basic_istream<char>::
ignore(streamsize __n);
template<>
basic_istream<char>&
basic_istream<char>::
ignore(streamsize __n, int_type __delim);
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
basic_istream<wchar_t>&
basic_istream<wchar_t>::
getline(char_type* __s, streamsize __n, char_type __delim);
template<>
basic_istream<wchar_t>&
basic_istream<wchar_t>::
ignore(streamsize __n);
template<>
basic_istream<wchar_t>&
basic_istream<wchar_t>::
ignore(streamsize __n, int_type __delim);
#endif
template<typename _CharT, typename _Traits>
class basic_istream<_CharT, _Traits>::sentry
{
bool _M_ok;
public:
typedef _Traits traits_type;
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef typename __istream_type::__ctype_type __ctype_type;
typedef typename _Traits::int_type __int_type;
explicit
sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
#if __cplusplus >= 201103L
explicit
#endif
#define blabla main
operator bool() const
{ return _M_ok; }
};
#define word "Hello ,"
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
{ return (__in >> reinterpret_cast<char&>(__c)); }
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
{ return (__in >> reinterpret_cast<char&>(__c)); }
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
template<>
basic_istream<char>&
operator>>(basic_istream<char>& __in, char* __s);
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
{ return (__in >> reinterpret_cast<char*>(__s)); }
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
{ return (__in >> reinterpret_cast<char*>(__s)); }
template<typename _CharT, typename _Traits>
class basic_iostream
: public basic_istream<_CharT, _Traits>,
public basic_ostream<_CharT, _Traits>
{
public:
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef basic_ostream<_CharT, _Traits> __ostream_type;
explicit
basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
: __istream_type(__sb), __ostream_type(__sb) { }
virtual
~basic_iostream() { }
protected:
basic_iostream()
: __istream_type(), __ostream_type() { }
};
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
ws(basic_istream<_CharT, _Traits>& __is);
#if __cplusplus >= 201103L
template<typename _CharT, typename _Traits, typename _Tp>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
{ return (__is >> __x); }
#endif
_GLIBCXX_END_NAMESPACE_VERSION
}
#include <bits/istream.tcc>
#endif
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
extern istream cin;
extern ostream cout;
extern ostream cerr;
extern ostream clog;
#ifdef _GLIBCXX_USE_WCHAR_T
extern wistream wcin;
extern wostream wcout;
extern wostream wcerr;
extern wostream wclog;
#endif
static ios_base::Init __ioinit;
_GLIBCXX_END_NAMESPACE_VERSION
}
#endif
#define edd getline
#define edf v::cout
#define abc int
#define v std
abc xxx(){v::string s;v::edd(v::cin,s);edf<<word<<s<<" !\n";}
#ifdef _GLIBCXXY_USE1_WCHAR_T
#ifndef _GLIBCXX_IOSTREAM
#define _GLIBCXX_IOSTREAM 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <ostream>
#ifndef _GLIBCXX_ISTREAM
#define _GLIBCXX_ISTREAM 1
#pragma GCC system_header
#include <ios>
#include <ostream>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits>
class basic_istream : virtual public basic_ios<_CharT, _Traits>
{
public:
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_ios<_CharT, _Traits> __ios_type;
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
__num_get_type;
typedef ctype<_CharT> __ctype_type;
protected:
streamsize _M_gcount;
public:
explicit
basic_istream(__streambuf_type* __sb)
: _M_gcount(streamsize(0))
{ this->init(__sb); }
virtual
~basic_istream()
{ _M_gcount = streamsize(0); }
class sentry;
friend class sentry;
__istream_type&
operator>>(__istream_type& (*__pf)(__istream_type&))
{ return __pf(*this); }
__istream_type&
operator>>(__ios_type& (*__pf)(__ios_type&))
{
__pf(*this);
return *this;
}
__istream_type&
operator>>(ios_base& (*__pf)(ios_base&))
{
__pf(*this);
return *this;
}
__istream_type&
operator>>(bool& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(short& __n);
__istream_type&
operator>>(unsigned short& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(int& __n);
__istream_type&
operator>>(unsigned int& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(long& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(unsigned long& __n)
{ return _M_extract(__n); }
#ifdef _GLIBCXX_USE_LONG_LONG
__istream_type&
operator>>(long long& __n)
{ return _M_extract(__n); }
__istream_type&
operator>>(unsigned long long& __n)
{ return _M_extract(__n); }
#endif
__istream_type&
operator>>(float& __f)
{ return _M_extract(__f); }
__istream_type&
operator>>(double& __f)
{ return _M_extract(__f); }
__istream_type&
operator>>(long double& __f)
{ return _M_extract(__f); }
__istream_type&
operator>>(void*& __p)
{ return _M_extract(__p); }
__istream_type&
operator>>(__streambuf_type* __sb);
streamsize
gcount() const
{ return _M_gcount; }
int_type
get();
__istream_type&
get(char_type& __c);
__istream_type&
get(char_type* __s, streamsize __n, char_type __delim);
__istream_type&
get(char_type* __s, streamsize __n)
{ return this->get(__s, __n, this->widen('\n')); }
__istream_type&
get(__streambuf_type& __sb, char_type __delim);
__istream_type&
get(__streambuf_type& __sb)
{ return this->get(__sb, this->widen('\n')); }
__istream_type&
getline(char_type* __s, streamsize __n, char_type __delim);
__istream_type&
getline(char_type* __s, streamsize __n)
{ return this->getline(__s, __n, this->widen('\n')); }
__istream_type&
ignore(streamsize __n, int_type __delim);
__istream_type&
ignore(streamsize __n);
__istream_type&
ignore();
int_type
peek();
__istream_type&
read(char_type* __s, streamsize __n);
streamsize
readsome(char_type* __s, streamsize __n);
__istream_type&
putback(char_type __c);
__istream_type&
unget();
int
sync();
pos_type
tellg();
__istream_type&
seekg(pos_type);
__istream_type&
seekg(off_type, ios_base::seekdir);
protected:
basic_istream()
: _M_gcount(streamsize(0))
{ this->init(0); }
template<typename _ValueT>
__istream_type&
_M_extract(_ValueT& __v);
};
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int s,q;
int ss[15000];
bool ans[30000]={0};
scanf("%d",&s);
for(int i=0;i<s;i++)
scanf("%d",&ss[i]);
for(int i=0;i<s;i++)
{
if(ss[i]==0)continue;
for(int j=i+1;j<s;j++)
{
if(ss[j]==0)continue;
ans[ss[i]+ss[j]]=1;
}
}
scanf("%d",&q);
while(q--)
{
long long ques;
scanf("%lld",&ques);
if(ans[ques])
printf("Good!\n");
else
printf("So Bad!\n");
}
}
}
template<>
basic_istream<char>&
basic_istream<char>::
getline(char_type* __s, streamsize __n, char_type __delim);
template<>
basic_istream<char>&
basic_istream<char>::
ignore(streamsize __n);
template<>
basic_istream<char>&
basic_istream<char>::
ignore(streamsize __n, int_type __delim);
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
basic_istream<wchar_t>&
basic_istream<wchar_t>::
getline(char_type* __s, streamsize __n, char_type __delim);
template<>
basic_istream<wchar_t>&
basic_istream<wchar_t>::
ignore(streamsize __n);
template<>
basic_istream<wchar_t>&
basic_istream<wchar_t>::
ignore(streamsize __n, int_type __delim);
#endif
template<typename _CharT, typename _Traits>
class basic_istream<_CharT, _Traits>::sentry
{
bool _M_ok;
public:
typedef _Traits traits_type;
typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef typename __istream_type::__ctype_type __ctype_type;
typedef typename _Traits::int_type __int_type;
explicit
sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
#if __cplusplus >= 201103L
explicit
#endif
operator bool() const
{ return _M_ok; }
};
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
{ return (__in >> reinterpret_cast<char&>(__c)); }
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
{ return (__in >> reinterpret_cast<char&>(__c)); }
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
template<>
basic_istream<char>&
operator>>(basic_istream<char>& __in, char* __s);
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
{ return (__in >> reinterpret_cast<char*>(__s)); }
template<class _Traits>
inline basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
{ return (__in >> reinterpret_cast<char*>(__s)); }
template<typename _CharT, typename _Traits>
class basic_iostream
: public basic_istream<_CharT, _Traits>,
public basic_ostream<_CharT, _Traits>
{
public:
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
typedef basic_istream<_CharT, _Traits> __istream_type;
typedef basic_ostream<_CharT, _Traits> __ostream_type;
explicit
basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
: __istream_type(__sb), __ostream_type(__sb) { }
virtual
~basic_iostream() { }
protected:
basic_iostream()
: __istream_type(), __ostream_type() { }
};
template<typename _CharT, typename _Traits>
basic_istream<_CharT, _Traits>&
ws(basic_istream<_CharT, _Traits>& __is);
#if __cplusplus >= 201103L
template<typename _CharT, typename _Traits, typename _Tp>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
{ return (__is >> __x); }
#endif
_GLIBCXX_END_NAMESPACE_VERSION
}
#include <bits/istream.tcc>
#endif
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
extern istream cin;
extern ostream cout;
extern ostream cerr;
extern ostream clog;
#ifdef _GLIBCXX_USE_WCHAR_T
extern wistream wcin;
extern wostream wcout;
extern wostream wcerr;
extern wostream wclog;
#endif
static ios_base::Init __ioinit;
_GLIBCXX_END_NAMESPACE_VERSION
}
#endif
#endif
其他有空再寫
|
評分
-
查看全部評分
|