QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#684164#1. I/O Testdaydreamwarrior200 ✓255ms4716kbC++142.1kb2024-10-28 11:03:042024-10-28 11:03:06

Judging History

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

  • [2024-10-28 11:03:06]
  • 评测
  • 测评结果:200
  • 用时:255ms
  • 内存:4716kb
  • [2024-10-28 11:03:04]
  • 提交

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 uranohoshi{signed stk[39],tp;char buf[1<<19],*p=buf;
    void flush(){fwrite(buf,1,p-buf,stdout);p=buf;}
    void operator()(char c){(*p++)=c;if(p-buf==1<<19)flush();}
    void operator()(const char *s){while(*s)(*this)(*s++);(*this)('\n');}
    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));
    }~uranohoshi(){flush();}
    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 uranohoshi{signed stk[39],tp;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++);(*this)('\n');}
    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));
    }~uranohoshi(){flush();}
    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: 4620kb

input:

10000000
586816713 223713290 523192718 841325910 756458922 133793992 421565942 803856740 902648346 149225380 772915220 455372838 881678779 393654104 112660067 907625715 924257903 583813878 858933437 997922310 494179413 786553094 836746684 269897735 781674464 559065607 571298964 977912765 206131341 6...

output:

5500093680562352

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 255ms
memory: 4716kb

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