QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#684249#1. I/O Testdaydreamwarrior200 ✓202ms4552kbC++141.7kb2024-10-28 11:44:272024-10-28 11:44:29

Judging History

你现在查看的是最新测评结果

  • [2024-10-28 11:44:29]
  • 评测
  • 测评结果:200
  • 用时:202ms
  • 内存:4552kb
  • [2024-10-28 11:44:27]
  • 提交

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;
void out(char c){putchar_unlocked(c);}
void out(const char *s){while(*s)out(*s++);}
template<typename T>void out(T x){
    static signed stk[39],tp;
    if(x<0)out('-'),x=-x;
    do stk[tp++]=x%10;while(x/=10);
    while(tp)out(char(stk[--tp]^48));
}template<typename T,typename...Args>
void out(T x,Args...args){out(x);out(args...);}

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;
void out(char c){putchar_unlocked(c);}
void out(const char *s){while(*s)out(*s++);}
template<typename T>void out(T x){
    static signed stk[39],tp;
    if(x<0)out('-'),x=-x;
    do stk[tp++]=x%10;while(x/=10);
    while(tp)out(char(stk[--tp]^48));
}template<typename T,typename...Args>
void out(T x,Args...args){out(x);out(args...);}

int main(){
    int n = in;
    for(int k=1;k<=n;k++)
        out(100000000,' ');
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 87ms
memory: 4552kb

input:

10000000
220309422 991119995 830760459 568786780 914082908 484095142 482895732 421366951 333243794 386455678 672877938 832367717 817431956 946574781 291934649 530614274 129994490 225821666 342990807 540484440 787915039 304970843 362869439 113463733 347470895 688454817 845583546 907272325 862059098 4...

output:

5500042732849627

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 202ms
memory: 3608kb

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