QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#684134#1. I/O Testdaydreamwarrior200 ✓203ms4556kbC++142.0kb2024-10-28 10:48:282024-10-28 10:48:29

Judging History

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

  • [2024-10-28 10:48:29]
  • 评测
  • 测评结果:200
  • 用时:203ms
  • 内存:4556kb
  • [2024-10-28 10:48:28]
  • 提交

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: 83ms
memory: 4556kb

input:

10000000
112134418 732173702 818145173 771828934 543164533 496913138 596011646 530588080 531969874 875943751 435096663 922363828 983326790 258642150 582212607 597231932 810460283 790142457 945777453 785514654 427089035 138825460 433105305 643542968 684942852 838201284 910363611 899652335 389247257 2...

output:

5501528075619134

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 203ms
memory: 3688kb

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