QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#766571#1. I/O TestASnown200 ✓67ms101272kbC++172.3kb2024-11-20 17:47:242024-11-20 17:47:29

Judging History

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

  • [2024-11-20 17:47:29]
  • 评测
  • 测评结果:200
  • 用时:67ms
  • 内存:101272kb
  • [2024-11-20 17:47:24]
  • 提交

config.txt

10000000 10000000

input_test

#include<bits/stdc++.h>
#define file(F) freopen(#F".in","r",stdin),freopen(#F".out","w",stdout)
#define lowbit(x) ((x)&-(x))
#define ALL(x) x.begin(),x.end()
#define debug(...) fprintf(stderr,__VA_ARGS__)
#define popcount(x) (__builtin_popcount((x)))
using namespace std;
using ll=long long;
using ull=unsigned long long;
using uint=uint32_t;
template<typename T>
inline bool Max(T &x,T y) { return std::less<T>()(x,y)&&(x=y,true); }
template<typename T>
inline bool Min(T &x,T y) { return std::less<T>()(y,x)&&(x=y,true); }
void Solve();
namespace FastIO {
#ifdef ONLINE_JUDGE
#include<sys/mman.h>
static const char *_read_ptr = (const char*)mmap(nullptr,0x7fffffff,1,2,0,0);
#define __getc() (*_read_ptr++)
#else
#define __getc() (getchar())
#endif
inline void read(int32_t &x) {
   static char ch; bool sg=false; x=0;
   while(!isdigit(ch=__getc())) sg^=ch=='-';
   for(;isdigit(ch);ch=__getc()) x=(x<<3)+(x<<1)+(ch&0xf);
   sg&&(x=~x+1);
}
inline void read(uint32_t &x) {
   static char ch; x=0;
   while(!isdigit(ch=__getc())) ;
   for(;isdigit(ch);ch=__getc()) x=(x<<3)+(x<<1)+(ch&0xf);
}
}
using FastIO::read;
signed main() {
#ifndef ONLINE_JUDGE
#endif
   cin.tie(nullptr)->sync_with_stdio(false);
   Solve();
}
void Solve() {
   uint n; read(n);
   ull sum=0;
   for(int i=1;i<=n;i++) {
      uint x; read(x);
      sum+=x;
   }
   cout<<sum<<endl;
}

output_test

#include<bits/stdc++.h>
#define file(F) freopen(#F".in","r",stdin),freopen(#F".out","w",stdout)
#define lowbit(x) ((x)&-(x))
#define ALL(x) (x).begin(),(x).end()
#define debug(...) fprintf(stderr,__VA_ARGS__)
#define popc(x) (__builtin_popcountll((x)))
#define abs(x) ((x)>=0?(x):-(x))
using namespace std;
using ll=long long;
using uint=uint32_t;
template<typename T>
inline bool Max(T &x,T y) { return std::less<T>()(x,y)&&(x=y,true); }
template<typename T>
inline bool Min(T &x,T y) { return std::less<T>()(y,x)&&(x=y,true); }
void Solve();
char buf[100000000],*ptr=buf;
signed main() {
#ifndef ONLINE_JUDGE
#endif
   cin.tie(nullptr)->sync_with_stdio(false);
   Solve();
}
void Solve() {
   int n; cin>>n;
   for(int i=1;i<=n;i++) 
      *(unsigned int*)(ptr+0)='0001',
      *(unsigned int*)(ptr+4)='0000',
      *(unsigned short*)(ptr+8)=' 0',ptr+=10;
   *ptr++='\n';
   cout.write(buf,ptr-buf);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 67ms
memory: 101272kb

input:

10000000
296620351 164063404 301791538 554687758 230842422 134789777 881950550 583884346 441638890 808467396 300970032 447458170 141692372 740606147 149169546 452446193 786684383 643378127 803672559 821769775 471598103 398105178 142281404 102044235 982865113 869016389 475400102 436947205 728161530 9...

output:

5498753836393884

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 11ms
memory: 101272kb

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