QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#47981#1. I/O TestJerryCKB200 ✓365ms42552kbC++3.5kb2022-09-10 22:19:342022-09-10 22:19:36

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-10 22:19:36]
  • 评测
  • 测评结果:200
  • 用时:365ms
  • 内存:42552kb
  • [2022-09-10 22:19:34]
  • 提交

config.txt

10000000 10000000

input_test

#include <bits/stdc++.h>
using namespace std;

#define rint register int
#define FOR(i, x, y) for (decay<decltype(y)>::type i = (x), _##i = (y); i <= _##i; ++i)
#define FORD(i, x, y) for (decay<decltype(x)>::type i = (x), _##i = (y); i >= _##i; --i)
#define debug(args...) fprintf(stderr, args)

using ll = long long;
using lui = long unsigned int;
using ull = unsigned long long;

// clang-format off
class IO { public: template <typename T> inline bool read(T& val) { T x = 0, f = 1, c = getchar_unlocked(); if (c == EOF) return 0; for (; !isdigit(c); c = getchar_unlocked()) f = (c == 45) ? -1 : 1; for (; isdigit(c); c = getchar_unlocked()) x = (x << 1) + (x << 3) + (c ^ 48); val = x * f; return c != EOF; } inline bool read(string& s) { char c = getchar_unlocked(); if (c == EOF) return 0; for (; c != '\n' && c != EOF; c = getchar_unlocked()) s += c; return c != EOF; } template <typename T, typename... Ts> inline bool read(T& x, Ts&... val) { return read(x) && read(val...); } template <typename T> inline void write(T x) { if (x < 0) putchar_unlocked('-'), x = -x; if (x > 9) write(x / 10); putchar_unlocked(x % 10 + 48); } inline void write(char c) { putchar_unlocked(c); } inline void write(const char* c) { for (int i = 0; c[i]; ++i) putchar_unlocked(c[i]); } template <typename T, typename... Ts> inline void write(T x, Ts... val) { write(x), write(val...); } void file(const string s) { /*ifstream fin(s + ".in"); ofstream fout(s + ".out");*/ freopen((s + ".in").c_str(), "r", stdin), freopen((s + ".out").c_str(), "w", stdout); } } io;
// clang-format on

const int N = 1e7;
const int inf = 0x3f3f3f3f;

int n, a[N + 7];

int main() {
    io.read(n);
	for (int i = 1; i <= n; ++i) io.read(a[i]);
	ll ans = 0;
	for (int i = 1; i <= n; ++i) ans += a[i];
	io.write(ans);
    
    return 0;
}

output_test

#include <bits/stdc++.h>
using namespace std;

#define rint register int
#define FOR(i, x, y) for (decay<decltype(y)>::type i = (x), _##i = (y); i <= _##i; ++i)
#define FORD(i, x, y) for (decay<decltype(x)>::type i = (x), _##i = (y); i >= _##i; --i)
#define debug(args...) fprintf(stderr, args)

using ll = long long;
using lui = long unsigned int;
using ull = unsigned long long;

// clang-format off
class IO { public: template <typename T> inline bool read(T& val) { T x = 0, f = 1, c = getchar_unlocked(); if (c == EOF) return 0; for (; !isdigit(c); c = getchar_unlocked()) f = (c == 45) ? -1 : 1; for (; isdigit(c); c = getchar_unlocked()) x = (x << 1) + (x << 3) + (c ^ 48); val = x * f; return c != EOF; } inline bool read(string& s) { char c = getchar_unlocked(); if (c == EOF) return 0; for (; c != '\n' && c != EOF; c = getchar_unlocked()) s += c; return c != EOF; } template <typename T, typename... Ts> inline bool read(T& x, Ts&... val) { return read(x) && read(val...); } template <typename T> inline void write(T x) { if (x < 0) putchar_unlocked('-'), x = -x; if (x > 9) write(x / 10); putchar_unlocked(x % 10 + 48); } inline void write(char c) { putchar_unlocked(c); } inline void write(const char* c) { for (int i = 0; c[i]; ++i) putchar_unlocked(c[i]); } template <typename T, typename... Ts> inline void write(T x, Ts... val) { write(x), write(val...); } void file(const string s) { /*ifstream fin(s + ".in"); ofstream fout(s + ".out");*/ freopen((s + ".in").c_str(), "r", stdin), freopen((s + ".out").c_str(), "w", stdout); } } io;
// clang-format on

const int N = 1e8;
const int inf = 0x3f3f3f3f;

ll n;

int main() {
    io.read(n);
	for (int i = 1; i <= n; ++i) io.write(N, ' ');
    
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 268ms
memory: 42552kb

input:

10000000
163013666 274945261 660282226 750347932 479415442 707367508 889784258 701053337 648054721 284325080 579811399 579409251 612464725 713964729 115671724 207981664 248520003 299863785 766413174 970760732 685878945 558923373 669137517 753003821 744235475 235263080 843637139 887139744 900874527 8...

output:

5500382663501741

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 365ms
memory: 3548kb

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