QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#140420#1. I/O Testxhgua200 ✓211ms4468kbC++142.9kb2023-08-15 21:22:452023-08-15 21:22:48

Judging History

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

  • [2023-08-15 21:22:48]
  • 评测
  • 测评结果:200
  • 用时:211ms
  • 内存:4468kb
  • [2023-08-15 21:22:45]
  • 提交

config.txt

10000000 10000000

input_test

#include <bits/stdc++.h>

#define i64 long long
#define all(x) x.begin(), x.end()
#define seg(a, l, r) a + l, a + r + 1
#define rep(i, a, b) for(int i = (a); i <= (b); i++)
#define per(i, a, b) for(int i = (a); i >= (b); i--)

using namespace std;

namespace FastIO {
	
	char bufIn[1 << 20], bufOut[1 << 20], *p1, *p2, *pOut = bufOut;

	inline char gc() { return (p1 == p2) && (p2 = (p1 = bufIn) + fread(bufIn, 1, 1 << 20, stdin)), p1 == p2 ? EOF : *p1++; }
	
	template<typename T>
	inline void read(T &x) {
		x = 0; int f = 1; char ch = gc();
		while(!isdigit(ch)) { if(ch == '-') f = -1; ch = gc(); }
		while( isdigit(ch)) x = x * 10 + (ch - '0'), ch = gc();
		x *= f;
	}
	
	inline void push(const char &c) {
		if(pOut - bufOut == (1 << 20)) fwrite(bufOut, 1, 1 << 20, stdout), pOut = bufOut;
		*pOut++ = c;
	}
	
	template<typename T>
	inline void write(T x) {
		if(x < 0) x = -x, push('-');
		
		static T stk[40];
		int tp = 0;
		do {
			stk[tp++] = x % 10;
			x /= 10;
		} while(x);

		while(tp) push(stk[--tp] + '0');
	}
	
	template<typename T>
	inline void writeln(T x) {
		write(x); push('\n');
	}	
	
	template<typename T>
	inline void writesp(T x) {
		write(x); push(' ');
	}
	
	void flush() {
		fwrite(bufOut, 1, pOut - bufOut, stdout);
	}
};

using namespace FastIO;

int n;

int main() {

    read(n);
	
	i64 sum = 0;
	rep(i, 1, n) {
		int x;
		read(x);
		
		sum += x;
	}
	
	writeln(sum);

    return flush(), 0;
}

output_test

#include <bits/stdc++.h>

#define i64 long long
#define all(x) x.begin(), x.end()
#define seg(a, l, r) a + l, a + r + 1
#define rep(i, a, b) for(int i = (a); i <= (b); i++)
#define per(i, a, b) for(int i = (a); i >= (b); i--)

using namespace std;

namespace FastIO {
	
	char bufIn[1 << 20], bufOut[1 << 20], *p1, *p2, *pOut = bufOut;

	inline char gc() { return (p1 == p2) && (p2 = (p1 = bufIn) + fread(bufIn, 1, 1 << 20, stdin)), p1 == p2 ? EOF : *p1++; }
	
	template<typename T>
	inline void read(T &x) {
		x = 0; int f = 1; char ch = gc();
		while(!isdigit(ch)) { if(ch == '-') f = -1; ch = gc(); }
		while( isdigit(ch)) x = x * 10 + (ch - '0'), ch = gc();
		x *= f;
	}
	
	inline void push(const char &c) {
		if(pOut - bufOut == (1 << 20)) fwrite(bufOut, 1, 1 << 20, stdout), pOut = bufOut;
		*pOut++ = c;
	}
	
	template<typename T>
	inline void write(T x) {
		if(x < 0) x = -x, push('-');
		
		static T stk[40];
		int tp = 0;
		do {
			stk[tp++] = x % 10;
			x /= 10;
		} while(x);

		while(tp) push(stk[--tp] + '0');
	}
	
	template<typename T>
	inline void writeln(T x) {
		write(x); push('\n');
	}	
	
	template<typename T>
	inline void writesp(T x) {
		write(x); push(' ');
	}
	
	void flush() {
		fwrite(bufOut, 1, pOut - bufOut, stdout);
	}
};

using namespace FastIO;

int n;

int main() {

    read(n);
	
	rep(i, 1, n) writesp(114514191);

    return flush(), 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 73ms
memory: 4468kb

input:

10000000
308206200 967852095 612591840 883127437 802227812 189345013 112850692 462203584 168047675 501752778 402041570 374366990 753729830 824826249 134859131 233348708 145700830 475221452 582063197 168836010 743381802 514344043 469136134 274399641 655616077 423272038 173224492 680267329 688494203 9...

output:

5499115089993725

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 211ms
memory: 4432kb

input:

10000000

output:

114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 114514191 ...

result:

points 1.0 output test passed