| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1369364 | solution6312 | Legendary Dango Eater (JOI26_dango) | C++17 | 527 ms | 11780 KiB |
#include <iostream>
#include <cassert>
using namespace std;
using ll=long long;
const int MN=5e5+13;
int N, Q; ll K;
ll A[MN];
int main()
{
cin>>N>>Q>>K;
for (int i=1; i<=N; i++)
{
cin>>A[i];
if (i&1) A[i]/=K;
else A[i]=0;
A[i]+=A[i-1];
}
while (Q--)
{
int L, R; cin>>L>>R;
cout<<A[R]-A[L-1]<<endl;
}
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
