Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define loop(i,b,e) for(auto i=b;i<=e;i++)
- const int N=1e5+1;
- int n,m,x,y,type2;
- vector<int> v;
- int main() {
- cin >> n >> m;
- loop(i,1,n)
- cin >> t[i];
- loop(i,1,m) {
- cin >> x;
- if (x == 2)
- type2++;
- else {
- cin >> y;
- t[y]--;
- if(t[y] < 0)
- v.push_back(y);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement