QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#684194#1. I/O Testdaydreamwarrior200 ✓199ms4556kbC++142.0kb2024-10-28 11:12:232024-10-28 11:12:26

Judging History

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

  • [2024-10-28 11:12:26]
  • 评测
  • 测评结果:200
  • 用时:199ms
  • 内存:4556kb
  • [2024-10-28 11:12:23]
  • 提交

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{signed stk[39],tp;
#ifdef _WIN32
    void operator()(char c){_putc_nolock(c,stdout);}
#else
    void operator()(char c){putchar_unlocked(c);}
#endif
    void operator()(const char *s){while(*s)(*this)(*s++);}
    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{signed stk[39],tp;
#ifdef _WIN32
    void operator()(char c){_putc_nolock(c,stdout);}
#else
    void operator()(char c){putchar_unlocked(c);}
#endif
    void operator()(const char *s){while(*s)(*this)(*s++);}
    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;
}

详细

Subtask #1:

score: 100
Accepted

Test #1:

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

input:

10000000
735326194 837222555 741179305 877292603 544171382 432477701 993310304 213459056 835801389 532157752 354715185 455938397 216495242 789921892 843902709 736404665 661766061 949846216 382825115 964501561 222153104 978116807 460102882 696455233 457957089 728529314 385697172 781264713 652044035 7...

output:

5500408893725433

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 199ms
memory: 3496kb

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