| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1367836 | irosbx | Inflation (EGOI23_inflation) | C++20 | 3093 ms | 3064 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin>>n;
vector<ll>prices(n);
for(int i=0; i<n; i++) cin>>prices[i];
int q;
cin>>q;
for(int i=0; i<q; i++)
{
string event;
cin>>event;
if(event=="INFLATION")
{
int x;
cin>>x;
for(int j=0; j<n; j++) prices[j]+=x;
}
else if(event=="SET")
{
int x, y;
cin>>x>>y;
for(int j=0; j<n; j++)
{
if(prices[j]==x) prices[j]=y;
}
}
ll sum=0;
for(int j=0; j<n; j++) sum+=prices[j];
cout<<sum<<'\n';
}
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... | ||||
