# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
469691 | keta_tsimakuridze | Intergalactic ship (IZhO19_xorsum) | C++14 | 2025 ms | 23980 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define f first
#define s second
#define int long long
#define pii pair<int,int>
using namespace std;
const int N = 1e3 + 5, M = 1e5 + 5, mod = 1e9 + 7; // !
int a[N],n,Q,ch[M][2],pwr[M],dp[5][N][N],p[5][N];
vector<pair<pii,int> > all;
int choose(int x,int t) {
return ch[x][t];
}
main(){
cin >> n;
for(int i = 1; i <= n; i++) cin >> a[i];
cin >> Q;
for(int j = 1; j <= Q; j++) {
int l,r,x;
cin >> l >> r >> x;
all.push_back({{l,r},x});
}
ch[0][0] = 1;
pwr[0] = 1;
for(int i = 1; i <= Q; i++) {
for(int t = 0; t < 2; t++){
ch[i][t] = ch[i - 1][t] + ch[i - 1][1 - t];
ch[i][t] %= mod;
}
pwr[i] = pwr[i - 1] * 2 % mod;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |