QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#36689#1. I/O TestJasper08200 ✓97ms4572kbC++2.6kb2022-06-28 14:31:282022-06-28 14:31:30

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-06-28 14:31:30]
  • 评测
  • 测评结果:200
  • 用时:97ms
  • 内存:4572kb
  • [2022-06-28 14:31:28]
  • 提交

config.txt

10000000 10000000

input_test

/**
Author: Jasper08
Quetion/Round:
Date:
**/

#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cctype>
#include <iomanip>

using namespace std;

#define getchar()  (sp == ep && (ep = (sp = ibuf) + fread(ibuf,1,mm,stdin),sp == ep) ? EOF : *sp++)
#define putchar(x) ((op-obuf<mm) ? (*op++=x) : (fwrite(obuf,op-obuf,1,stdout),op=obuf,*op++=x))
#define int long long
#define endl '\n'

const int N = 1e5+10;
const int mod = 1e9+7;
const double esp = 1e-8;
const int mm = 1 << 20;
static char ibuf[mm],obuf[mm],*sp=ibuf,*ep=ibuf,*op = obuf,*p3 = obuf;

inline int read(){
	int flag = 1, x = 0;
	char ch = getchar();
	while (!isdigit(ch)) {
		if (ch == '-')
			flag = -1;
		ch = getchar();
	}
	while (isdigit(ch)) {
		x = (x<<3) + (x<<1) + (ch^48);
		ch = getchar();
	}
	return flag*x;
}

void write(int x){
	char ch[20];
	int len = 0;
	if(x < 0)
		putchar('-'), x = -x;
	do {
		ch[len++] = (x%10)^48;
		x /= 10;
	}
	while(x);

	while(len--)
		putchar(ch[len]);
}


void writeln(int x){
	write(x);
	putchar('\n');
}

signed main() {
	//ios::sync_with_stdio(0);
	//cin.tie(0);
	//cout.tie(0);
	
	int n = read();
	int sum = 0;
	while (n --) sum += read();
	writeln(sum); 

	fwrite(obuf,op-obuf,1,stdout);
	return 0;
}


output_test

/**
Author: Jasper08
Quetion/Round:
Date:
**/

#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cctype>
#include <iomanip>

using namespace std;

#define getchar()  (sp == ep && (ep = (sp = ibuf) + fread(ibuf,1,mm,stdin),sp == ep) ? EOF : *sp++)
#define putchar(x) ((op-obuf<mm) ? (*op++=x) : (fwrite(obuf,op-obuf,1,stdout),op=obuf,*op++=x))
#define ll long long
#define endl '\n'

const int N = 1e9-1;
const int mod = 1e9+7;
const double esp = 1e-8;
const int mm = 1 << 20;
static char ibuf[mm],obuf[mm],*sp=ibuf,*ep=ibuf,*op = obuf,*p3 = obuf;

inline int read(){
	int flag = 1, x = 0;
	char ch = getchar();
	while (!isdigit(ch)) {
		if (ch == '-')
			flag = -1;
		ch = getchar();
	}
	while (isdigit(ch)) {
		x = (x<<3) + (x<<1) + (ch^48);
		ch = getchar();
	}
	return flag*x;
}

void write(int x){
	char ch[20];
	int len = 0;
	if(x < 0)
		putchar('-'), x = -x;
	do {
		ch[len++] = (x%10)^48;
		x /= 10;
	}
	while(x);

	while(len--)
		putchar(ch[len]);
	putchar(' ');
}


void writeln(int x){
	write(x);
	putchar('\n');
}

int main() {
	//ios::sync_with_stdio(0);
	//cin.tie(0);
	//cout.tie(0);
	
	int n = read();
	while (n --) write(N);
	fwrite(obuf,op-obuf,1,stdout);
	return 0;
}



Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 97ms
memory: 4572kb

input:

10000000
388251019 957439268 233537522 568157892 612929816 602131513 824694321 254777794 608726833 204734897 671753462 574559704 972365077 102210203 268140760 233589160 965107877 790971246 805898548 265049962 559003836 305166416 997874496 367824027 581186647 810730600 759221289 867693337 926768259 8...

output:

5500220345011731

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 76ms
memory: 4548kb

input:

10000000

output:

999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 ...

result:

points 1.0 output test passed