QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#684085#1. I/O Testdaydreamwarrior200 ✓195ms4708kbC++142.1kb2024-10-28 10:00:212024-10-28 10:00:22

Judging History

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

  • [2024-10-28 10:00:22]
  • 评测
  • 测评结果:200
  • 用时:195ms
  • 内存:4708kb
  • [2024-10-28 10:00:21]
  • 提交

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 fasto{
    char buf[1<<20],*p=buf;
    void flush(){fwrite(buf,1,p-buf,stdout);p=buf;}
    void operator()(char c){putchar_unlocked(c);}
    void operator()(const char *s){while(*s)(*this)(*s++);}
    ~fasto(){flush();}
    signed stk[39],tp;
    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 fasto{
    char buf[1<<20],*p=buf;
    void flush(){fwrite(buf,1,p-buf,stdout);p=buf;}
    void operator()(char c){putchar_unlocked(c);}
    void operator()(const char *s){while(*s)(*this)(*s++);}
    ~fasto(){flush();}
    signed stk[39],tp;
    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;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

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

input:

10000000
180339224 271545925 873490822 368677688 693812779 437905985 608586444 500527938 863257236 610517303 274994605 498373672 565079157 283293534 845856486 425173548 575064596 444085736 710179591 934985262 111267007 399734997 444260715 953482371 278827641 782031220 400080503 501226512 718730880 6...

output:

5501769523668345

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 195ms
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