QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#684169 | #1. I/O Test | daydreamwarrior | 200 ✓ | 184ms | 4708kb | C++14 | 1.8kb | 2024-10-28 11:04:29 | 2024-10-28 11:04:29 |
Judging History
config.txt
10000000 10000000
input_test
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
struct{char buf[1<<20],*l=buf,*r=l;
operator char(){return l==r&&(r=(l=buf)+fread(buf,1,1<<20,stdin),l==r)?-1:*l++;}
template<typename T>operator T(){
T x=0;char f=0,c;
do if((c=*this)=='-')f=1;while(c<'0'||c>'9');
while(c>='0'&&c<='9')x=x*10+(c^48),c=*this;
return f?-x:x;
}}in;
struct{signed stk[39],tp;
void operator()(char c){putchar_unlocked(c);}
void operator()(const char *s){while(*s)(*this)(*s++);}
template<typename T>void operator()(T x){
if(x<0)(*this)('-'),x=-x;
do stk[tp++]=x%10;while(x/=10);
while(tp)(*this)(char(stk[--tp]^48));
}template<typename T,typename...Args>
void operator()(T x,Args...args){(*this)(x);(*this)(args...);}
}out;
int main(){
int n = in;
long long ans = 0;
for(int k=1;k<=n;k++)
ans += (int)in;
out(ans);
return 0;
}
output_test
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
struct{char buf[1<<20],*l=buf,*r=l;
operator char(){return l==r&&(r=(l=buf)+fread(buf,1,1<<20,stdin),l==r)?-1:*l++;}
template<typename T>operator T(){
T x=0;char f=0,c;
do if((c=*this)=='-')f=1;while(c<'0'||c>'9');
while(c>='0'&&c<='9')x=x*10+(c^48),c=*this;
return f?-x:x;
}}in;
struct{signed stk[39],tp;
void operator()(char c){putchar_unlocked(c);}
void operator()(const char *s){while(*s)(*this)(*s++);}
template<typename T>void operator()(T x){
if(x<0)(*this)('-'),x=-x;
do stk[tp++]=x%10;while(x/=10);
while(tp)(*this)(char(stk[--tp]^48));
}template<typename T,typename...Args>
void operator()(T x,Args...args){(*this)(x);(*this)(args...);}
}out;
int main(){
int n = in;
for(int k=1;k<=n;k++)
out(100000000,' ');
return 0;
}
詳細信息
Subtask #1:
score: 100
Accepted
Test #1:
score: 100
Accepted
time: 83ms
memory: 4708kb
input:
10000000 209765231 279242777 283432073 166782763 230951190 387107340 574216593 901269548 477652838 702064070 929681943 517122199 139881660 322810467 966173941 427258449 837044740 126208988 789522524 258651528 530144879 556567559 482178297 370361721 185678619 591023208 472756732 816633193 960775747 4...
output:
5499736360591697
result:
points 1.0 input test passed
Subtask #2:
score: 100
Accepted
Test #2:
score: 100
Accepted
time: 184ms
memory: 3656kb
input:
10000000
output:
100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 ...
result:
points 1.0 output test passed