QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#54082 | #1. I/O Test | ZGY | 200 ✓ | 286ms | 1844kb | C++ | 3.1kb | 2022-10-06 20:42:15 | 2022-10-06 20:42:17 |
Judging History
config.txt
10000000 10000000
input_test
#include <cstdio>
#include <initializer_list>
#define getchar getchar_unlocked
#define putchar putchar_unlocked
char ch;
bool fh;
int len;
template<typename T>
inline void read(T&x){//整数输入
fh=false;
while((ch=getchar())<48||ch>57)fh=ch=='-';
x=ch^48;
while((ch=getchar())<58&&ch>47)x=(x<<1)+(x<<3)+(ch^48);
if(fh)x=-x;
}
template<typename T>
inline void unsigned_read(T&x){//无符号整数输入
while((ch=getchar())<48||ch>57);
x=ch^48;
while((ch=getchar())<58&&ch>47)x=(x<<1)+(x<<3)+(ch^48);
}
inline void read(char*x){//字符串输入
while((*x=getchar())<33);
len=1;
while((x[len]=getchar())>32)len++;
x[len]=0;
}
inline void read(char&x){x=getchar();}//字符输入
template<typename... Ar>
inline void input(Ar&...x){int a[]{(read(x),0)...};}//可变参数输入
template<typename T>
inline void unsigned_write(T&&/*模板的转发引用*/x){//无符号整数输出
if(x>9)unsigned_write(x/10);
putchar(x%10^48);
}
template<typename T>
inline void write(T x){//整数输出
if(x<0){
putchar('-');
x=-x;
}
if(x>9)unsigned_write(x/10);
putchar(x%10^48);
}
inline void write(const char&x){putchar(x);}//字符输出
inline void write(const char*x){for(int i=0;x[i];++i)putchar(x[i]);}//字符串输出
template<typename... Ar>
inline void print(const Ar&...x){int t[]{(write(x),0)...};}//可变参数输出
long long s,h;
int n;
int main(){//使用实例
read(n);
while(n--)read(h),s+=h;
print(s);
return 0;
}
output_test
#include <cstdio>
#include <initializer_list>
#define getchar getchar_unlocked
#define putchar putchar_unlocked
char ch;
bool fh;
int len;
template<typename T>
inline void read(T&x){//整数输入
fh=false;
while((ch=getchar())<48||ch>57)fh=ch=='-';
x=ch^48;
while((ch=getchar())<58&&ch>47)x=(x<<1)+(x<<3)+(ch^48);
if(fh)x=-x;
}
template<typename T>
inline void unsigned_read(T&x){//无符号整数输入
while((ch=getchar())<48||ch>57);
x=ch^48;
while((ch=getchar())<58&&ch>47)x=(x<<1)+(x<<3)+(ch^48);
}
inline void read(char*x){//字符串输入
while((*x=getchar())<33);
len=1;
while((x[len]=getchar())>32)len++;
x[len]=0;
}
inline void read(char&x){x=getchar();}//字符输入
template<typename... Ar>
inline void input(Ar&...x){int a[]{(read(x),0)...};}//可变参数输入
template<typename T>
inline void unsigned_write(T&&/*模板的转发引用*/x){//无符号整数输出
if(x>9)unsigned_write(x/10);
putchar(x%10^48);
}
template<typename T>
inline void write(T x){//整数输出
if(x<0){
putchar('-');
x=-x;
}
if(x>9)unsigned_write(x/10);
putchar(x%10^48);
}
inline void write(const char&x){putchar(x);}//字符输出
inline void write(const char*x){for(int i=0;x[i];++i)putchar(x[i]);}//字符串输出
template<typename... Ar>
inline void print(const Ar&...x){int t[]{(write(x),0)...};}//可变参数输出
int main(){//使用实例
int n;
read(n);
while(n--)write("114514191 ");
return 0;
}
详细
Subtask #1:
score: 100
Accepted
Test #1:
score: 100
Accepted
time: 286ms
memory: 1844kb
input:
10000000 616235196 972724966 435463390 995320043 656239981 581603005 641583825 278293726 547845707 167944637 728495384 599477266 717439139 887327111 864357578 206868949 106967945 357572713 705503777 239824178 397602364 414676754 546388619 140894416 327517548 279976930 142593594 812663503 292358124 9...
output:
5499911524790965
result:
points 1.0 input test passed
Subtask #2:
score: 100
Accepted
Test #2:
score: 100
Accepted
time: 259ms
memory: 1808kb
input:
10000000
output:
114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 ...
result:
points 1.0 output test passed