QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#684078#1. I/O Testdaydreamwarrior200 ✓159ms4668kbC++142.1kb2024-10-28 09:54:422024-10-28 09:54:42

Judging History

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

  • [2024-10-28 09:54:42]
  • 评测
  • 测评结果:200
  • 用时:159ms
  • 内存:4668kb
  • [2024-10-28 09:54:42]
  • 提交

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){(*p++)=c;if(p-buf==1<<20)flush();}
    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){(*p++)=c;if(p-buf==1<<20)flush();}
    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: 83ms
memory: 4668kb

input:

10000000
506838696 907280961 463463806 385759013 185461458 785354714 687632662 461970172 682947906 788878781 951779058 146346805 765697645 562716170 385683412 975423004 800715070 671491487 308833685 616326545 513538842 794861072 258806647 115927647 952648805 795245539 134556161 952136296 448557337 1...

output:

5501257542586159

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 159ms
memory: 4636kb

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