QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#64667 | #1. I/O Test | ruizhangj | 200 ✓ | 186ms | 36152kb | C++14 | 2.1kb | 2022-11-25 09:05:24 | 2022-11-25 09:05:25 |
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<<25;
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;}
inline int read(){
int 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;
}
inline void write(ll 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();i<=n;++i) sum+=read();
write(sum);
#endif
#ifdef output
for (int i=1,n=read();i<=n;++i) write(999999999,' ');
#endif
return 0;
}
output_test
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
namespace IO{
const int siz=1<<25;
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;}
inline int read(){
int 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;
}
inline void write(ll 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();i<=n;++i) sum+=read();
write(sum);
#endif
#ifdef output
for (int i=1,n=read();i<=n;++i) write(999999999,' ');
#endif
return 0;
}
詳細信息
Subtask #1:
score: 100
Accepted
Test #1:
score: 100
Accepted
time: 76ms
memory: 35948kb
input:
10000000 786304525 532270562 189092791 224634202 144148299 565231058 254451849 784849592 209321560 295659589 451897916 880988262 752355815 604447020 433786730 313897128 325981619 852321160 580581592 954152503 140980433 499143429 240046885 267378077 997671602 280212476 222989139 197775991 589051842 5...
output:
5499783742922189
result:
points 1.0 input test passed
Subtask #2:
score: 100
Accepted
Test #2:
score: 100
Accepted
time: 186ms
memory: 36152kb
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