QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#684257#1. I/O Testdaydreamwarrior200 ✓202ms4708kbC++141.7kb2024-10-28 11:46:412024-10-28 11:46:41

Judging History

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

  • [2024-10-28 11:46:41]
  • 评测
  • 测评结果:200
  • 用时:202ms
  • 内存:4708kb
  • [2024-10-28 11:46:41]
  • 提交

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;
}

详细

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 79ms
memory: 4708kb

input:

10000000
851214440 210593947 367258130 513294036 860441140 860820886 562532136 325168167 943165409 794416171 165099612 171959866 823086156 610068757 125098733 594397377 392109497 357382128 829375991 409587440 759644746 233302456 461258765 958164403 633941317 331654574 808116544 539426741 137434313 4...

output:

5501037267528833

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

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

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