QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#198187 | #3307. Query on a Tree 17 | phenomena | WA | 0ms | 3824kb | C++11 | 1.7kb | 2023-10-03 08:56:23 | 2023-10-03 08:56:23 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using i64=long long;
#define L(i,l,r) for(int i=(l);i<=(r);++i)
#define R(i,r,l) for(int i=(r);i>=(l);--i)
namespace nqio {
const int mxbf=1<<20;
char ib[mxbf],*p1=ib,*p2=ib,c;
bool s;
struct q {
void r(char&x) {
return x=getchar(),void();
x=p1==p2&&(p2=(p1=ib)+fread(ib,1,mxbf,stdin),p1==p2)?EOF:*p1++;
} q&operator>>(char&x) {
for(r(x); x<=32; r(x));
return *this;
} q&operator>>(char*x) {
for(r(*x); *x<=32; r(*x));
while(*x>32)r(*++x);
*x=0;
return *this;
} q&operator>>(string&x) {
for(r(c); c<=32; r(c));
x=c,r(c);
while(c>32)x+=c,r(c);
return *this;
} template<typename t>q&operator>>(t&x) {
for(r(c),s=0; !isdigit(c); r(c))s|=c==45;
for(x=0; isdigit(c); r(c))x=x*10+(c^48);
if(s)x=-x;
return *this;
}
} qi;
char ob[mxbf],*pp=ob,*pd=ob+mxbf,stk[64],*tp=stk;
struct p {
void f() {
fwrite(ob,1,pp-ob,stdout),pp=ob;
}~p() {
f();
} void w(char x) {
if(*pp++=x,pp==pd)f();
} p&operator<<(char x) {
w(x);
return *this;
} p&operator<<(char*x) {
while(*x)w(*x++);
return *this;
} p&operator<<(const char*x) {
while(*x)w(*x++);
return *this;
} p&operator<<(string x) {
for(char v:x)w(v);
return *this;
} template<typename t>p&operator<<(t x) {
if(!x)return w(48),*this;
if(x<0)w(45),x=-x;
while(x)*tp++=48|x%10,x/=10;
while(tp!=stk)w(*--tp);
return *this;
}
} qo;
}
using nqio::qi;
using nqio::qo;
namespace yihlaushih {
bool _114;
bool _514;
int _main(void) {
fprintf(stderr,"floor memory:%.6lf MB\n",(&_114-&_514)/1024./1024.);
int x=__lg(0);
return 0;
}
}
int main() {
return yihlaushih::_main(),0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3824kb
input:
7 1 6 1 7 7 3 3 2 7 5 5 4 4 1 2 1 4 1 6 2 6 7
output:
result:
wrong answer 1st lines differ - expected: '2', found: ''