记录编号 | 321280 | 评测结果 | AAAAAAAEEE | ||
---|---|---|---|---|---|
题目名称 | 1128.[NOIP 2010冲刺五]无穷的序列 | 最终得分 | 70 | ||
用户昵称 | 是否通过 | 未通过 | |||
代码语言 | C++ | 运行时间 | 0.341 s | ||
提交时间 | 2016-10-13 17:08:53 | 内存使用 | 14.72 MiB | ||
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #define maxn 15100000 using namespace std; bool haha[maxn]; int main(){ freopen("unlessseq.in","r",stdin); freopen("unlessseq.out","w",stdout); int t=1,c=1; while(1){ haha[t]=1; t+=c; if(t>=maxn) break; c++; } scanf("%d",&t); for(int i=0;i<t;i++){ scanf("%d",&c); printf("%d\n",haha[c]); } }