QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#684109#1. I/O Testdaydreamwarrior200 ✓183ms4668kbC++142.0kb2024-10-28 10:35:012024-10-28 10:35:02

Judging History

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

  • [2024-10-28 10:35:02]
  • 评测
  • 测评结果:200
  • 用时:183ms
  • 内存:4668kb
  • [2024-10-28 10:35:01]
  • 提交

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: 91ms
memory: 4668kb

input:

10000000
334933899 450442181 574918041 237862653 339026985 844029130 536656837 787890875 671491555 666484931 964601554 329167244 209847330 371267888 238290684 708260618 540816060 825560474 945594375 141064190 441236666 813121398 668249563 715211230 297628488 674431430 808694057 241238806 667376089 2...

output:

5500092539935599

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 183ms
memory: 3640kb

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