# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
387339 | 2021-04-08T09:26:33 Z | MODDI | Food Court (JOI21_foodcourt) | C++14 | 642 ms | 524292 KB |
#include <bits/stdc++.h> #define ll long long #define pii pair<int,int> #define pll pair<ll,ll> #define mp make_pair #define pb push_back #define vi vector<int> #define vl vector<ll> using namespace std; int n, m, q; vi shop[70000]; int main(){ cin>>n>>m>>q; while(q--){ int tip; cin>>tip; if(tip == 1){ int l, r, k, c; cin>>l>>r>>k>>c; l--; r--; for(int i = l; i <= r; i++) { for(int j = 0; j < c; j++) shop[i].pb(k); } } else if(tip == 2){ int l, r, k; cin>>l>>r>>k; l--; r--; for(int i = l; i <= r; i++){ for(int j = 0; j <= k; j++){ if(shop[i].size() == 0) break; shop[i].pop_back() ; } } } else{ ll b, a; cin>>a>>b; a--; b--; /*for(auto x : shop[a]) cout<<x<<" "; cout<<endl;*/ if(b > shop[a].size()) cout<<0<<endl; else cout<<shop[a][b]<<endl; } } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 3820 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 3820 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 3820 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 4 ms | 3820 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 3820 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 642 ms | 524292 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 3820 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 3820 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |