QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#478861#1. I/O Testdaydreamwarrior200 ✓282ms7696kbC++171.8kb2024-07-15 11:51:352024-07-15 11:51:35

Judging History

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

  • [2024-07-15 11:51:35]
  • 评测
  • 测评结果:200
  • 用时:282ms
  • 内存:7696kb
  • [2024-07-15 11:51:35]
  • 提交

config.txt

10000000 10000000

input_test

#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;

#define getchar my_getchar
const int Isize = 1<<22;
char ibuf[Isize],*p1=ibuf,*p2=ibuf;
inline char getchar() {return p1==p2&&(p2=(p1=ibuf)+fread(ibuf,sizeof(char),sizeof(ibuf),stdin),p1==p2)?EOF:*p1++;}
namespace fastio{
    struct{template<typename T>operator T(){
        T x=0;char f=0,c=getchar();
        while(c<'0'||c>'9'){if(c=='-')f=1;c=getchar();}
        while(c>='0'&&c<='9'){x=x*10+(c^48);c=getchar();}
        return f?-x:x;
    }}in;int stk[39],tp;
    template<typename T>void out(T x,char c=0){
        if(x<0)putchar('-'),x=-x;
        do stk[tp++]=x%10;while(x/=10);
        while(tp)putchar(stk[--tp]^48);
        if(c)putchar(c);
    }
}using fastio::in;using fastio::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;

#define getchar my_getchar
const int Isize = 1<<22;
char ibuf[Isize],*p1=ibuf,*p2=ibuf;
inline char getchar() {return p1==p2&&(p2=(p1=ibuf)+fread(ibuf,sizeof(char),sizeof(ibuf),stdin),p1==p2)?EOF:*p1++;}
namespace fastio{
    struct{template<typename T>operator T(){
        T x=0;char f=0,c=getchar();
        while(c<'0'||c>'9'){if(c=='-')f=1;c=getchar();}
        while(c>='0'&&c<='9'){x=x*10+(c^48);c=getchar();}
        return f?-x:x;
    }}in;int stk[39],tp;
    template<typename T>void out(T x,char c=0){
        if(x<0)putchar('-'),x=-x;
        do stk[tp++]=x%10;while(x/=10);
        while(tp)putchar(stk[--tp]^48);
        if(c)putchar(c);
    }
}using fastio::in;using fastio::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: 79ms
memory: 7696kb

input:

10000000
386554269 368581239 458283019 817841302 739044528 616056043 184095633 311344132 561580362 903742010 162354947 881241306 313570462 933799524 205051420 403024341 284267249 348676228 434654379 655575302 466033957 339998463 270820088 306081935 424058337 960902226 873984742 167840814 227108057 4...

output:

5500449921168799

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 282ms
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