我rateing 935,倒一了!!!
我把自己搞死了
新博客
关于12956Markdown是不是没做好
新博客
# [HAOI2012] 外星人
## 题目描述
艾莉欧在她的被子上发现了一个数字 $N$,她觉得只要找出最小的 $x$ 使得,$\varphi^x(N) = 1$。根据这个 $x$ 她就能找到曾经绑架她的外星人的线索了。当然,她是不会去算,请你帮助她算出最小的 $x$。
## 输入格式
第一行一个正整数 $\mathrm{test}$,接下来 $\mathrm{test}$ 组数据每组数据第一行一个正整数 $m$,接下来 $m$ 行每行两个正整数 $p_i, q_i$
其中 $\displaystyle \prod_{i = 1}^{m} p_i^{q_i}$ 为 $N$ 的标准分解形式。
$\prod$ 为连乘
$\varphi^x(N)$ 表示嵌套 $x$ 次,不是幂
## 输出格式
输出 $\mathrm{test}$ 行,每行一个整数,表示答案。
## 样例 #1
### 样例输入 #1
1 2 2 2 3 1
### 样例输出 #1
3
## 提示
$30\%$ 的数据,$N \le 10^6$。
$60\%$ 的数据,$x \le 100$。
$100\%$ 的数据,$\mathrm{test} \le 50$,$1 \le p_i \le {10}^5$,$1 \le q_i \le {10}^9$,$m \le 2000$。
$\varphi$ 为欧拉函数,$\varphi(n)$ 即小于等于 $n$ 的数中与 $n$ 互质的数的个数。
提示:$\varphi(\prod_{i=1}^mp_i^{q_i})=\prod_{i=1}^m(p_i-1)*p_i^{q_i-1}$。
新幻灯片
新幻灯片
洛谷上的外星人VShelloworld上的外星人
洛谷:
P2350 [HAOI2012] 外星人
题目描述
艾莉欧在她的被子上发现了一个数字 $N$,她觉得只要找出最小的 $x$ 使得,$\varphi^x(N) = 1$。根据这个 $x$ 她就能找到曾经绑架她的外星人的线索了。当然,她是不会去算,请你帮助她算出最小的 $x$。
输入格式
第一行一个正整数 $\mathrm{test}$,接下来 $\mathrm{test}$ 组数据每组数据第一行一个正整数 $m$,接下来 $m$ 行每行两个正整数 $p_i, q_i$
其中 $\displaystyle \prod_{i = 1}^{m} p_i^{q_i}$ 为 $N$ 的标准分解形式。
$\prod$ 为连乘
$\varphi^x(N)$ 表示嵌套 $x$ 次,不是幂
输出格式
输出 $\mathrm{test}$ 行,每行一个整数,表示答案。
样例 #1
样例输入 #1
1
2
2 2
3 1
样例输出 #1
3
提示
$30\%$ 的数据,$N \le 10^6$。
$60\%$ 的数据,$x \le 100$。
$100\%$ 的数据,$\mathrm{test} \le 50$,$1 \le p_i \le {10}^5$,$1 \le q_i \le {10}^9$,$m \le 2000$。
$\varphi$ 为欧拉函数,$\varphi(n)$ 即小于等于 $n$ 的数中与 $n$ 互质的数的个数。
提示:$\varphi(\prod_{i=1}^mp_i^{q_i})=\prod_{i=1}^m(p_i-1)*p_i^{q_i-1}$。
helloworld:
1342 [HAOI2012]外星人
题目描述
输入格式:
π为连乘
输出格式:
输出test行,每行一个整数,表示答案。
输入样例#1:
1
2
2 2
3 1
输出样例#1:
3
#1342是什么鬼???
1342谁会啊
求助大佬
题目描述是空的!!!
输入格式:π为连乘???啥意思啊
输出格式:输出test行,每行一个整数,表示答案
text 是啥
输入
1
2
2 2
3 1
为啥输出 3???
就std做过,还AC了
老师
写具体点不行吗???
还是题目就这样???
@zuotingting
@muyi
@乙鸟
@harrypan
@MEI_LI
@zyzy
@所有大佬
新博客
#ifndef _GLIBCXX_IOSTREAM
#define _GLIBCXX_IOSTREAM 1
#pragma GCC system_header
#include <bits/c++config.h>
#ifndef _GLIBCXX_OSTREAM
#define _GLIBCXX_OSTREAM 1
#pragma GCC system_header
#include <ios>
#include <bits/ostream_insert.h>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits>
class basic_ostream : virtual public basic_ios<_CharT, _Traits>
{
public:
// Types (inherited from basic_ios):
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_ostream<_CharT, _Traits> __ostream_type;
typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
__num_put_type;
typedef ctype<_CharT> __ctype_type;
explicit
basic_ostream(__streambuf_type* __sb)
{ this->init(__sb); }
virtual
~basic_ostream() { }
/// Safe prefix/suffix operations.
class sentry;
friend class sentry;
__ostream_type&
operator<<(__ostream_type& (*__pf)(__ostream_type&))
{
return __pf(*this);
}
__ostream_type&
operator<<(__ios_type& (*__pf)(__ios_type&))
{
__pf(*this);
return *this;
}
__ostream_type&
operator<<(ios_base& (*__pf) (ios_base&))
{
__pf(*this);
return *this;
}
__ostream_type&
operator<<(long __n)
{ return _M_insert(__n); }
__ostream_type&
operator<<(unsigned long __n)
{ return _M_insert(__n); }
__ostream_type&
operator<<(bool __n)
{ return _M_insert(__n); }
__ostream_type&
operator<<(short __n);
__ostream_type&
operator<<(unsigned short __n)
{
return _M_insert(static_cast<unsigned long>(__n));
}
__ostream_type&
operator<<(int __n);
__ostream_type&
operator<<(unsigned int __n)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 117. basic_ostream uses nonexistent num_put member functions.
return _M_insert(static_cast<unsigned long>(__n));
}
#ifdef _GLIBCXX_USE_LONG_LONG
__ostream_type&
operator<<(long long __n)
{ return _M_insert(__n); }
__ostream_type&
operator<<(unsigned long long __n)
{ return _M_insert(__n); }
#endif
__ostream_type&
operator<<(double __f)
{ return _M_insert(__f); }
__ostream_type&
operator<<(float __f)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 117. basic_ostream uses nonexistent num_put member functions.
return _M_insert(static_cast<double>(__f));
}
__ostream_type&
operator<<(long double __f)
{ return _M_insert(__f); }
//@}
__ostream_type&
operator<<(const void* __p)
{ return _M_insert(__p); }
__ostream_type&
operator<<(__streambuf_type* __sb);
//@}
//@{
__ostream_type&
put(char_type __c);
void
_M_write(const char_type* __s, streamsize __n)
{
const streamsize __put = this->rdbuf()->sputn(__s, __n);
if (__put != __n)
this->setstate(ios_base::badbit);
}
__ostream_type&
write(const char_type* __s, streamsize __n);
//@}
__ostream_type&
flush();
pos_type
tellp();
__ostream_type&
seekp(pos_type);
__ostream_type&
seekp(off_type, ios_base::seekdir);
protected:
basic_ostream()
{ this->init(0); }
template<typename _ValueT>
__ostream_type&
_M_insert(_ValueT __v);
};
template <typename _CharT, typename _Traits>
class basic_ostream<_CharT, _Traits>::sentry
{
// Data Members.
bool _M_ok;
basic_ostream<_CharT, _Traits>& _M_os;
public:
explicit
sentry(basic_ostream<_CharT, _Traits>& __os);
~sentry()
{
// XXX MT
if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception())
{
// Can't call flush directly or else will get into recursive lock.
if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
_M_os.setstate(ios_base::badbit);
}
}
#if __cplusplus >= 201103L
explicit
#endif
operator bool() const
{ return _M_ok; }
};
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
{ return __ostream_insert(__out, &__c, 1); }
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
{ return (__out << __out.widen(__c)); }
template <class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, char __c)
{ return __ostream_insert(__out, &__c, 1); }
template<class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
{ return (__out << static_cast<char>(__c)); }
template<class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
{ return (__out << static_cast<char>(__c)); }
//@}
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
{
if (!__s)
__out.setstate(ios_base::badbit);
else
__ostream_insert(__out, __s,
static_cast<streamsize>(_Traits::length(__s)));
return __out;
}
template<typename _CharT, typename _Traits>
basic_ostream<_CharT, _Traits> &
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s);
// Partial specializations
template<class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
{
if (!__s)
__out.setstate(ios_base::badbit);
else
__ostream_insert(__out, __s,
static_cast<streamsize>(_Traits::length(__s)));
return __out;
}
// Signed and unsigned
template<class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
{ return (__out << reinterpret_cast<const char*>(__s)); }
template<class _Traits>
inline basic_ostream<char, _Traits> &
operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
{ return (__out << reinterpret_cast<const char*>(__s)); }
//@}
// Standard basic_ostream manipulators
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
endl(basic_ostream<_CharT, _Traits>& __os)
{ return flush(__os.put(__os.widen('\n'))); }
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
ends(basic_ostream<_CharT, _Traits>& __os)
{ return __os.put(_CharT()); }
template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>&
flush(basic_ostream<_CharT, _Traits>& __os)
{ return __os.flush(); }
#if __cplusplus >= 201103L
template<typename _CharT, typename _Traits, typename _Tp>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
{ return (__os << __x); }
#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#include <bits/ostream.tcc>
#endif /* _GLIBCXX_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:
// Types (inherited from basic_ios (27.4.4)):
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;
// Non-standard Types:
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); }
/// Safe prefix/suffix operations.
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);
//@}
// [27.6.1.3] unformatted input
/**
* @brief Character counting
* @return The number of characters extracted by the previous
* unformatted input function dispatched for this stream.
*/
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&
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);
};
/// Explicit specialization declarations, defined in src/istream.cc.
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
{
// Data Members.
bool _M_ok;
public:
/// Easy access to dependent types.
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);
// Explicit specialization declaration, defined in src/istream.cc.
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:
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 271. basic_iostream missing typedefs
// Types (inherited):
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;
// Non-standard Types:
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 // C++11
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#include <bits/istream.tcc>
#endif /* _GLIBCXX_ISTREAM */
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
//@{
extern istream cin; /// Linked to standard input
extern ostream cout; /// Linked to standard output
extern ostream cerr; /// Linked to standard error (unbuffered)
extern ostream clog; /// Linked to standard error (buffered)
#ifdef _GLIBCXX_USE_WCHAR_T
extern wistream wcin; /// Linked to standard input
extern wostream wcout; /// Linked to standard output
extern wostream wcerr; /// Linked to standard error (unbuffered)
extern wostream wclog; /// Linked to standard error (buffered)
#endif
//@}
// For construction of filebuffers for cout, cin, cerr, clog et. al.
static ios_base::Init __ioinit;
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _GLIBCXX_IOSTREAM */
using namespace std;
int main(){
cout<<"hi";
return 0;
}
谁能告诉我前面是干嘛的???(#15)
啥时候测评啊
啥时候测评啊
我们这些没参加的根本做不了
helloworld在线判题系统网址改了
本来长这样
【数据删除】http://go.helloworldroom.com:50080/problems
现在进不了,就多了1个:50080
现在反正我点不进去了,会提示时间过长
现在题库改成这样了http://go.helloworldroom.com/problems
哈哈哈
#include <iostream>
using namespace std;
int main(){
cout<<"helloworld在线判题系统网址改了";
return 0;
}
#include <stdio.h>
begin
print 'helloworld在线判题系统网址改了'
\begin{equation} \frac{-b + \sqrt{b^2 - 4ac}}{2a} \end{equation}