QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#666134 | #1. I/O Test | ChenJiarun12345 | 200 ✓ | 255ms | 85124kb | C++14 | 8.2kb | 2024-10-22 16:46:41 | 2024-10-22 16:46:42 |
Judging History
config.txt
10000000 10000000
input_test
/*
想到二分就做完了
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 0x3f3f3f3f3f3f3f3fll
#define For(i,l,r) for(register int i=(l);i<=(r);i++)
#define Rof(i,l,r) for(register int i=(l);i>=(r);i--)
#define bug cout<<"Ln:"<<__LINE__<<'\n'
bool M_S;
namespace IO{
const int BS=200000;
char ob[BS],*z=ob,ib[BS],*x=ib,*y=ib;
char gc(){if(x==y) y=(x=ib)+fread(ib,1,BS,stdin);if(x==y) return EOF;return *x++;}
template<class T> void rd(T &x){
x=0;char c=gc();bool flag=false;
while(!isdigit(c)&&c!='-') c=gc();
if(c=='-') flag=1,c=gc();
while(isdigit(c)) x=x*10+c-'0',c=gc();
if(flag) x=-x;
}
inline void flush(){fwrite(ob,1,z-ob,stdout),z=ob;}
inline void pc(char x){if(z==ob+BS-1)flush();*z=x,++z;}
#define kg pc(' ')
#define dn pc('\n')
template<class T> void wr(T x){
if(x==0) return pc('0'),void();
if(x<0) pc('-'),x=-x;
int stk[30],top=0;
do stk[++top]=x%10,x/=10; while(x);
while(top) pc(stk[top--]+'0');
}
struct _Flusher{~_Flusher(){flush();}}_flusher;
}
using namespace IO;
/* --------------- fast io --------------- */ // begin
namespace Fread {
const int SIZE = 1 << 21;
char buf[SIZE], *S, *T;
inline char getchar() {
if (S == T) {
T = (S = buf) + fread(buf, 1, SIZE, stdin);
if (S == T) return '\n';
}
return *S++;
}
} // namespace Fread
namespace Fwrite {
const int SIZE = 1 << 21;
char buf[SIZE], *S = buf, *T = buf + SIZE;
inline void flush() {
fwrite(buf, 1, S - buf, stdout);
S = buf;
}
inline void putchar(char c) {
*S++ = c;
if (S == T) flush();
}
struct NTR {
~ NTR() { flush(); }
} ztr;
} // namespace Fwrite
#ifdef ONLINE_JUDGE
#define getchar Fread :: getchar
#define putchar Fwrite :: putchar
#endif
namespace Fastio {
struct Reader {
template<typename T>
Reader& operator >> (T& x) {
char c = getchar();
T f = 1;
while (c < '0' || c > '9') {
if (c == '-') f = -1;
c = getchar();
}
x = 0;
while (c >= '0' && c <= '9') {
x = x * 10 + (c - '0');
c = getchar();
}
x *= f;
return *this;
}
Reader& operator >> (char& c) {
c = getchar();
while (c == ' ' || c == '\n') c = getchar();
return *this;
}
Reader& operator >> (char* str) {
int len = 0;
char c = getchar();
while (c == ' ' || c == '\n') c = getchar();
while (c != ' ' && c != '\n' && c != '\r') { // \r\n in windows
str[len++] = c;
c = getchar();
}
str[len] = '\0';
return *this;
}
Reader(){}
} cin;
const char endl = '\n';
struct Writer {
template<typename T>
Writer& operator << (T x) {
if (x == 0) { putchar('0'); return *this; }
if (x < 0) { putchar('-'); x = -x; }
static int sta[45];
int top = 0;
while (x) { sta[++top] = x % 10; x /= 10; }
while (top) { putchar(sta[top] + '0'); --top; }
return *this;
}
Writer& operator << (char c) {
putchar(c);
return *this;
}
Writer& operator << (char* str) {
int cur = 0;
while (str[cur]) putchar(str[cur++]);
return *this;
}
Writer& operator << (const char* str) {
int cur = 0;
while (str[cur]) putchar(str[cur++]);
return *this;
}
Writer(){}
} cout;
} // namespace Fastio
#define cin Fastio :: cin
#define cout Fastio :: cout
#define endl Fastio :: endl
/* --------------- fast io --------------- */ // end
const int N=10000005;
int n,a[N];
void MAIN(int TEST){
cin>>n;int sum=0;
For(i,1,n) cin>>a[i],sum+=a[i];
cout<<sum<<'\n';
}
bool M_T;
signed main(){
// freopen(".in","r",stdin);
// freopen(".out","w",stdout);
double T_S=clock();
// cerr<<"Memory: "<<1.0*(&M_S-&M_T)/1048576<<"MiB\n";
int test=1;
// cin>>test;
For(TEST,1,test) MAIN(TEST);
double T_T=clock();
// cerr<<"Time: "<<1.0*(T_T-T_S)/CLOCKS_PER_SEC<<"ms\n";
return 0;
}
output_test
/*
想到二分就做完了
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 0x3f3f3f3f3f3f3f3fll
#define For(i,l,r) for(register int i=(l);i<=(r);i++)
#define Rof(i,l,r) for(register int i=(l);i>=(r);i--)
#define bug cout<<"Ln:"<<__LINE__<<'\n'
bool M_S;
namespace IO{
const int BS=200000;
char ob[BS],*z=ob,ib[BS],*x=ib,*y=ib;
char gc(){if(x==y) y=(x=ib)+fread(ib,1,BS,stdin);if(x==y) return EOF;return *x++;}
template<class T> void rd(T &x){
x=0;char c=gc();bool flag=false;
while(!isdigit(c)&&c!='-') c=gc();
if(c=='-') flag=1,c=gc();
while(isdigit(c)) x=x*10+c-'0',c=gc();
if(flag) x=-x;
}
inline void flush(){fwrite(ob,1,z-ob,stdout),z=ob;}
inline void pc(char x){if(z==ob+BS-1)flush();*z=x,++z;}
#define kg pc(' ')
#define dn pc('\n')
template<class T> void wr(T x){
if(x==0) return pc('0'),void();
if(x<0) pc('-'),x=-x;
int stk[30],top=0;
do stk[++top]=x%10,x/=10; while(x);
while(top) pc(stk[top--]+'0');
}
struct _Flusher{~_Flusher(){flush();}}_flusher;
}
using namespace IO;
/* --------------- fast io --------------- */ // begin
namespace Fread {
const int SIZE = 1 << 21;
char buf[SIZE], *S, *T;
inline char getchar() {
if (S == T) {
T = (S = buf) + fread(buf, 1, SIZE, stdin);
if (S == T) return '\n';
}
return *S++;
}
} // namespace Fread
namespace Fwrite {
const int SIZE = 1 << 21;
char buf[SIZE], *S = buf, *T = buf + SIZE;
inline void flush() {
fwrite(buf, 1, S - buf, stdout);
S = buf;
}
inline void putchar(char c) {
*S++ = c;
if (S == T) flush();
}
struct NTR {
~ NTR() { flush(); }
} ztr;
} // namespace Fwrite
#ifdef ONLINE_JUDGE
#define getchar Fread :: getchar
#define putchar Fwrite :: putchar
#endif
namespace Fastio {
struct Reader {
template<typename T>
Reader& operator >> (T& x) {
char c = getchar();
T f = 1;
while (c < '0' || c > '9') {
if (c == '-') f = -1;
c = getchar();
}
x = 0;
while (c >= '0' && c <= '9') {
x = x * 10 + (c - '0');
c = getchar();
}
x *= f;
return *this;
}
Reader& operator >> (char& c) {
c = getchar();
while (c == ' ' || c == '\n') c = getchar();
return *this;
}
Reader& operator >> (char* str) {
int len = 0;
char c = getchar();
while (c == ' ' || c == '\n') c = getchar();
while (c != ' ' && c != '\n' && c != '\r') { // \r\n in windows
str[len++] = c;
c = getchar();
}
str[len] = '\0';
return *this;
}
Reader(){}
} cin;
const char endl = '\n';
struct Writer {
template<typename T>
Writer& operator << (T x) {
if (x == 0) { putchar('0'); return *this; }
if (x < 0) { putchar('-'); x = -x; }
static int sta[45];
int top = 0;
while (x) { sta[++top] = x % 10; x /= 10; }
while (top) { putchar(sta[top] + '0'); --top; }
return *this;
}
Writer& operator << (char c) {
putchar(c);
return *this;
}
Writer& operator << (char* str) {
int cur = 0;
while (str[cur]) putchar(str[cur++]);
return *this;
}
Writer& operator << (const char* str) {
int cur = 0;
while (str[cur]) putchar(str[cur++]);
return *this;
}
Writer(){}
} cout;
} // namespace Fastio
#define cin Fastio :: cin
#define cout Fastio :: cout
#define endl Fastio :: endl
/* --------------- fast io --------------- */ // end
const int N=10000005;
int n,a[N];
void MAIN(int TEST){
cin>>n;
For(i,1,n) cout<<100000000<<' ';
}
bool M_T;
signed main(){
// freopen(".in","r",stdin);
// freopen(".out","w",stdout);
double T_S=clock();
// cerr<<"Memory: "<<1.0*(&M_S-&M_T)/1048576<<"MiB\n";
int test=1;
// cin>>test;
For(TEST,1,test) MAIN(TEST);
double T_T=clock();
// cerr<<"Time: "<<1.0*(T_T-T_S)/CLOCKS_PER_SEC<<"ms\n";
return 0;
}
詳細信息
Subtask #1:
score: 100
Accepted
Test #1:
score: 100
Accepted
time: 78ms
memory: 85124kb
input:
10000000 942719483 476962582 114205799 743310646 137689036 291830486 704332182 689834631 210360177 765170176 595055882 755300737 771900780 668167930 724687065 661495194 214710159 149008263 432330244 750715123 548454187 556248366 754938549 579730225 522388828 929738234 230919714 759586558 322552235 8...
output:
5500204853241378
result:
points 1.0 input test passed
Subtask #2:
score: 100
Accepted
Test #2:
score: 100
Accepted
time: 255ms
memory: 7352kb
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