QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#64665 | #1. I/O Test | ruizhangj | 200 ✓ | 177ms | 7408kb | C++14 | 2.2kb | 2022-11-25 09:03:01 | 2022-11-25 09:03:04 |
Judging History
config.txt
10000000 10000000
input_test
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
namespace IO{
const int siz=1<<22;
char a[siz],b[siz],*ia=a+siz,*ea=a+siz,*ib=b,*eb=b+siz;
int p[105],l=0;
inline char gc(){if (ia==ea) fread(a,1,siz,stdin),ia=a;return *ia++;}
inline void flush(){fwrite(b,1,ib-b,stdout);ib=b;}
inline void pc(char c){if (ib==eb) flush();*ib++=c;}
template<typename T> inline T read(){
T x=0;char t=gc();
for (;t<'0' || t>'9';t=gc());
for (;'0'<=t && t<='9';t=gc()) x=x*10+t-'0';
return x;
}
template<typename T> inline void write(T x,char ed='\n'){
if (x<0) pc('-'),x=-x;
if (!x) pc('0');
for (;x;x/=10) p[++l]=x%10;
for (;l;--l) pc(p[l]+'0');pc(ed);
}
struct f{~f(){flush();}}F;
}
using IO::read;
using IO::write;
#define input
// #define output
int main(){
#ifdef input
ll sum=0;
for (int i=1,n=read<int>();i<=n;++i) sum+=read<int>();
write(sum);
#endif
#ifdef output
for (int i=1,n=read<int>();i<=n;++i) write<int>(999999999,' ');
#endif
return 0;
}
output_test
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
namespace IO{
const int siz=1<<22;
char a[siz],b[siz],*ia=a+siz,*ea=a+siz,*ib=b,*eb=b+siz;
int p[105],l=0;
inline char gc(){if (ia==ea) fread(a,1,siz,stdin),ia=a;return *ia++;}
inline void flush(){fwrite(b,1,ib-b,stdout);ib=b;}
inline void pc(char c){if (ib==eb) flush();*ib++=c;}
template<typename T> inline T read(){
T x=0;char t=gc();
for (;t<'0' || t>'9';t=gc());
for (;'0'<=t && t<='9';t=gc()) x=x*10+t-'0';
return x;
}
template<typename T> inline void write(T x,char ed='\n'){
if (x<0) pc('-'),x=-x;
if (!x) pc('0');
for (;x;x/=10) p[++l]=x%10;
for (;l;--l) pc(p[l]+'0');pc(ed);
}
struct f{~f(){flush();}}F;
}
using IO::read;
using IO::write;
// #define input
#define output
int main(){
#ifdef input
ll sum=0;
for (int i=1,n=read<int>();i<=n;++i) sum+=read<int>();
write(sum);
#endif
#ifdef output
for (int i=1,n=read<int>();i<=n;++i) write<int>(999999999,' ');
#endif
return 0;
}
詳細信息
Subtask #1:
score: 100
Accepted
Test #1:
score: 100
Accepted
time: 61ms
memory: 7408kb
input:
10000000 115075301 753929149 813723318 283531981 265091314 712882366 899503467 401616852 890201816 149750376 811855851 477113395 868045708 151356028 581709720 241031579 229310152 992013134 114973469 447200192 512210096 679041396 214293767 211940565 879226438 528191815 436232172 310465649 710375433 1...
output:
5499725407959445
result:
points 1.0 input test passed
Subtask #2:
score: 100
Accepted
Test #2:
score: 100
Accepted
time: 177ms
memory: 7336kb
input:
10000000
output:
999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 ...
result:
points 1.0 output test passed