# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
905725 | 2024-01-13T04:28:34 Z | vjudge1 | Intergalactic ship (IZhO19_xorsum) | C++17 | 2000 ms | 2800 KB |
#include <bits/stdc++.h> using namespace std; #define int long long long double rnd(){return (long double)(rand()/RAND_MAX);} main(){ srand(time(NULL)); ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin>>n; int a[n+1]; for(int i=1;i<=n;i++){ cin>>a[i]; } int q; cin>>q; int l[q+1],r[q+1],x[q+1]; for(int i=1;i<=q;i++){ cin>>l[i]>>r[i]>>x[i]; } int to=0; for(int j=0;j<(1<<q);j++){ int b[n+1]; for(int i=1;i<=n;i++){ b[i]=a[i]; } for(int i=0;i<q;i++){ if((j>>i)&1){ for(int j=l[i+1];j<=r[i+1];j++){ b[j]^=x[i+1]; } } } int ans=0; for(int i=1;i<=n;i++){ int sum=0; for(int j=i;j<=n;j++){ sum+=a[j]; ans+=sum*sum; ans%=1000000007; } } to+=ans; to%=1000000007; } cout<<to<<endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Incorrect | 1 ms | 348 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Incorrect | 1 ms | 348 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 17 ms | 2800 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2097 ms | 344 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1618 ms | 428 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1618 ms | 428 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Incorrect | 1 ms | 348 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Incorrect | 1 ms | 348 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Incorrect | 1 ms | 348 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |