제출 #522320

#제출 시각아이디문제언어결과실행 시간메모리
522320blueI want to be the very best too! (NOI17_pokemonmaster)C++17
11 / 100
5092 ms2336 KiB
#include <iostream> #include <vector> using namespace std; using vi = vector<int>; const int mx = 50'000; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int R, C, Q; cin >> R >> C >> Q; vi L(1+C); for(int i = 1; i <= C; i++) cin >> L[i]; vi P(1+C); for(int i = 1; i <= C; i++) cin >> P[i]; for(int q = 1; q <= Q; q++) { int T; cin >> T; if(T == 1) { int x, y, p; cin >> x >> y >> p; P[x] = p; } else { int x, y, l; cin >> x >> y >> l; if(l < L[x]) cout << 0 << '\n'; else { vi occ(1+mx, 0); for(int i = 1; i <= l; i++) occ[P[i]] = 1; int res = 0; for(int z = 1; z <= mx; z++) res += occ[z]; cout << res << '\n'; } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...